@@ -371,6 +371,15 @@ describe('CSSStyleDeclaration.setProperty(), CSSStyleDeclaration.getPropertyValu
371371 } )
372372} )
373373
374+ describe ( 'CSS-wide keywords' , ( ) => {
375+ test ( 'valid' , ( ) => {
376+ const style = createStyleBlock ( )
377+ substitutions . keywords . forEach ( keyword => {
378+ style . opacity = keyword . toUpperCase ( )
379+ expect ( style . opacity ) . toBe ( keyword )
380+ } )
381+ } )
382+ } )
374383describe ( 'arbitrary substitution' , ( ) => {
375384 test ( 'invalid' , ( ) => {
376385 const style = createStyleBlock ( )
@@ -426,7 +435,6 @@ describe('<whole-value>', () => {
426435 const style = createStyleBlock ( )
427436 const invalid = [
428437 // Not the <whole-value>
429- [ 'initial initial' , 'margin' ] ,
430438 [ 'first-valid(0) 0' , 'margin' ] ,
431439 [ 'interpolate(0, 0: 0) 0' , 'margin' ] ,
432440 [ 'interpolate(0, 0: first-valid(0) 0)' , 'margin' ] ,
@@ -449,8 +457,6 @@ describe('<whole-value>', () => {
449457 test ( 'valid' , ( ) => {
450458 const style = createStyleBlock ( )
451459 const valid = [
452- // CSS-wide keywords
453- ...substitutions . keywords . map ( keyword => [ keyword . toUpperCase ( ) , keyword , 'opacity' ] ) ,
454460 // Resolved at parse time
455461 [ 'FIRST-VALID(1)' , '1' , 'opacity' ] ,
456462 // Serialize the list of tokens
0 commit comments