Skip to content

Commit

Permalink
adding percentage as an option in alpha-value, angle as an option in …
Browse files Browse the repository at this point in the history
…hue, and alpha-value as an optional fourth parameter in hsl() and rgb(), as per CSS4 color
  • Loading branch information
chrisdavidmills committed Jan 25, 2017
1 parent 0492381 commit b021178
Showing 1 changed file with 15 additions and 55 deletions.
70 changes: 15 additions & 55 deletions css/syntaxes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"absolute-size": "xx-small | x-small | small | medium | large | x-large | xx-large",
"alpha-value": "<number>",
"alpha-value": "<number> | <percentage>",
"an-plus-b": "<var>A</var>n+<var>B</var> | even | odd",
"angle-percentage": "&lt;angle&gt; | &lt;percentage&gt;",
"animateable-feature": "scroll-position | contents | &lt;custom-ident&gt;",
Expand All @@ -13,7 +13,6 @@
"bg-layer": "&lt;bg-image&gt; || &lt;position&gt; [ / &lt;bg-size&gt; ]? || &lt;repeat-style&gt; || &lt;attachment&gt; || &lt;box&gt;{1,2}",
"bg-size": "[ &lt;length-percentage&gt; | auto ]{1,2} | cover | contain",
"blur()": "blur( &lt;length&gt; )",
"blend-mode": "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity",
"box": "border-box | padding-box | content-box",
"br-style": "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset",
"br-width": "&lt;length&gt; | thin | medium | thick",
Expand All @@ -33,7 +32,6 @@
"composite-style": "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor",
"compositing-operator": "add | subtract | intersect | exclude",
"contextual-alt-values": "[ contextual | no-contextual ]",
"content-list": "[ &lt;string&gt; | contents | &lt;url&gt; | &lt;quote&gt; | document-url | &lt;target&gt; | &lt;leader()&gt; ]+",
"contrast()": "contrast( [ &lt;number-percentage&gt; ] )",
"counter-style": "&lt;counter-style-name&gt; | symbols()",
"counter-style-name": "&lt;custom-ident&gt;",
Expand All @@ -47,35 +45,28 @@
"ellipse()": "ellipse( [ &lt;shape-radius&gt;{2} ]? [ at &lt;position&gt; ]? )",
"ending-shape": "circle | ellipse",
"explicit-track-list": "[ &lt;line-names&gt;? &lt;track-size&gt; ]+ &lt;line-names&gt;?",
"family-name": "&lt;string&gt; | &lt;custom-ident&gt;+",
"family-name": "&lt;string&gt; | &lt;IDENT&gt;+",
"feature-tag-value": "&lt;string&gt; [ &lt;integer&gt; | on | off ]?",
"feature-type": "@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation",
"feature-value-block": "&lt;feature-type&gt; {\n &lt;feature-value-declaration-list&gt;\n}",
"feature-value-block-list": "&lt;feature-value-block&gt;+",
"feature-value-declaration": "&lt;custom-ident&gt;: &lt;integer&gt;+;",
"feature-value-declaration-list": "&lt;feature-value-declaration&gt;",
"feature-value-name": "&lt;custom-ident&gt;",
"feature-value-name": "IDENT",
"fill-rule": "nonzero | evenodd",
"filter-function": "&lt;blur()&gt; | &lt;brightness()&gt; | &lt;contrast()&gt; | &lt;drop-shadow()&gt; | &lt;grayscale()&gt; | &lt;hue-rotate()&gt; | &lt;invert()&gt; | &lt;opacity()&gt; | &lt;sepia()&gt; | &lt;saturate()&gt;",
"filter-function-list": "[ &lt;filter-function&gt; | &lt;url&gt; ]+",
"final-bg-layer": "&lt;bg-image&gt; || &lt;position&gt; [ / &lt;bg-size&gt; ]? || &lt;repeat-style&gt; || &lt;attachment&gt; || &lt;box&gt; || &lt;box&gt; || &lt;'background-color'&gt;",
"fit-content()": "fit-content( [ &lt;length&gt; | &lt;percentage&gt; ] )",
"fixed-breadth": "&lt;length-percentage&gt;",
"fixed-repeat": "repeat( [ &lt;positive-integer&gt; ] , [ &lt;line-names&gt;? &lt;fixed-size&gt; ]+ &lt;line-names&gt;? )",
"fixed-size": "&lt;fixed-breadth&gt; | minmax( &lt;fixed-breadth&gt; , &lt;track-breadth&gt; ) | minmax( &lt;inflexible-breadth&gt; , &lt;fixed-breadth&gt; )",
"font-variant-css21": "[ normal | small-caps ]",
"frequency-percentage": "&lt;frequency&gt; | &lt;percentage&gt;",
"general-enclosed": "[ &lt;function-token&gt; &lt;any-value&gt; ) ] | ( &lt;ident&gt; &lt;any-value&gt; )",
"generic-family": "serif | sans-serif | cursive | fantasy | monospace",
"generic-name": "serif | sans-serif | cursive | fantasy | monospace",
"geometry-box": "&lt;shape-box&gt; | fill-box | stroke-box | view-box",
"gradient": "&lt;linear-gradient()&gt; | &lt;repeating-linear-gradient()&gt; | &lt;radial-gradient()&gt; | &lt;repeating-radial-gradient()&gt;",
"grayscale()": "grayscale( &lt;number-percentage&gt; )",
"grid-line": "auto | &lt;custom-ident&gt; | [ &lt;integer&gt; &amp;&amp; &lt;custom-ident&gt;? ] | [ span &amp;&amp; [ &lt;integer&gt; || &lt;custom-ident&gt; ] ]",
"historical-lig-values": "[ historical-ligatures | no-historical-ligatures ]",
"hsl()": "hsl( &lt;hue&gt;, &lt;percentage&gt;, &lt;percentage&gt; )",
"hsla()": "hsla( &lt;hue&gt;, &lt;percentage&gt;, &lt;percentage&gt;, &lt;alpha-value&gt; )",
"hue": "&lt;number&gt;",
"hsl()": "hsl( &lt;hue&gt;, &lt;percentage&gt;, &lt;percentage&gt; , &lt;alpha-value&gt;? )",
"hsla()": "hsla( &lt;hue&gt;, &lt;percentage&gt;, &lt;percentage&gt; , &lt;alpha-value&gt; )",
"hue": "&lt;number&gt; | &lt;angle&gt;",
"hue-rotate()": "hue-rotate( &lt;angle&gt; )",
"image": "&lt;url&gt; | &lt;image()&gt; | &lt;image-set()&gt; | &lt;element()&gt; | &lt;cross-fade()&gt; | &lt;gradient&gt;",
"image()": "image( [ [ &lt;image&gt; | &lt;string&gt; ]? , &lt;color&gt;? ]! )",
Expand All @@ -84,61 +75,33 @@
"inflexible-breadth": "&lt;length&gt; | &lt;percentage&gt; | min-content | max-content | auto",
"inset()": "inset( &lt;length-percentage&gt;{1,4} [ round &lt;border-radius&gt; ]? )",
"invert()": "invert( &lt;number-percentage&gt; )",
"keyframes-name": "&lt;custom-ident&gt; | &lt;string&gt;",
"keyframe-block": "&lt;keyframe-selector&gt;# {\n &lt;declaration-list&gt;\n}",
"keyframe-block-list": "&lt;keyframe-block&gt;+",
"keyframe-selector": "from | to | &lt;percentage&gt;",
"leader()": "leader( dotted | solid | space | &lt;string&gt; )",
"length-percentage": "&lt;length&gt; | &lt;percentage&gt;",
"line-names": "'[' &lt;custom-ident&gt;* ']'",
"line-name-list": "[ &lt;line-names&gt; | &lt;name-repeat&gt; ]+",
"linear-gradient()": "linear-gradient( [ &lt;angle&gt; | to &lt;side-or-corner&gt; ]? , &lt;color-stop-list&gt; )",
"mask-layer": "&lt;mask-reference&gt; &lt;masking-mode&gt;? || &lt;position&gt; [ / &lt;bg-size&gt; ]? || &lt;repeat-style&gt; || &lt;geometry-box&gt; || [ &lt;geometry-box&gt; | no-clip ] || &lt;compositing-operator&gt;",
"mask-position": "[ &lt;length-percentage&gt; | left | center | right ] [ &lt;length-percentage&gt; | top | center | bottom ]?",
"mask-position": "[ &lt;length-percentage&gt; | left | center | right ] [ &lt;length-percentage&gt; | top | center | bottom ]?",
"mask-reference": "none | &lt;image&gt; | &lt;mask-source&gt;",
"mask-source": "&lt;url&gt;",
"masking-mode": "alpha | luminance | match-source",
"matrix()": "matrix( &lt;number&gt; [, &lt;number&gt; ]{5,5} )",
"matrix3d()": "matrix3d( &lt;number&gt; [, &lt;number&gt; ]{15,15} )",
"media-and": "&lt;media-in-parens&gt; [ and &lt;media-in-parens&gt; ]+",
"media-condition": "&lt;media-not&gt; | &lt;media-and&gt; | &lt;media-or&gt; | &lt;media-in-parens&gt;",
"media-condition-without-or": "&lt;media-not&gt; | &lt;media-and&gt; | &lt;media-in-parens&gt;",
"media-feature": "( [ &lt;mf-plain&gt; | &lt;mf-boolean&gt; | &lt;mf-range&gt; ] )",
"media-in-parens": "( &lt;media-condition&gt; ) | &lt;media-feature&gt; | &lt;general-enclosed&gt;",
"media-not": "not &lt;media-in-parens&gt;",
"media-or": "&lt;media-in-parens&gt; [ or &lt;media-in-parens&gt; ]+",
"media-query": "&lt;media-condition&gt; | [ not | only ]? &lt;media-type&gt; [ and &lt;media-condition-without-or&gt; ]?",
"media-query-list": "&lt;media-query&gt;#",
"media-type": "&lt;ident&gt;",
"mf-boolean": "&lt;mf-name&gt;",
"mf-name": "&lt;ident&gt;",
"mf-plain": "&lt;mf-name&gt; : &lt;mf-value&gt;",
"mf-range": "&lt;mf-name&gt; [ '&lt;' | '&gt;' ]? '='? &lt;mf-value&gt;\n| &lt;mf-value&gt; [ '&lt;' | '&gt;' ]? '='? &lt;mf-name&gt;\n| &lt;mf-value&gt; '&lt;' '='? &lt;mf-name&gt; '&lt;' '='? &lt;mf-value&gt;\n| &lt;mf-value&gt; '&gt;' '='? &lt;mf-name&gt; '&gt;' '='? &lt;mf-value&gt;",
"mf-value": "&lt;number&gt; | &lt;dimension&gt; | &lt;ident&gt; | &lt;ratio&gt;",
"minmax()": "minmax( <var>min</var>, <var>max</var> )",
"named-color": "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen",
"namespace-prefix": "&lt;ident&gt;",
"named-color": "&lt;ident&gt;",
"namespace-prefix": "IDENT",
"number-percentage": "&lt;number&gt; | &lt;percentage&gt;",
"numeric-figure-values": "[ lining-nums | oldstyle-nums ]",
"numeric-fraction-values": "[ diagonal-fractions | stacked-fractions ]",
"numeric-spacing-values": "[ proportional-nums | tabular-nums ]",
"opacity()": "opacity( [ &lt;number-percentage&gt; ] )",
"page-body": "&lt;declaration&gt;? [ ; &lt;page-body&gt; ]? | &lt;page-margin-box&gt; &lt;page-body&gt;",
"page-margin-box": "&lt;page-margin-box-type&gt; {\n &lt;declaration-list&gt;\n}",
"page-margin-box-type": "@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom",
"page-selector-list": "[ &lt;page-selector&gt;# ]?",
"page-selector": "&lt;pseudo-page&gt;+ | &lt;ident&gt; &lt;pseudo-page&gt;*",
"perspective()": "perspective( &lt;length&gt; )",
"polygon()": "polygon( &lt;fill-rule&gt;? , [ &lt;length-percentage&gt; &lt;length-percentage&gt; ]# )",
"position": "[[ left | center | right | top | bottom | &lt;length-percentage&gt; ] | [ left | center | right | &lt;length-percentage&gt; ] [ top | center | bottom | &lt;length-percentage&gt; ] | [ center | [ left | right ] &lt;length-percentage&gt;? ] &amp;&amp; [ center | [ top | bottom ] &lt;length-percentage&gt;? ]]",
"pseudo-page": ": [ left | right | first | blank ]",
"quote": "open-quote | close-quote | no-open-quote | no-close-quote",
"radial-gradient()": "radial-gradient( [ &lt;ending-shape&gt; || &lt;size&gt; ]? [ at &lt;position&gt; ]? , &lt;color-stop-list&gt; )",
"relative-size": "larger | smaller",
"repeat-style": "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}",
"repeating-linear-gradient()": "repeating-linear-gradient( [ &lt;angle&gt; | to &lt;side-or-corner&gt; ]? , &lt;color-stop-list&gt; )",
"repeating-radial-gradient()": "repeating-radial-gradient( [ &lt;ending-shape&gt; || &lt;size&gt; ]? [ at &lt;position&gt; ]? , &lt;color-stop-list&gt; )",
"rgb()": "rgb( &lt;rgb-component&gt;#{3} )",
"rgb()": "rgb( &lt;rgb-component&gt;#{3} , &lt;alpha-value&gt;? )",
"rgb-component": "&lt;integer&gt; | &lt;percentage&gt;",
"rgba()": "rgba( &lt;rgb-component&gt;#{3} , &lt;alpha-value&gt; )",
"rotate()": "rotate( &lt;angle&gt; )",
Expand All @@ -148,7 +111,7 @@
"rotateZ()": "rotateZ( &lt;angle&gt; )",
"saturate()": "saturate( &lt;number-percentage&gt; )",
"scale()": "scale( &lt;number&gt; [, &lt;number&gt; ]? )",
"scale3d()": "scale3d( &lt;number&gt; , &lt;number&gt; , &lt;number&gt; )",
"scale3d()": "scale3d( &lt;number&gt; , &lt;number&gt;, &lt;number&gt; )",
"scaleX()": "scaleX( &lt;number&gt; )",
"scaleY()": "scaleY( &lt;number&gt; )",
"scaleZ()": "scaleZ( &lt;number&gt; )",
Expand All @@ -162,21 +125,18 @@
"shape": "rect(&lt;top&gt;, &lt;right&gt;, &lt;bottom&gt;, &lt;left&gt;)",
"shape-box": "&lt;box&gt; | margin-box",
"side-or-corner": "[ left | right ] || [ top | bottom ]",
"single-animation": "&lt;time&gt; || &lt;single-timing-function&gt; || &lt;time&gt; || &lt;single-animation-iteration-count&gt; || &lt;single-animation-direction&gt; || &lt;single-animation-fill-mode&gt; || &lt;single-animation-play-state&gt; || [ none | &lt;keyframes-name&gt; ]",
"single-animation": "&lt;time&gt; || &lt;single-timing-function&gt; || &lt;time&gt; || &lt;single-animation-iteration-count&gt; || &lt;single-animation-direction&gt; || &lt;single-animation-fill-mode&gt; || &lt;single-animation-play-state&gt; || &lt;single-animation-name&gt;",
"single-animation-direction": "normal | reverse | alternate | alternate-reverse",
"single-animation-fill-mode": "none | forwards | backwards | both",
"single-animation-iteration-count": "infinite | &lt;number&gt;",
"single-animation-name": "none | IDENT",
"single-animation-play-state": "running | paused",
"single-timing-function": "&lt;single-transition-timing-function&gt;",
"single-transition": "[ none | &lt;single-transition-property&gt; ] || &lt;time&gt; || &lt;single-transition-timing-function&gt; || &lt;time&gt;",
"single-transition-timing-function": "ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps( &lt;integer&gt; [, [ start | end ] ]? ) | cubic-bezier( &lt;number&gt;, &lt;number&gt;, &lt;number&gt;, &lt;number&gt; )",
"single-transition-property": "all | &lt;custom-ident&gt;",
"single-transition-timing-function": "ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(&lt;integer&gt;[, [ start | end ] ]?) | cubic-bezier(&lt;number&gt;, &lt;number&gt;, &lt;number&gt;, &lt;number&gt;)",
"single-transition-property": "all | IDENT",
"size": "closest-side | farthest-side | closest-corner | farthest-corner | &lt;length&gt; | &lt;length-percentage&gt;{2}",
"symbol": "&lt;string&gt; | &lt;image&gt; | &lt;ident&gt;",
"target": "&lt;target-counter()&gt; | &lt;target-counters()&gt; | &lt;target-text()&gt;",
"target-counter()": "target-counter( [ &lt;string&gt; | &lt;url&gt; ] , &lt;custom-ident&gt; [, &lt;counter-style&gt; ]? )",
"target-counters()": "target-counters( [ &lt;string&gt; | &lt;url&gt; ] , &lt;custom-ident&gt; , &lt;string&gt; [, &lt;counter-style&gt; ]? )",
"target-text()": "target-text( [ &lt;string&gt; | &lt;url&gt; ] [, [ content | before | after | first-letter ] ]? )",
"time-percentage": "&lt;time&gt; | &lt;percentage&gt;",
"track-breadth": "&lt;length-percentage&gt; | &lt;flex&gt; | min-content | max-content | auto",
"track-list": "[ &lt;line-names&gt;? [ &lt;track-size&gt; | &lt;track-repeat&gt; ] ]+ &lt;line-names&gt;?",
Expand Down

3 comments on commit b021178

@SebastianZ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, obviously something went totally wrong here. I assume you committed your changes from an older branch and didn't rebase it before merging it into master (which shouldn't be done directly).

Sebastian

@chrisdavidmills
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, dammnit. I didn't remove any of the extra stuff that is removed here. I only updated alpha-value, hue, hsl() and rgb(). I'm positive I updated the repo before I submitted my changes ;-( Ooooh, I hate Git so much.

So how do I reverse these changes?

And how do I make sure this doesn't happen again?

@SebastianZ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already created PR #38 to revert the changes.

I'm not a champ in git myself, so I'm not sure what happened in this case. What I do is to create a branch for every change I make and rebase it on origin/master when there were commits to master in the meantime.

When #38 is merged, we can apply your changes again.

Sebastian

Please sign in to comment.