diff --git a/js/csslint/parserlib.js b/js/csslint/parserlib.js index 430cc097..ed077e3f 100644 --- a/js/csslint/parserlib.js +++ b/js/csslint/parserlib.js @@ -37,7 +37,7 @@ self.parserlib = (() => { 'all': 'initial | inherit | unset', 'alignment-adjust': 'auto | baseline | before-edge | text-before-edge | middle | central | ' + 'after-edge | text-after-edge | ideographic | alphabetic | hanging | ' + - 'mathematical | | ', + 'mathematical | ', 'alignment-baseline': 'auto | baseline | use-script | before-edge | text-before-edge | ' + 'after-edge | text-after-edge | central | middle | ideographic | alphabetic | ' + 'hanging | mathematical', @@ -117,7 +117,7 @@ self.parserlib = (() => { 'background-position-y': '[ center | [ top | bottom ]? ? ]#', 'background-repeat': '#', 'background-size': '#', - 'baseline-shift': 'baseline | sub | super | | ', + 'baseline-shift': 'baseline | sub | super | ', 'behavior': 1, 'binding': 1, 'bleed': '', @@ -126,10 +126,6 @@ self.parserlib = (() => { 'bookmark-level': 'none | ', 'bookmark-state': 'open | closed', 'bookmark-target': 'none | ', - 'border-bottom-left-radius': '', - 'border-bottom-right-radius': '', - 'border-top-left-radius': '', - 'border-top-right-radius': '', 'border-boundary': 'none | parent | display', 'border-collapse': 'collapse | separate', 'border-image': '[ none | ] || ' + @@ -140,8 +136,18 @@ self.parserlib = (() => { 'border-image-slice': '', 'border-image-source': ' | none', 'border-image-width': '', - 'border-radius': '', 'border-spacing': '{1,2}', + + 'border-bottom-left-radius': '{1,2}', + 'border-bottom-right-radius': '{1,2}', + 'border-end-end-radius': '{1,2}', + 'border-end-start-radius': '{1,2}', + 'border-radius': '', + 'border-start-end-radius': '{1,2}', + 'border-start-start-radius': '{1,2}', + 'border-top-left-radius': '{1,2}', + 'border-top-right-radius': '{1,2}', + 'bottom': '', 'box-decoration-break': 'slice | clone', 'box-shadow': '', @@ -217,12 +223,12 @@ self.parserlib = (() => { 'dominant-baseline': 'auto | use-script | no-change | reset-size | ideographic | alphabetic | ' + 'hanging | mathematical | central | middle | text-after-edge | text-before-edge', 'drop-initial-after-adjust': 'central | middle | after-edge | text-after-edge | ideographic | ' + - 'alphabetic | mathematical | | ', + 'alphabetic | mathematical | ', 'drop-initial-after-align': 'baseline | use-script | before-edge | text-before-edge | ' + 'after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | ' + 'mathematical', 'drop-initial-before-adjust': 'before-edge | text-before-edge | central | middle | ' + - 'hanging | mathematical | | ', + 'hanging | mathematical | ', 'drop-initial-before-align': 'caps-height | baseline | use-script | before-edge | ' + 'text-before-edge | after-edge | text-after-edge | central | middle | ideographic | ' + 'alphabetic | hanging | mathematical', @@ -411,6 +417,7 @@ self.parserlib = (() => { 'overflow': '{1,2}', 'overflow-anchor': 'auto | none', 'overflow-block': '', + 'overflow-clip-margin': '', 'overflow-inline': '', 'overflow-style': 1, 'overflow-wrap': 'normal | break-word | anywhere', @@ -521,12 +528,12 @@ self.parserlib = (() => { 'string-set': 1, 'stroke': '', 'stroke-dasharray': 'none | ', - 'stroke-dashoffset': ' | ', + 'stroke-dashoffset': ' | ', 'stroke-linecap': 'butt | round | square', - 'stroke-linejoin': 'miter | round | bevel', - 'stroke-miterlimit': '', + 'stroke-linejoin': 'miter | miter-clip | round | bevel | arcs', + 'stroke-miterlimit': '', 'stroke-opacity': '', - 'stroke-width': ' | ', + 'stroke-width': ' | ', 'table-layout': 'auto | fixed', 'tab-size': ' | ', @@ -577,7 +584,7 @@ self.parserlib = (() => { 'user-select': 'auto | text | none | contain | all', 'vertical-align': 'auto | use-script | baseline | sub | super | top | text-top | ' + - 'central | middle | bottom | text-bottom | | ', + 'central | middle | bottom | text-bottom | ', 'visibility': 'visible | hidden | collapse', 'voice-balance': 1, 'voice-duration': 1, @@ -761,9 +768,12 @@ self.parserlib = (() => { !p.expr.parts.length || p.expr.parts.every(VTSimple[''], VTSimple) ), - '': p => p.type === 'number' && p.value >= 1 || p.isCalc, + '': p => + p.value >= 0 && vtIsLength(p) || p.isCalc, '': p => p.value >= 0 && (p.type === 'percentage' || vtIsLength(p)) || p.isCalc, + '': p => + p.value >= 0 && p.type === 'number' || p.isCalc, '': p => p.value >= 0 && (p.type === 'number' || p.type === 'percentage') || p.isCalc, //eslint-disable-next-line no-use-before-define @@ -850,7 +860,7 @@ self.parserlib = (() => { '': 'ease | ease-in | ease-out | ease-in-out | ' + 'cubic-bezier( #{4} )', '': Matcher => - Matcher.parse('') + Matcher.parse(' | ') .braces(1, Infinity, '#', Matcher.parse(',').braces(0, 1, '?')), '': '? && [ flow | flow-root ]? && list-item', '': '[ ? ]+ ?', @@ -912,9 +922,7 @@ self.parserlib = (() => { '': 'auto | normal | stretch | | ? ' + '[ | left | right ]', '': 'contain | none | auto', - '': 'none | child | child( ) | | ' + - ' [ none | currentColor | ]? | ' + - 'context-fill | context-stroke', + '': 'none | | [ none | ]? | context-fill | context-stroke', // Because our `alt` combinator is ordered, we need to test these // in order from longest possible match to shortest. '': @@ -965,7 +973,6 @@ self.parserlib = (() => { '': ' | min-content | max-content | ' + 'fit-content | fit-content( ) | -moz-available | -webkit-fill-available', '': 'auto | #', - '': '{1,2}', }; //#endregion @@ -2346,7 +2353,7 @@ self.parserlib = (() => { /** @param {PropertyValuePart} p */ function vtIsLength(p) { - return p.text === '0' || p.type === 'length' || p.type === 'number' || p.isCalc; + return p.text === '0' || p.type === 'length' || p.isCalc; } /**