Skip to content

Commit be133a5

Browse files
committed
Release 5.2
1 parent 633f5a6 commit be133a5

File tree

2 files changed

+32
-39
lines changed

2 files changed

+32
-39
lines changed

RELEASE_NOTES.md

+31-38
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,51 @@
1-
# css4j version 5.1 Release Notes
1+
# css4j version 5.2 Release Notes
22

3-
### January 24, 2025
3+
### February 23, 2025
44

55
<br/>
66

77
## Highlights
88

9-
### Advanced attr() values
9+
### Better handling of mathematical functions
1010

11-
The advanced `attr()` support now follows the current Values Level 5 specification.
11+
The handling of mathematical functions is now much faster, and the `round`, `mod`, `rem`, `log` and `exp` functions from Values 4 were implemented.
1212

13-
Although this library has supported the advanced `attr()` value for years now,
14-
it was implementing an old version of the specification which is substantially
15-
different to the current one. The new spec is so recent that the old one is
16-
still used by at least one CSS specification (CSS Lists 3) in their sample style
17-
sheet for HTML.
13+
The library is now on parity with the CSS numeric functions supported by modern web browsers.
1814

19-
This library should be compatible with the `attr()` which is shipped with the
20-
forthcoming Google Chrome 133.
15+
### `src()` values
2116

22-
The old `CSSAttrValue` and `AttrValue` classes were removed, as the API is
23-
incompatible with the new specification that is being implemented by browsers.
17+
The `src()` function is now considered a valid URL value, and therefore matches `<url>` and `<image>`.
2418

25-
### More compliant registered custom properties
19+
### Update of `background` and `mask` shorthands
2620

27-
Also, the handling of registered custom properties is now closer to the Google
28-
Chrome behaviour: registered initial values take precedence over the fallbacks.
21+
Both shorthand properties now behave according to the latest specification, supporting all the new identifiers in `background-clip` and `mask-clip`.
2922

30-
#### Circularity behaviour changed
23+
### Values of `border-width` identifiers
3124

32-
On the other hand, when `var()` circularities (and other apparent DoS attacks)
33-
are found, it is no longer attempted to use the supplied property fallbacks.
25+
The main browsers consistently use the same figures for the computed values of border-width's `thin`, `thick` and `medium` identifiers, which were subsequently defined in May 2022.
3426

35-
It has been found that some websites send content with, for example,
36-
`--foo:var(--foo,fallback)` circularities to non-browser user agents, in what
37-
could be a strategy against web crawlers. Due to the kind of use cases that this
38-
library has, it was determined that it is preferable to just report the
39-
circularity and invalidate the whole value.
40-
41-
If your use case is negatively affected by this decision, please open an issue.
27+
This leads to the deprecation of `StyleDatabase.getWidthSize`.
4228

4329
<br/>
4430

4531
## Detail of changes
4632

47-
- The advanced `attr()` support now follows the current Values Level 5
48-
specification.
49-
- NSAC: drop `EMPTY` units in `countReplaceBy()`.
50-
- NSAC: have `getParameters()` return the sub-values if this is an expression
51-
or a unicode range.
52-
- DOM wrapper: improved serialization of element nodes.
53-
- Gradle: use the assignment operator in the maven repo section.
54-
- Upgrade Gradle wrapper to 8.12.1.
55-
- Upgrade to JUnit 5.11.4.
56-
- Upgrade to Jazzer 0.23.0.
57-
- Upgrade to checkstyle 10.21.1.
58-
- Bump year to 2025 in copyrights.
33+
- NSAC,CSSOM: support the `round`, `mod`, `rem`, `log` and `exp` functions from Values 4.
34+
- NSAC,CSSOM: more efficient handling of functions.
35+
- NSAC,CSSOM: support `src()` values.
36+
- CSSOM: add method `getFloatValue()` to `CSSTypedValue`, to retrieve raw value.
37+
- CSSOM: implement `Cloneable` in `StringList` and `CSSFontFeatureValuesMap` implementation.
38+
- CSSOM: add `ShorthandDatabase.getInstance(ClassLoader)`.
39+
- CSSOM: deprecate `StyleDatabase.getWidthSize`. The `thin`, `thick` and `medium` identifiers have fixed values since May 2022, see CSSWG issue 7254.
40+
- CSSOM: support `text` and `border-area` as `background-clip` values.
41+
- CSSOM: support `border`, `padding`, `content` and `text` as `mask-clip` values.
42+
- CSSOM: ignore case when optimizing `background-position` in `getPropertyValue("background")`.
43+
- CSSOM: avoid unlikely NPE when optimizing `getPropertyValue("background")` of a declared style when `background-origin` is not set.
44+
- CSSOM: avoid unlikely NPE when optimizing `getPropertyValue("mask")` of a declared style when `mask-origin` is not set.
45+
- CSSOM: other updates to `background` and `mask` shorthands.
46+
- CSSOM: use private constructors in a few singleton classes.
47+
- Agent: use a more modern user agent identification string.
48+
- Tests: clean up HTMLDocumentTest.
49+
- Upgrade Jazzer to 0.24.0.
50+
- Upgrade to checkstyle 10.21.2.
51+
- README: use the assignment operator in the Gradle example.

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plugins {
1717
}
1818

1919
group = 'io.sf.carte'
20-
version = '5.2-SNAPSHOT'
20+
version = '5.2'
2121
description = 'css4j'
2222

2323
java {

0 commit comments

Comments
 (0)