Skip to content

Commit 800f6d8

Browse files
committed
Release Notes and Upgrading for 3.4.0.
1 parent 65ec25b commit 800f6d8

File tree

2 files changed

+81
-17
lines changed

2 files changed

+81
-17
lines changed

RELEASE_NOTES.txt

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,70 @@
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

88
Release 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

1871
Description
@@ -78,21 +131,23 @@ by the experimental visual formatting model. The following table summarizes
78131
the basic support for setting/retrieving the main CSS level 3/4 features (other
79132
specifications 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
|_____________________________|_____________|
91145
Notes:
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
93148
the library's user is supposed to be in control of the CSSCanvas instances where
94149
the 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
96151
supported, 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

UPGRADING.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ UPGRADING FROM PREVIOUS VERSIONS
33

44
Upgrading to 3.4 from 3.3
55
-------------------------
6-
- The old rgb(a) color functional serialization with commas is now the default.
7-
- In CSSColorValue, ColorSpace was renamed to ColorModel. No deprecation step
8-
this time, as 'ColorSpace' is to be used elsewhere.
6+
- The old rgb(a) color functional serialization with commas is now the default
7+
for conversions to RGB (specified RGB values always kept the original syntax)
8+
.
9+
- In CSSColorValue, ColorSpace was renamed to ColorModel. No deprecation step
10+
this time, as 'ColorSpace' is to be used elsewhere.
11+
- CSSTypedValue.toRGBColorValue() was deprecated in favor of toRGBColor().
12+
- Use new CSSColorValue.getColor() to access all colors.
13+
- New StyleFormattingFactory.createComputedStyleFormattingContext() method
14+
returns a new DeclarationFormattingContext.
15+
- Removed method newLine(SimpleWriter) from DeclarationFormattingContext
16+
interface.
17+
- NSAC only: new method CSSHandler.lexicalProperty(...).
918

1019

1120
Upgrading to 3.3 from 3.2

0 commit comments

Comments
 (0)