Skip to content

Commit

Permalink
enh(css): add properties from several W3C (Candidate) Recommendations (
Browse files Browse the repository at this point in the history
  • Loading branch information
waarissyb committed Oct 11, 2021
1 parent 1a258a3 commit 0904c5b
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Expand Up @@ -12,6 +12,8 @@ Parser:

Grammars:

- enh(css): add properties from several W3C (Candidate) Recommendations (#3308)
- fix(css) single-colon psuedo-elements no longer break highlighting (#3240) [Josh Goebel][]
- fix(css) single-colon psuedo-elements no longer break highlighting (#3240) [Josh Goebel][]
- fix(scss) single-colon psuedo-elements no longer break highlighting (#3240) [Josh Goebel][]
- enh(fsharp) rewrite most of the grammar, with many improvements [Melvyn Laïly][]
Expand Down Expand Up @@ -44,6 +46,7 @@ Grammars:
[Bahnschrift]: https://github.com/Bahnschrift
[Melvyn Laïly]: https://github.com/mlaily
[katzeprior]: https://github.com/katzeprior
[Syb Wartna]:https://github.com/waarissyb


## Version 11.2.0
Expand Down
92 changes: 92 additions & 0 deletions src/languages/lib/css-shared.js
Expand Up @@ -240,6 +240,7 @@ export const ATTRIBUTES = [
'align-content',
'align-items',
'align-self',
'all',
'animation',
'animation-delay',
'animation-direction',
Expand Down Expand Up @@ -301,9 +302,11 @@ export const ATTRIBUTES = [
'break-before',
'break-inside',
'caption-side',
'caret-color',
'clear',
'clip',
'clip-path',
'clip-rule',
'color',
'column-count',
'column-fill',
Expand All @@ -315,9 +318,14 @@ export const ATTRIBUTES = [
'column-span',
'column-width',
'columns',
'contain',
'content',
'content-visibility',
'counter-increment',
'counter-reset',
'cue',
'cue-after',
'cue-before',
'cursor',
'direction',
'display',
Expand All @@ -331,6 +339,7 @@ export const ATTRIBUTES = [
'flex-shrink',
'flex-wrap',
'float',
'flow',
'font',
'font-display',
'font-family',
Expand All @@ -342,11 +351,17 @@ export const ATTRIBUTES = [
'font-smoothing',
'font-stretch',
'font-style',
'font-synthesis',
'font-variant',
'font-variant-caps',
'font-variant-east-asian',
'font-variant-ligatures',
'font-variant-numeric',
'font-variant-position',
'font-variation-settings',
'font-weight',
'gap',
'glyph-orientation-vertical',
'grid',
'grid-area',
'grid-auto-columns',
Expand All @@ -363,6 +378,7 @@ export const ATTRIBUTES = [
'grid-template-areas',
'grid-template-columns',
'grid-template-rows',
'hanging-punctuation',
'height',
'hyphens',
'icon',
Expand All @@ -372,9 +388,11 @@ export const ATTRIBUTES = [
'ime-mode',
'inherit',
'initial',
'isolation',
'justify-content',
'left',
'letter-spacing',
'line-break',
'line-height',
'list-style',
'list-style-image',
Expand All @@ -387,10 +405,27 @@ export const ATTRIBUTES = [
'margin-top',
'marks',
'mask',
'mask-border',
'mask-border-mode',
'mask-border-outset',
'mask-border-repeat',
'mask-border-slice',
'mask-border-source',
'mask-border-width',
'mask-clip',
'mask-composite',
'mask-image',
'mask-mode',
'mask-origin',
'mask-position',
'mask-repeat',
'mask-size',
'mask-type',
'max-height',
'max-width',
'min-height',
'min-width',
'mix-blend-mode',
'nav-down',
'nav-index',
'nav-left',
Expand Down Expand Up @@ -420,31 +455,77 @@ export const ATTRIBUTES = [
'page-break-after',
'page-break-before',
'page-break-inside',
'pause',
'pause-after',
'pause-before',
'perspective',
'perspective-origin',
'pointer-events',
'position',
'quotes',
'resize',
'rest',
'rest-after',
'rest-before',
'revert',
'right',
'row-gap',
'scroll-margin',
'scroll-margin-block',
'scroll-margin-block-end',
'scroll-margin-block-start',
'scroll-margin-bottom',
'scroll-margin-inline',
'scroll-margin-inline-end',
'scroll-margin-inline-start',
'scroll-margin-left',
'scroll-margin-right',
'scroll-margin-top',
'scroll-padding',
'scroll-padding-block',
'scroll-padding-block-end',
'scroll-padding-block-start',
'scroll-padding-bottom',
'scroll-padding-inline',
'scroll-padding-inline-end',
'scroll-padding-inline-start',
'scroll-padding-left',
'scroll-padding-right',
'scroll-padding-top',
'scroll-snap-align',
'scroll-snap-stop',
'scroll-snap-type',
'shape-image-threshold',
'shape-margin',
'shape-outside',
'speak',
'speak-as',
'src', // @font-face
'tab-size',
'table-layout',
'text-align',
'text-align-all',
'text-align-last',
'text-combine-upright',
'text-decoration',
'text-decoration-color',
'text-decoration-line',
'text-decoration-style',
'text-emphasis',
'text-emphasis-color',
'text-emphasis-position',
'text-emphasis-style',
'text-indent',
'text-justify',
'text-orientation',
'text-overflow',
'text-rendering',
'text-shadow',
'text-transform',
'text-underline-position',
'top',
'transform',
'transform-box',
'transform-origin',
'transform-style',
'transition',
Expand All @@ -453,14 +534,25 @@ export const ATTRIBUTES = [
'transition-property',
'transition-timing-function',
'unicode-bidi',
'unset',
'vertical-align',
'visibility',
'voice-balance',
'voice-duration',
'voice-family',
'voice-pitch',
'voice-range',
'voice-rate',
'voice-stress',
'voice-volume',
'white-space',
'widows',
'width',
'will-change',
'word-break',
'word-spacing',
'word-wrap',
'writing-mode',
'z-index'
// reverse makes sure longer attributes `font-weight` are matched fully
// instead of getting false positives on say `font`
Expand Down

0 comments on commit 0904c5b

Please sign in to comment.