Update dependency io.sf.carte:css4j to v6.1 #4328
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.0
->6.1
Release Notes
css4j/css4j (io.sf.carte:css4j)
v6.1
Compare Source
June 26, 2025
Highlights
Upgraded generic CSS minifier
The
Minify
class was upgraded to be more appropriate for generic minification tasks, and
the serialization is now shorter. For example, the following style rule:
is minified as
Minify
can be used like a normal class, or via the command line with thealldeps
jar:java -jar path/to/css4j-6.1-alldeps.jar verbose.css --charset ISO-8859-1 > minified.css
Note that
UTF-8
is the default character set. Thealldeps
fat jar is nowpart of the standard css4j distribution.
The command-line minifier exits with a status code of
0
if it ran successfully,2
if the arguments were incorrect, and1
if a parsing error was found in thestyle sheet and a simpler minifier was used.
More information is available at the minification section of the usage guide.
Css4j is now used to minify the CSS in the css4j website.
Relative color syntax
Relative color syntax from Color Level 5 is supported.
Relevant specification: https://www.w3.org/TR/css-color-5/#relative-colors
Parse and serialize the
if
functionThe
if
function was shipped by Chrome 137. The argument contains both colonsand semicolons, which prevented the parsing with previous versions of the
library:
The library can now do a basic parsing of the function but cannot provide the
intended final value at the computed style level.
Relevant specification: https://drafts.csswg.org/css-values-5/#if-notation
Selectors: allow multiple conditions in Combinator (AND) conditions
This only affects you in the unlikely case that you work with selectors at low
level. The old API was a bottleneck in the processing of conditional selectors.
Detail of changes
if
function.CSSOMParser
.of-type
pseudo-classes was case sensitive.var()
values in media query features.equals()
andhashCode()
toAbstractStyleSheet
.CSSStyleSheet.createSupportsRule()
a default method.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.