Skip to content

Commit

Permalink
Text files for release 3.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed May 30, 2021
1 parent 985555e commit a6b629d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 59 deletions.
64 changes: 5 additions & 59 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,16 @@
CSS4J RELEASE NOTES
===================

Release 3.4.0 - February 28, 2021
---------------------------------
Release 3.5.0 - May 30, 2021
----------------------------

Release Highlights
------------------
* Support for lab() and lch() color functions.

The lab() and lch() functions are finally landing in Webkit, and the other
major browsers have shown interest in implementing them (although it may still
take some time).
* Gradle build.

The usage of these functions in a toolchain with the typical Java open source
tools (which tend to use the sRGB default color space) could be problematic,
as lab() and lch() are often specified out of that gamut, but an accurate RGB
clamping method is provided.


* Customizable serialization of computed styles.

Now you can control the serialization of computed styles thanks to a new
factory method:
StyleFormattingFactory.createComputedStyleFormattingContext(),
which returns a DeclarationFormattingContext.

A non-default implementation of that interface, called
RGBStyleFormattingFactory, is provided for the convenience of users that can
only deal with rgb colors in computed styles (for example those feeding CSS4J
computed styles into Apache FOP). Basically, it allows to use CSS with Lab,
LCh or Hsl colors and then convert them to RGB at the computed-style stage.


* CSSOM: make the old rgb(a) color functional serialization with commas the
default for color conversions to RGB.

When parsing, the library uses the same RGB format that was specified. That
is, if the input was a rgba() function with commas, it serialized that way.
However, when other types of colors were converted to RGB, it defaulted to the
modern format without the commas. That default was not the most adequate
though:

1) According to the 2020 Web Almanac, "99.89% of functionally specified sRGB
colors are using the since-forever legacy format with commas [...] rather
than the new comma-less form".

2) XSL:FO uses the old format with commas, see
https://www.w3.org/TR/xsl/#expr-color-functions


* Added method match(CSSValueSyntax) to both LexicalUnit and CSSValue.

This allows checking the grammar of values against specific syntaxes like
<length>+, <string>#, <transform-function> or <unicode-range>#.


* Support registered custom properties (including @property rules) from CSS
Properties and Values API Level 1.

The rule (that currently only works in Chrome/Blink) allows to customize the
behaviour of custom properties.


* DOM: add the DOMNode.removeAllChild() convenience method.

AFAIK no other DOM implementation contains this useful method.
The project is now built by Gradle instead of Maven. It is no longer necessary
to manually install the dependencies that are not available in Maven Central.


Description
Expand Down
6 changes: 6 additions & 0 deletions UPGRADING.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
UPGRADING FROM PREVIOUS VERSIONS
================================

Upgrading to 3.5 from 3.4
-------------------------
- NSAC only: now all custom properties are handled through
CSSHandler.lexicalProperty(...).


Upgrading to 3.4 from 3.3
-------------------------
- The old rgb(a) color functional serialization with commas is now the default
Expand Down

0 comments on commit a6b629d

Please sign in to comment.