Skip to content

Commit

Permalink
Update CSS property list.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Apr 15, 2023
1 parent 6835c1c commit 4bcd911
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 76 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* Objective-C/C++, [Screenshots](https://github.com/zufuliu/notepad2/wiki/Screenshots#objective-cc)
* [C Standard Library](tools/lang/C.c), up to C2x.
* [C++ STL](tools/lang/CPP.cpp), up to C++20.
* [CSS Style Sheet](tools/lang/CSS.css), up to March 2023 snapshot.
* [CSS Style Sheet](tools/lang/CSS.css), up to April 2023 snapshot.
* [SCSS Style Sheet](tools/lang/SCSS.scss), up to Dart Sass 1.50.
* [Less Style Sheet](tools/lang/Less.less), up to Less 4.1.
* [HSS Style Sheet](tools/lang/HSS.hss)
Expand Down
64 changes: 33 additions & 31 deletions src/EditLexers/stlCSS.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ static KEYWORDLIST Keywords_CSS = {{
//++Autogenerated -- start of section automatically generated
"^-- ^-moz- ^-ms- ^-o- ^-webkit- "
"accent-color additive-symbols align-content align-items align-self alignment-baseline all animation "
"animation-composition animation-delay animation-delay-end animation-delay-start animation-direction animation-duration "
"animation-fill-mode animation-iteration-count animation-name animation-play-state animation-range "
"animation-composition animation-delay animation-direction animation-duration animation-fill-mode "
"animation-iteration-count animation-name animation-play-state animation-range animation-range-end animation-range-start "
"animation-timeline animation-timing-function any-hover any-pointer appearance ascent-override aspect-ratio azimuth "
"backdrop-filter backface-visibility background background-attachment background-blend-mode "
"background-clip background-color background-image background-origin background-position background-repeat "
Expand All @@ -28,11 +28,11 @@ static KEYWORDLIST Keywords_CSS = {{
"border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width "
"border-width bottom box-decoration-break box-shadow box-sizing box-snap break-after break-before break-inside "
"caption-side caret caret-color caret-shape chains clear clip clip-path clip-rule "
"color color-adjust color-gamut color-index color-interpolation-filters color-scheme column-count column-fill column-gap "
"column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns components contain "
"contain-intrinsic-block-size contain-intrinsic-height contain-intrinsic-inline-size contain-intrinsic-size "
"contain-intrinsic-width container container-name container-type content content-visibility contents continue "
"counter-increment counter-reset counter-set cue cue-after cue-before cursor "
"color color-adjust color-gamut color-index color-interpolation-filters color-rendering color-scheme column-count "
"column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width "
"columns components contain contain-intrinsic-block-size contain-intrinsic-height contain-intrinsic-inline-size "
"contain-intrinsic-size contain-intrinsic-width container container-name container-type content content-visibility "
"continue counter-increment counter-reset counter-set cue cue-after cue-before cursor "
"descent-override device-aspect-ratio device-height device-width direction display display-mode dominant-baseline "
"dynamic-range "
"elevation empty-cells environment-blending "
Expand All @@ -57,7 +57,7 @@ static KEYWORDLIST Keywords_CSS = {{
"inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start inverted-colors "
"isolation "
"justify-content justify-items justify-self "
"leading-trim left letter-spacing lighting-color "
"left letter-spacing lighting-color "
"line-break line-clamp line-gap-override line-grid line-height line-height-step line-padding line-snap "
"list-style list-style-image list-style-position list-style-type "
"margin margin-block margin-block-end margin-block-start margin-bottom margin-break "
Expand All @@ -67,22 +67,22 @@ static KEYWORDLIST Keywords_CSS = {{
"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-aspect-ratio max-block-size max-device-aspect-ratio max-device-height max-device-width max-height max-inline-size "
"max-lines max-resolution max-width max-zoom min-aspect-ratio min-block-size min-color "
"max-lines max-resolution max-width max-zoom min-aspect-ratio min-block-size "
"min-device-aspect-ratio min-device-height min-device-width min-height min-inline-size min-intrinsic-sizing "
"min-resolution min-width min-zoom mix-blend-mode monochrome "
"nav-controls nav-down nav-left nav-right nav-up negative "
"object-fit object-position offset offset-anchor offset-distance offset-path offset-position offset-rotate opacity "
"order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-anchor "
"overflow-block overflow-clip-margin "
"overflow-clip-margin-block-end overflow-clip-margin-block-start overflow-clip-margin-bottom "
"overflow-clip-margin-inline-end overflow-clip-margin-inline-start overflow-clip-margin-left overflow-clip-margin-right "
"overflow-clip-margin-top overflow-inline overflow-wrap overflow-x overflow-y override-colors "
"overflow-clip-margin-block overflow-clip-margin-block-end overflow-clip-margin-block-start overflow-clip-margin-bottom "
"overflow-clip-margin-inline overflow-clip-margin-inline-end overflow-clip-margin-inline-start overflow-clip-margin-left "
"overflow-clip-margin-right overflow-clip-margin-top overflow-inline overflow-wrap overflow-x overflow-y override-colors "
"overscroll-behavior overscroll-behavior-block overscroll-behavior-inline overscroll-behavior-x overscroll-behavior-y "
"pad padding padding-block padding-block-end padding-block-start padding-bottom "
"padding-inline padding-inline-end padding-inline-start padding-left padding-right padding-top "
"page page-break-after page-break-before page-break-inside page-orientation page-transition-tag "
"pause pause-after pause-before perspective perspective-origin pitch pitch-range "
"place-content place-items place-self play-during pointer pointer-events position "
"page page-break-after page-break-before page-break-inside page-orientation pause pause-after pause-before "
"perspective perspective-origin pitch pitch-range place-content place-items place-self play-during "
"pointer pointer-events position "
"prefers-color-scheme prefers-contrast prefers-reduced-data prefers-reduced-motion prefers-reduced-transparency prefix "
"presentation-level print-color-adjust "
"quotes "
Expand All @@ -96,30 +96,32 @@ static KEYWORDLIST Keywords_CSS = {{
"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 "
"scroll-timeline scroll-timeline-axis scroll-timeline-name scrollbar-color scrollbar-gutter scrollbar-width "
"shape shape-image-threshold shape-inside shape-margin shape-outside size size-adjust "
"spatial-navigation-action spatial-navigation-contain spatial-navigation-function "
"shape shape-image-threshold shape-inside shape-margin shape-outside shape-padding shape-rendering shape-subtract "
"size size-adjust spatial-navigation-action spatial-navigation-contain spatial-navigation-function "
"speak speak-as speak-header speak-numeral speak-punctuation speech-rate src stress string-set stroke "
"stroke-align stroke-alignment stroke-break stroke-color "
"stroke-dash-corner stroke-dash-justify stroke-dashadjust stroke-dasharray stroke-dashcorner stroke-dashoffset "
"stroke-image stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-origin stroke-position "
"stroke-repeat stroke-size stroke-width "
"subscript-position-override subscript-size-override suffix superscript-position-override superscript-size-override "
"symbols syntax system "
"tab-size table-layout text-align text-align-all text-align-last text-autospace text-combine-upright text-decoration "
"text-decoration-color text-decoration-line text-decoration-skip text-decoration-skip-box "
"text-decoration-skip-ink text-decoration-skip-inset text-decoration-skip-self text-decoration-skip-spaces "
"text-decoration-style text-decoration-thickness "
"text-edge text-emphasis text-emphasis-color text-emphasis-position text-emphasis-skip text-emphasis-style "
"text-group-align text-indent text-justify text-orientation text-overflow text-rendering "
"text-shadow text-size-adjust text-space-collapse text-space-trim text-spacing text-spacing-trim text-transform "
"tab-size table-layout text-align text-align-all text-align-last text-anchor text-autospace text-box-edge text-box-trim "
"text-combine-upright text-decoration text-decoration-color text-decoration-fill text-decoration-line "
"text-decoration-skip text-decoration-skip-box text-decoration-skip-ink text-decoration-skip-inset "
"text-decoration-skip-self text-decoration-skip-spaces text-decoration-stroke text-decoration-style "
"text-decoration-thickness text-decoration-trim "
"text-emphasis text-emphasis-color text-emphasis-position text-emphasis-skip text-emphasis-style text-group-align "
"text-indent text-justify text-orientation text-overflow text-rendering "
"text-shadow text-size-adjust text-spacing text-spacing-trim text-transform "
"text-underline-offset text-underline-position text-wrap top touch-action "
"transform transform-box transform-origin transform-style "
"transition transition-delay transition-duration transition-property transition-timing-function translate "
"unicode-bidi unicode-range update user-select user-zoom "
"vertical-align vertical-viewport-segments video-color-gamut video-dynamic-range "
"view-timeline view-timeline-axis view-timeline-inset view-timeline-name viewport-fit visibility "
"view-timeline view-timeline-axis view-timeline-inset view-timeline-name view-transition-name viewport-fit visibility "
"voice-balance voice-duration voice-family voice-pitch voice-range voice-rate voice-stress voice-volume volume "
"white-space widows width will-change word-boundary-detection word-boundary-expansion word-break word-spacing word-wrap "
"white-space white-space-collapse white-space-trim widows width will-change "
"word-boundary-detection word-boundary-expansion word-break word-spacing word-wrap "
"wrap-after wrap-before wrap-flow wrap-inside wrap-through writing-mode "
"z-index zoom "

Expand Down Expand Up @@ -185,9 +187,9 @@ static KEYWORDLIST Keywords_CSS = {{
"ch-width change( character-variant( checkbox child child( circle circle( clamp( clone close-quote coarse code "
"col-resize collapse collection "
"color( color-CBDT color-COLRv0 color-COLRv1 color-SVG color-burn color-contrast( color-dodge color-mix( color-sbix "
"column column-reverse common-ligatures compact compatible( complement( compress "
"condensed conic-gradient( content( content-box content-exists( context-menu contextual continuous contrast( convert( "
"copy cos( counter( counters( cover create crisp-edges crop cross cross-fade( crosshair css "
"column column-reverse common-ligatures compact compatible( complement( compress condensed conic-gradient( "
"content( content-box content-exists( contents context-menu contextual continuous contrast( convert( copy cos( "
"counter( counters( cover create crisp-edges crispEdges crop cross cross-fade( crosshair css "
"cubic-bezier( currentColor cursive custom cyclic "
"dark darken darken( dashed dashes data-uri( "
"decimal decimal-leading-zero deep-merge( deep-remove( default( dense desaturate( device-cmyk( "
Expand Down Expand Up @@ -229,7 +231,7 @@ static KEYWORDLIST Keywords_CSS = {{
"no-historical-ligature no-limit no-open-quote no-preference no-punctuation no-repeat nonzero normal not not-allowed "
"nowrap ns-resize nth( null numbers numeric nw-resize nwse-resize "
"objects oblique oklab( oklch( old oldstyle-nums once one only "
"opacity( opaque open-quote opentype optimizeLegibility optimizeSpeed or ordinal ornaments( "
"opacity( opaque open-quote opentype optimizeLegibility optimizeQuality optimizeSpeed or ordinal ornaments( "
"outer outset outside outside-shape over overlay overlay( overline "
"p3 padding-box paged paginate paint painted palettes pan-down pan-left pan-right pan-up pan-x pan-y parent parse( path( "
"percentage( perceptual perspective( petite-caps pi pi( pinch-zoom pixelated plaintext polygon( portrait pow( "
Expand All @@ -244,7 +246,7 @@ static KEYWORDLIST Keywords_CSS = {{
"ruby ruby-base ruby-base-container ruby-text ruby-text-container run-in running( "
"s-resize sRGB safe same sans-serif saturate( saturation saturation( "
"scale( scale-down scale3d( scaleX( scaleY( scaleZ( screen screen( scroll scroll( scroll-position se-resize searchfield "
"selector selector( self-end self-start semi-condensed semi-expanded separate separator( sepia( serif sesame "
"select( selector selector( self-end self-start semi-condensed semi-expanded separate separator( sepia( serif sesame "
"set( set-nth( shade( show sideways sideways-lr sideways-rl sign( silent simple-selectors( simplified sin( size( "
"skew( skewX( skewY( slash( slashed-zero slice slice( slider-horizontal slow slower "
"small small-caps small-caption smaller smooth snap snap-block snap-inline soft soft-light softlight( solid "
Expand Down
20 changes: 20 additions & 0 deletions tools/Misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,24 @@ def dump_all_css_properties(path, keyName, keyModule, keyUrl):
with open(path, 'w', encoding='utf-8', newline='\n') as fd:
fd.write('\n'.join(output))

def find_new_css_properties(properties, descriptors, lang, draft=True):
with open(properties, encoding='utf-8') as fd:
properties = json.load(fd)
properties = [item['property'] for item in properties if draft or item['status'] != 'ED']
with open(descriptors, encoding='utf-8') as fd:
descriptors = json.load(fd)
properties += [item['descriptor'] for item in descriptors if draft or item['status'] != 'ED']
properties = set(properties)
with open(lang, encoding='utf-8') as fd:
doc = fd.read()
existing = set(re.findall(r'$\s*([\w\-]+):', doc, re.MULTILINE))
existing -= set('''grid-column-gap grid-gap grid-row-gap
max-aspect-ratio max-device-aspect-ratio max-device-height max-device-width max-resolution
min-aspect-ratio min-device-aspect-ratio min-device-height min-device-width min-resolution
'''.split())
print('new css properties:', ', '.join(sorted(properties - existing)))
print('unknown css properties:', ', '.join(sorted(existing - properties)))

def group_powershell_commands(path):
# group Get-Command output by module
commands = {}
Expand Down Expand Up @@ -220,4 +238,6 @@ def find_new_texinfo_commands(path, lang):
#dump_all_css_properties('all-properties.en.json', 'property', 'title', 'url')
# https://www.w3.org/Style/CSS/all-descriptors.en.json
#dump_all_css_properties('all-descriptors.en.json', 'descriptor', 'specification', 'URL')
#find_new_css_properties('all-properties.en.json', 'all-descriptors.en.json', 'lang/CSS.css')

#find_new_texinfo_commands(r'texinfo.texi', 'lang/Texinfo.texi')
Loading

0 comments on commit 4bcd911

Please sign in to comment.