Skip to content

Commit c892cd5

Browse files
feat(css): Update the syntax for background-* (#987)
feat(css): Update the syntax to match the spec
1 parent 4c63ed1 commit c892cd5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

css/properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,7 @@
20852085
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
20862086
},
20872087
"background": {
2088-
"syntax": "[ <bg-layer> , ]* <final-bg-layer>",
2088+
"syntax": "<bg-layer>#? , <final-bg-layer>",
20892089
"media": "visual",
20902090
"inherited": false,
20912091
"animationType": [

css/syntaxes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"syntax": "<visual-box> | border-area | text"
9191
},
9292
"bg-image": {
93-
"syntax": "none | <image>"
93+
"syntax": "<image> | none"
9494
},
9595
"bg-layer": {
9696
"syntax": "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <visual-box> || <visual-box>"
@@ -99,7 +99,7 @@
9999
"syntax": "[ [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] | [ center | [ left | right ] <length-percentage>? ] && [ center | [ top | bottom ] <length-percentage>? ] ]"
100100
},
101101
"bg-size": {
102-
"syntax": "[ <length-percentage> | auto ]{1,2} | cover | contain"
102+
"syntax": "[ <length-percentage [0,∞]> | auto ]{1,2} | cover | contain"
103103
},
104104
"blend-mode": {
105105
"syntax": "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
@@ -372,7 +372,7 @@
372372
"syntax": "[ <filter-function> | <url> ]+"
373373
},
374374
"final-bg-layer": {
375-
"syntax": "<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <visual-box> || <visual-box>"
375+
"syntax": "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <visual-box> || <visual-box> || <'background-color'>"
376376
},
377377
"fit-content()": {
378378
"syntax": "fit-content( <length-percentage [0,∞]> )"

0 commit comments

Comments
 (0)