22 CSS4J RELEASE NOTES
33 ===================
44
5- Release 3.3 .0 - January 5 , 2021
6- -------------------------------
5+ Release 3.4 .0 - February 26 , 2021
6+ ---------------------------------
77
88Release Highlights
99------------------
10- This release changes the visibility of one class needed by the EchoSVG software
11- but also has a couple of interesting additions:
10+ * Support for lab() and lch() color functions.
1211
13- - DOM: new Element.getInnerText().
14- - CSSOM: support the :dir() pseudo-class in computed styles, important for users
15- of arabic and other right-to-left languages.
12+ The lab() and lch() functions are finally landing in Webkit, and the other
13+ major browsers have shown interest in implementing them (although it may still
14+ take some time).
15+
16+ The usage of these functions in a toolchain with the typical Java open source
17+ tools (which tend to use the sRGB default color space) could be problematic,
18+ as lab() and lch() are often specified out of that gamut, but an accurate RGB
19+ clamping method is provided.
20+
21+
22+ * Customizable serialization of computed styles.
23+
24+ Now you can control the serialization of computed styles thanks to a new
25+ factory method:
26+ StyleFormattingFactory.createComputedStyleFormattingContext(),
27+ which returns a DeclarationFormattingContext.
28+
29+ A non-default implementation of that interface, called
30+ RGBStyleFormattingFactory, is provided for the convenience of users that can
31+ only deal with rgb colors in computed styles (for example those feeding CSS4J
32+ computed styles into Apache FOP). Basically, it allows to use CSS with Lab,
33+ LCh or Hsl colors and then convert them to RGB at the computed-style stage.
34+
35+
36+ * CSSOM: make the old rgb(a) color functional serialization with commas the
37+ default for color conversions to RGB.
38+
39+ When parsing, the library uses the same RGB format that was specified. That
40+ is, if the input was a rgba() function with commas, it serialized that way.
41+ However, when other types of colors were converted to RGB, it defaulted to the
42+ modern format without the commas. That default was not the most adequate
43+ though:
44+
45+ 1) According to the 2020 Web Almanac, "99.89% of functionally specified sRGB
46+ colors are using the since-forever legacy format with commas [...] rather
47+ than the new comma-less form".
48+
49+ 2) XSL:FO uses the old format with commas, see
50+ https://www.w3.org/TR/xsl/#expr-color-functions
51+
52+
53+ * Added method match(CSSValueSyntax) to both LexicalUnit and CSSValue.
54+
55+ This allows checking the grammar of values against specific syntaxes like
56+ <length>+, <string>#, <transform-function> or <unicode-range>#.
57+
58+
59+ * Support registered custom properties (including @property rules) from CSS
60+ Properties and Values API Level 1.
61+
62+ The rule (that currently only works in Chrome/Blink) allows to customize the
63+ behaviour of custom properties.
64+
65+
66+ * DOM: add the DOMNode.removeAllChild() convenience method.
67+
68+ AFAIK no other DOM implementation contains this useful method.
1669
1770
1871Description
@@ -78,21 +131,23 @@ by the experimental visual formatting model. The following table summarizes
78131the basic support for setting/retrieving the main CSS level 3/4 features (other
79132specifications are also supported):
80133 ___________________________________________
81- | CSS3 Spec Name | Support |
134+ | CSS Spec Name | Support |
82135 |-----------------------------|-------------|
83136 | Background / Border | Yes |
84- | Color | Yes |
85- | Media Queries | Partial (1 ) |
137+ | Color | Partial (1) |
138+ | Media Queries | Partial (2 ) |
86139 | Selectors | Yes |
87140 | Transitions | Yes |
88141 | Values | Yes |
89- | Grid / Template / Alignment | Partial (2) |
142+ | Properties and Values API | Yes |
143+ | Grid / Template / Alignment | Partial (3) |
90144 |_____________________________|_____________|
91145Notes:
92- 1) Event handling with addListener/removeListener is not supported, given that
146+ 1) Level 3 is supported, level 4 partially.
147+ 2) Event handling with addListener/removeListener is not supported, given that
93148the library's user is supposed to be in control of the CSSCanvas instances where
94149the information about such events should be available.
95- 2 ) Legacy gap properties (grid-row-gap, grid-column-gap, and grid-gap) are not
150+ 3 ) Legacy gap properties (grid-row-gap, grid-column-gap, and grid-gap) are not
96151supported, although the longhands can be used if declared explicitly).
97152
98153
@@ -110,7 +165,7 @@ Software dependencies
110165
111166 To build this library you need:
112167
113- - The JCLF package. Version 4 .0.4 or higher is required. Go to
168+ - The jclf-text module; version 5 .0.0 or higher is required. Go to
114169 https://sourceforge.net/projects/jclf for downloads, or install with the
115170 release-scripts/install-jclf.sh script.
116171
0 commit comments