CSS-Tricks Examines Effectiveness Of UDJO Technique
CSS-Tricks reported on the effectiveness of UDJO, a CSS optimization technique, and its potential for improving maintainability and performance
Original reporting · css-tricks.com
Original: “CSS Optimization: Is Using Declarations Just Once (UDJO) Still Effective Today?”
Read “CSS Optimization: Is Using Declarations Just Once (UDJO) Still Effective Today?” at CSS-Tricks →
How this was written. CTCV wrote this article with a language model from CSS-Tricks’s reporting (model: @cf/meta/llama-3.3-70b-instruct-fp8-fast); it describes that reporting rather than adding to it. The original, linked above, is the full story.
Key points from CSS-Tricks’s report
- UDJO is a CSS optimization technique that aims to reduce declaration repetition.
- CSS-Tricks found that declaration repetition can be reduced in all cases, but the effectiveness of UDJO depends on the intelligence of deduplication and selector length.
- UDJO can lead to improved maintainability and performance, and can be a low-cost performance optimization vector.
CSS optimization is a complex topic, with new techniques and tools emerging regularly, according to CSS-Tricks.
UDJO, or using declarations just once, is a technique that aims to reduce declaration repetition in CSS, inspired by the principle of DRY, or don't repeat yourself.
The technique works by identifying and reducing declaration repetition, which can lead to improved maintainability and performance, as it allows for easier changes to declarations and reduced file sizes.
However, the effectiveness of UDJO depends on how intelligently the deduplication is done and the length of selectors, which can influence the file size savings.
CSS-Tricks built tooling, called CSS Dedup, to identify and deduplicate repetition in CSS, and used it to analyze 20 websites, finding that declaration repetition can be reduced in all cases.
In 18 cases, reducing declaration repetition led to a file size increase, but in all cases, it was possible to reduce repetition in a way that led to file size savings.
The data suggests that UDJO can still be an effective technique for CSS optimization, especially when applied to minified output, and can be a low-cost performance optimization vector.
Questions and answers
What is UDJO?
UDJO, or using declarations just once, is a CSS optimization technique that aims to reduce declaration repetition.
How effective is UDJO?
The effectiveness of UDJO depends on how intelligently the deduplication is done and the length of selectors, but it can lead to improved maintainability and performance.
Can UDJO reduce file sizes?
Yes, UDJO can reduce file sizes in some cases, but in other cases, it may lead to a file size increase, depending on the length of selectors and the intelligence of deduplication.



