LibWeb: Make word-spacing and letter-spacing default value compute to 0

This commit is contained in:
Tim Ledbetter 2025-09-09 10:05:21 +01:00 committed by Sam Atkins
commit bd7348949a
Notes: github-actions[bot] 2025-09-10 15:14:47 +00:00
9 changed files with 564 additions and 3 deletions

View file

@ -3136,6 +3136,11 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(Propert
return compute_border_or_outline_width(specified_value, get_property_specified_value(PropertyID::BorderTopStyle), computation_context);
case PropertyID::OutlineWidth:
return compute_border_or_outline_width(specified_value, get_property_specified_value(PropertyID::OutlineStyle), computation_context);
case PropertyID::LetterSpacing:
case PropertyID::WordSpacing:
if (specified_value->to_keyword() == Keyword::Normal)
return LengthStyleValue::create(Length::make_px(0));
return specified_value;
case PropertyID::FillOpacity:
case PropertyID::FloodOpacity:
case PropertyID::Opacity:

View file

@ -735,8 +735,8 @@ All supported properties and their default values exposed from CSSStylePropertie
'will-change': 'auto'
'wordBreak': 'normal'
'word-break': 'normal'
'wordSpacing': 'normal'
'word-spacing': 'normal'
'wordSpacing': '0px'
'word-spacing': '0px'
'wordWrap': 'normal'
'word-wrap': 'normal'
'writingMode': 'horizontal-tb'

View file

@ -65,7 +65,7 @@ text-wrap-style: auto
visibility: visible
white-space-collapse: collapse
word-break: normal
word-spacing: normal
word-spacing: 0px
word-wrap: normal
writing-mode: horizontal-tb
align-content: normal

View file

@ -0,0 +1,149 @@
Harness status: OK
Found 144 tests
144 Pass
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (-0.3) should be [33px]
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (0) should be [30px]
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (0.3) should be [27px]
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (0.6) should be [24px]
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Transitions: property <letter-spacing> from neutral to [20px] at (1.5) should be [15px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (-0.3) should be [33px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (0) should be [30px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (0.3) should be [27px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (0.6) should be [24px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <letter-spacing> from neutral to [20px] at (1.5) should be [15px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (-0.3) should be [33px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (0) should be [30px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (0.3) should be [27px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (0.6) should be [24px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Animations: property <letter-spacing> from neutral to [20px] at (1.5) should be [15px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (-0.3) should be [33px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (0) should be [30px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (0.3) should be [27px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (0.6) should be [24px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (1) should be [20px]
Pass Web Animations: property <letter-spacing> from neutral to [20px] at (1.5) should be [15px]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (0) should be [normal]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <letter-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (0) should be [normal]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (0) should be [normal]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Animations: property <letter-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (0) should be [normal]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (1) should be [20px]
Pass Web Animations: property <letter-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (0) should be [2px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (0.3) should be [7.4px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (0.6) should be [12.8px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <letter-spacing> from [inherit] to [20px] at (1.5) should be [29px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (0) should be [2px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (0.3) should be [7.4px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (0.6) should be [12.8px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [inherit] to [20px] at (1.5) should be [29px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (0) should be [2px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (0.3) should be [7.4px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (0.6) should be [12.8px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Animations: property <letter-spacing> from [inherit] to [20px] at (1.5) should be [29px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (-0.3) should be [-3.4px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (0) should be [2px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (0.3) should be [7.4px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (0.6) should be [12.8px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass Web Animations: property <letter-spacing> from [inherit] to [20px] at (1.5) should be [29px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (0) should be [2px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (0.3) should be [7.4px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (0.6) should be [12.8px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <letter-spacing> from [unset] to [20px] at (1.5) should be [29px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (0) should be [2px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (0.3) should be [7.4px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (0.6) should be [12.8px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [unset] to [20px] at (1.5) should be [29px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (-0.3) should be [-3.4px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (0) should be [2px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (0.3) should be [7.4px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (0.6) should be [12.8px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Animations: property <letter-spacing> from [unset] to [20px] at (1.5) should be [29px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (-0.3) should be [-3.4px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (0) should be [2px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (0.3) should be [7.4px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (0.6) should be [12.8px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (1) should be [20px]
Pass Web Animations: property <letter-spacing> from [unset] to [20px] at (1.5) should be [29px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (-0.3) should be [-16px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (0) should be [-10px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (0.3) should be [-4px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (0.6) should be [2px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (1) should be [10px]
Pass CSS Transitions: property <letter-spacing> from [-10px] to [10px] at (1.5) should be [20px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (-0.3) should be [-16px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (0) should be [-10px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (0.3) should be [-4px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (0.6) should be [2px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (1) should be [10px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [-10px] to [10px] at (1.5) should be [20px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (-0.3) should be [-16px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (0) should be [-10px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (0.3) should be [-4px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (0.6) should be [2px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (1) should be [10px]
Pass CSS Animations: property <letter-spacing> from [-10px] to [10px] at (1.5) should be [20px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (-0.3) should be [-16px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (0) should be [-10px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (0.3) should be [-4px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (0.6) should be [2px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (1) should be [10px]
Pass Web Animations: property <letter-spacing> from [-10px] to [10px] at (1.5) should be [20px]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (0) should be [normal]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Transitions: property <letter-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (0) should be [normal]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Transitions with transition: all: property <letter-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (0) should be [normal]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Animations: property <letter-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (0) should be [normal]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (1) should be [10px]
Pass Web Animations: property <letter-spacing> from [normal] to [10px] at (1.5) should be [15px]

View file

@ -0,0 +1,149 @@
Harness status: OK
Found 144 tests
144 Pass
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (-0.3) should be [7px]
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (0) should be [10px]
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (0.3) should be [13px]
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (0.6) should be [16px]
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Transitions: property <word-spacing> from neutral to [20px] at (1.5) should be [25px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (-0.3) should be [7px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (0) should be [10px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (0.3) should be [13px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (0.6) should be [16px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <word-spacing> from neutral to [20px] at (1.5) should be [25px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (-0.3) should be [7px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (0) should be [10px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (0.3) should be [13px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (0.6) should be [16px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (1) should be [20px]
Pass CSS Animations: property <word-spacing> from neutral to [20px] at (1.5) should be [25px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (-0.3) should be [7px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (0) should be [10px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (0.3) should be [13px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (0.6) should be [16px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (1) should be [20px]
Pass Web Animations: property <word-spacing> from neutral to [20px] at (1.5) should be [25px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (0) should be [0px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <word-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (0) should be [0px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <word-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (0) should be [0px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (1) should be [20px]
Pass CSS Animations: property <word-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (-0.3) should be [-6px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (0) should be [0px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (0.3) should be [6px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (0.6) should be [12px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (1) should be [20px]
Pass Web Animations: property <word-spacing> from [initial] to [20px] at (1.5) should be [30px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (-0.3) should be [33px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (0) should be [30px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (0.3) should be [27px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (0.6) should be [24px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <word-spacing> from [inherit] to [20px] at (1.5) should be [15px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (-0.3) should be [33px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (0) should be [30px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (0.3) should be [27px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (0.6) should be [24px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <word-spacing> from [inherit] to [20px] at (1.5) should be [15px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (-0.3) should be [33px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (0) should be [30px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (0.3) should be [27px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (0.6) should be [24px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass CSS Animations: property <word-spacing> from [inherit] to [20px] at (1.5) should be [15px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (-0.3) should be [33px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (0) should be [30px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (0.3) should be [27px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (0.6) should be [24px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (1) should be [20px]
Pass Web Animations: property <word-spacing> from [inherit] to [20px] at (1.5) should be [15px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (-0.3) should be [33px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (0) should be [30px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (0.3) should be [27px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (0.6) should be [24px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Transitions: property <word-spacing> from [unset] to [20px] at (1.5) should be [15px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (-0.3) should be [33px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (0) should be [30px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (0.3) should be [27px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (0.6) should be [24px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Transitions with transition: all: property <word-spacing> from [unset] to [20px] at (1.5) should be [15px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (-0.3) should be [33px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (0) should be [30px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (0.3) should be [27px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (0.6) should be [24px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (1) should be [20px]
Pass CSS Animations: property <word-spacing> from [unset] to [20px] at (1.5) should be [15px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (-0.3) should be [33px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (0) should be [30px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (0.3) should be [27px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (0.6) should be [24px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (1) should be [20px]
Pass Web Animations: property <word-spacing> from [unset] to [20px] at (1.5) should be [15px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (-0.3) should be [-25px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (0) should be [-10px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (0.3) should be [5px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (0.6) should be [20px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (1) should be [40px]
Pass CSS Transitions: property <word-spacing> from [-10px] to [40px] at (1.5) should be [65px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (-0.3) should be [-25px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (0) should be [-10px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (0.3) should be [5px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (0.6) should be [20px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (1) should be [40px]
Pass CSS Transitions with transition: all: property <word-spacing> from [-10px] to [40px] at (1.5) should be [65px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (-0.3) should be [-25px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (0) should be [-10px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (0.3) should be [5px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (0.6) should be [20px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (1) should be [40px]
Pass CSS Animations: property <word-spacing> from [-10px] to [40px] at (1.5) should be [65px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (-0.3) should be [-25px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (0) should be [-10px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (0.3) should be [5px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (0.6) should be [20px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (1) should be [40px]
Pass Web Animations: property <word-spacing> from [-10px] to [40px] at (1.5) should be [65px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (0) should be [0px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Transitions: property <word-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (0) should be [0px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Transitions with transition: all: property <word-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (0) should be [0px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (1) should be [10px]
Pass CSS Animations: property <word-spacing> from [normal] to [10px] at (1.5) should be [15px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (-0.3) should be [-3px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (0) should be [0px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (0.3) should be [3px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (0.6) should be [6px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (1) should be [10px]
Pass Web Animations: property <word-spacing> from [normal] to [10px] at (1.5) should be [15px]

View file

@ -0,0 +1,14 @@
Harness status: OK
Found 9 tests
9 Pass
Pass Property word-spacing value 'normal'
Pass Property word-spacing value '0'
Pass Property word-spacing value '10px'
Pass Property word-spacing value '-20px'
Pass Property word-spacing value 'calc(10px - 0.5em)'
Pass Property word-spacing value '110%'
Pass Property word-spacing value '-5%'
Pass Property word-spacing value 'calc(10% - 20%)'
Pass Property word-spacing value 'calc(10px - (5% + 10%)'

View file

@ -0,0 +1,107 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#letter-spacing-property">
<meta name="test" content="letter-spacing supports animation by computed value type">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/interpolation-testcommon.js"></script>
<style>
.parent {
letter-spacing: 2px;
}
.target {
font: 10px sans-serif;
font-weight: bold;
letter-spacing: 30px;
}
.expected {
color: green;
margin-right: 30px;
}
</style>
<body>
<template id="target-template">TT</template>
</body>
<script>
test_interpolation({
property: 'letter-spacing',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'letter-spacing',
from: 'initial',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: 'normal'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'letter-spacing',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, expect: '-3.4px'},
{at: 0, expect: '2px'},
{at: 0.3, expect: '7.4px'},
{at: 0.6, expect: '12.8px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '29px'},
]);
test_interpolation({
property: 'letter-spacing',
from: 'unset',
to: '20px',
}, [
{at: -0.3, expect: '-3.4px'},
{at: 0, expect: '2px'},
{at: 0.3, expect: '7.4px'},
{at: 0.6, expect: '12.8px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '29px'},
]);
test_interpolation({
property: 'letter-spacing',
from: '-10px',
to: '10px',
}, [
{at: -0.3, expect: '-16px'},
{at: 0, expect: '-10px'},
{at: 0.3, expect: '-4px'},
{at: 0.6, expect: '2px'},
{at: 1, expect: '10px'},
{at: 1.5, expect: '20px'},
]);
test_interpolation({
property: 'letter-spacing',
from: 'normal',
to: '10px',
}, [
{at: -0.3, expect: '-3px'},
{at: 0, expect: 'normal'},
{at: 0.3, expect: '3px'},
{at: 0.6, expect: '6px'},
{at: 1, expect: '10px'},
{at: 1.5, expect: '15px'},
]);
</script>

View file

@ -0,0 +1,104 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-spacing-property">
<meta name="test" content="word-spacing supports animation by computed value type">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/interpolation-testcommon.js"></script>
<style>
.parent {
word-spacing: 30px;
}
.target {
font: 10px sans-serif;
word-spacing: 10px;
}
.expected {
color: green;
}
</style>
<body>
<template id="target-template">A B C D</template>
</body>
<script>
test_interpolation({
property: 'word-spacing',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, expect: '7px'},
{at: 0, expect: '10px'},
{at: 0.3, expect: '13px'},
{at: 0.6, expect: '16px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '25px'},
]);
test_interpolation({
property: 'word-spacing',
from: 'initial',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'word-spacing',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'word-spacing',
from: 'unset',
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'word-spacing',
from: '-10px',
to: '40px'
}, [
{at: -0.3, expect: '-25px'},
{at: 0, expect: '-10px'},
{at: 0.3, expect: '5px'},
{at: 0.6, expect: '20px'},
{at: 1, expect: '40px'},
{at: 1.5, expect: '65px'},
]);
test_interpolation({
property: 'word-spacing',
from: 'normal',
to: '10px'
}, [
{at: -0.3, expect: '-3px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '3px'},
{at: 0.6, expect: '6px'},
{at: 1, expect: '10px'},
{at: 1.5, expect: '15px'},
]);
</script>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text: getComputedStyle().wordSpacing</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing">
<meta name="assert" content="word-spacing computed value is an absolute length and/or percentage.">
<meta name="assert" content="'normal' computes to zero.">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/computed-testcommon.js"></script>
<style>
#target {
font-size: 40px;
}
</style>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("word-spacing", "normal", "0px");
test_computed_value("word-spacing", "0", "0px");
test_computed_value("word-spacing", "10px");
test_computed_value("word-spacing", "-20px");
test_computed_value("word-spacing", "calc(10px - 0.5em)", "-10px");
test_computed_value("word-spacing", "110%");
test_computed_value("word-spacing", "-5%");
test_computed_value("word-spacing", "calc(10% - 20%)", "-10%");
test_computed_value("word-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)");
</script>
</body>
</html>