:white_small_square: Color :arrow_forward: rgb and rgba functions
:construction:
:white_small_square: Color :arrow_forward: hexadecimal
:construction:
:white_small_square: Color :arrow_forward: hsl and hsla functions
:thinking:
:white_small_square: Color :arrow_forward: color function
:thinking:
Backgrounds and Borders
Images
Fonts
Writing Modes
Multi_column
Flexible Box
User Interface
Containment
Transforms
Compositing and Blending
Easing Functions
Counter Styles
...
JDK CSS Parser : (Documentation comments of CSSParser.java)
A CSS parser. This works by way of a delegate that implements the CSSParserCallback interface. The delegate is notified of the following events:
Import statement: handleImport
Selectors handleSelector. This is invoked for each
string. For example if the Reader contained p, bar , a {}, the delegate
would be notified 4 times, for 'p,' 'bar' ',' and 'a'.
When a rule starts, startRule
Properties in the rule via the handleProperty. This
is invoked one per property/value key, eg font size: foo;, would
cause the delegate to be notified once with a value of 'font size'.
Values in the rule via the handleValue, this is notified
for the total value.
When a rule ends, endRule
This will parse much more than CSS 1, and loosely implements the recommendation for Forward-compatible parsing in section 7.1 of the CSS spec found at : http://www.w3.org/TR/REC-CSS1.
If an error results in parsing, a RuntimeException will be thrown.
This will preserve case. If the callback wishes to treat certain portions case insensitively (such as selectors), it should use toLowerCase, or something similar.
Parsing something like the following :
`(@rule | ruleset | block)*`
|Terminal||Definition|Comments|
|----|----|----|----|
| `<@rule>`|` ::=`|` ( \| )*;`| (block with `{` `}` ends @rule)|
| ``|` ::=`| |`matching [] () {} (that is, [()] is a block, [(){}{[]}] is a block, ()[] is two blocks)|
| ``|` ::=`|` "*" \| '*' \| anything but a [](){} and whitespace`|
| ``|` ::=`|` `|
| ``|` ::=`|`( (, except block '{}') )*`|
| ``|` ::=`|`* *`|
| ``|`::=`|` (* stopping when identifier ends with :)` `(* stopping when identifier ends with ;)`
| ``|`::=`|` /* */`|` can appear any where, and are stripped.`
| ``|`::=`|`- letters, digits, dashes and escaped characters`
- block starts with {, ends with matching },
- () [] and {} always occur in matching pairs, `'` `'` and `"` `"` also occur in pairs, except " may be
## Notes :
- During the parsing process :
- Leading and trailing white-spaces (according to Java) in the argument string were removed.
- Inside `()` multiple white-space (according to Java) occurences are replaced by only one space character.
- white-spaces (according to Java) between `rgb` or `rgba` and `(` are removed.
- Through `WSRead()` method, CSSParser.java strips white spaces.
- White space according to Java, see [Character Java specifications](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/Character.html#isWhitespace(int)).
- Trough `parseDeclaration()`, CSSParser.java make the property name to lower case.
## JDK StyleSheet CSS Parser : (Documentation comments of StyleSheet.CssParser)
CssParser is the default parser for CSS specifications that get loaded into the StyleSheet.
Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents.
The state of art
The state of art is defined by CSS Snapshots : The “CSS Snapshot” lists the parts that are ready for implementers.
These snapshots are references to CSS Modules :
rgb
andrgba
functionshsl
andhsla
functionscolor
functionJDK CSS Parser : (Documentation comments of CSSParser.java)
A CSS parser. This works by way of a delegate that implements the CSSParserCallback interface. The delegate is notified of the following events:
handleImport
handleSelector
. This is invoked for each string. For example if the Reader contained p, bar , a {}, the delegate would be notified 4 times, for 'p,' 'bar' ',' and 'a'.startRule
handleProperty
. This is invoked one per property/value key, eg font size: foo;, would cause the delegate to be notified once with a value of 'font size'.handleValue
, this is notified for the total value.endRule
This will parse much more than CSS 1, and loosely implements the recommendation for Forward-compatible parsing in section 7.1 of the CSS spec found at : http://www.w3.org/TR/REC-CSS1. If an error results in parsing, a RuntimeException will be thrown.
This will preserve case. If the callback wishes to treat certain portions case insensitively (such as selectors), it should use toLowerCase, or something similar. Parsing something like the following : `(@rule | ruleset | block)*` |Terminal||Definition|Comments| |----|----|----|----| | `<@rule>`|` ::=`|` ( \| )*;`| (block with `{` `}` ends @rule)|
| ``|` ::=`| |`matching [] () {} (that is, [()] is a block, [(){}{[]}] is a block, ()[] is two blocks)|
| ``|` ::=`|` "*" \| '*' \| anything but a [](){} and whitespace`|
| ``|` ::=`|` `|
| ``|` ::=`|`( (, except block '{}') )*`|
| ``|` ::=`|`* *`|
| ``|`::=`|` (* stopping when identifier ends with :)` `(* stopping when identifier ends with ;)`
| ``|`::=`|` /* */`|` can appear any where, and are stripped.`
| ``|`::=`|`- letters, digits, dashes and escaped characters`
- block starts with {, ends with matching },
- () [] and {} always occur in matching pairs, `'` `'` and `"` `"` also occur in pairs, except " may be
## Notes :
- During the parsing process :
- Leading and trailing white-spaces (according to Java) in the argument string were removed.
- Inside `()` multiple white-space (according to Java) occurences are replaced by only one space character.
- white-spaces (according to Java) between `rgb` or `rgba` and `(` are removed.
- Through `WSRead()` method, CSSParser.java strips white spaces.
- White space according to Java, see [Character Java specifications](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/Character.html#isWhitespace(int)).
- Trough `parseDeclaration()`, CSSParser.java make the property name to lower case.
## JDK StyleSheet CSS Parser : (Documentation comments of StyleSheet.CssParser)
CssParser is the default parser for CSS specifications that get loaded into the StyleSheet.