From 4d1110986ceaac00c8d192f5fba5fb68274a4f4a Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 11 Oct 2020 09:44:17 +0300 Subject: [PATCH] update CSSLint * Scroll Snap L1 (CR 2020-09-18) * dedupe border* * fix font-variation-settings grammar --- vendor-overwrites/csslint/parserlib.js | 101 ++++++++++++++----------- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index f4dcd2e5..b9f7dc69 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -177,38 +177,14 @@ self.parserlib = (() => { 'bookmark-level': 'none | ', 'bookmark-state': 'open | closed', 'bookmark-target': 'none | | attr()', - 'border': '', - 'border-block-color': '{1,2}', - 'border-block-end': '', - 'border-block-end-color': '', - 'border-block-end-style': '', - 'border-block-end-width': '', - 'border-block-start': '', - 'border-block-start-color': '', - 'border-block-start-style': '', - 'border-block-start-width': '', - 'border-block-style': '{1,2}', - 'border-block-width': '{1,2}', - 'border-bottom': '', - 'border-bottom-color': '', + 'border-bottom-left-radius': '', 'border-bottom-right-radius': '', - 'border-bottom-style': '', - 'border-bottom-width': '', - 'border-boundary': 'none | parent | display', - 'border-inline-color': '{1,2}', - 'border-inline-end': '', - 'border-inline-end-color': '', - 'border-inline-end-style': '', - 'border-inline-end-width': '', - 'border-inline-start': '', - 'border-inline-start-color': '', - 'border-inline-start-style': '', - 'border-inline-start-width': '', - 'border-inline-style': '{1,2}', - 'border-inline-width': '{1,2}', + 'border-top-left-radius': '', + 'border-top-right-radius': '', + + 'border-boundary': 'none | parent | display', 'border-collapse': 'collapse | separate', - 'border-color': '{1,4}', 'border-image': '[ none | ] || ' + '[ / | / ? / ]? || ' + '', @@ -217,24 +193,8 @@ self.parserlib = (() => { 'border-image-slice': '', 'border-image-source': ' | none', 'border-image-width': '', - 'border-left': '', - 'border-left-color': '', - 'border-left-style': '', - 'border-left-width': '', 'border-radius': '', - 'border-right': '', - 'border-right-color': '', - 'border-right-style': '', - 'border-right-width': '', 'border-spacing': '{1,2}', - 'border-style': '{1,4}', - 'border-top': '', - 'border-top-color': '', - 'border-top-left-radius': '', - 'border-top-right-radius': '', - 'border-top-style': '', - 'border-top-width': '', - 'border-width': '{1,4}', 'bottom': '', 'box-decoration-break': 'slice | clone', 'box-shadow': '', @@ -370,7 +330,7 @@ self.parserlib = (() => { 'font-variant-ligatures': ' | normal | none', 'font-variant-numeric': ' | normal', 'font-variant-position': 'normal | sub | super', - 'font-variation-settings': 'normal | [ ]#', + 'font-variation-settings': 'normal | [ ]#', 'font-weight': '', '-ms-flex-align': 'start | end | center | stretch | baseline', '-ms-flex-order': '', @@ -581,6 +541,34 @@ self.parserlib = (() => { // S 'scale': 'none | {1,3}', + + 'scroll-behavior': 'auto | smooth', + 'scroll-margin': '{1,4}', + 'scroll-margin-bottom': '', + 'scroll-margin-left': '', + 'scroll-margin-right': '', + 'scroll-margin-top': '', + 'scroll-margin-block': '{1,2}', + 'scroll-margin-block-end': '', + 'scroll-margin-block-start': '', + 'scroll-margin-inline': '{1,2}', + 'scroll-margin-inline-end': '', + 'scroll-margin-inline-start': '', + 'scroll-padding': '{1,4}', + 'scroll-padding-left': '', + 'scroll-padding-right': '', + 'scroll-padding-top': '', + 'scroll-padding-bottom': '', + 'scroll-padding-block': '{1,2}', + 'scroll-padding-block-end': '', + 'scroll-padding-block-start': '', + 'scroll-padding-inline': '{1,2}', + 'scroll-padding-inline-end': '', + 'scroll-padding-inline-start': '', + 'scroll-snap-align': '[ none | start | end | center ]{1,2}', + 'scroll-snap-stop': 'normal | always', + 'scroll-snap-type': 'none | [ x | y | block | inline | both ] [ mandatory | proximity ]?', + 'scrollbar-color': 'auto | dark | light | {2}', 'scrollbar-width': 'auto | thin | none', 'shape-inside': 'auto | outside-shape | [ || shape-box ] | | display', @@ -692,6 +680,25 @@ self.parserlib = (() => { '-webkit-text-stroke-width': '', }; + for (const [k, reps] of Object.entries({ + 'border': '{1,4}', + 'border-bottom': '', + 'border-left': '', + 'border-right': '', + 'border-top': '', + 'border-block': '{1,2}', + 'border-block-end': '', + 'border-block-start': '', + 'border-inline': '{1,2}', + 'border-inline-end': '', + 'border-inline-start': '', + })) { + Properties[k] = ''; + Properties[`${k}-color`] = '' + reps; + Properties[`${k}-style`] = '' + reps; + Properties[`${k}-width`] = '' + reps; + } + //endregion //region ValidationTypes - definitions @@ -713,6 +720,8 @@ self.parserlib = (() => { '': 'scroll | fixed | local', + '': 'auto | | ', + '': 'inset() | circle() | ellipse() | polygon()', '': ' | none',