csso
csso copied to clipboard
CSS minifier with structural optimizations
I’m using CSSO via postcss-csso v6.0.0 that uses csso 5.0.1, but the same applies when I run my code via the [online version](http://css.github.io/csso/csso.html) with v5.0.4. Here’s the code after compression,...
Before: ``` bdo[dir="ltr"] { direction: ltr; unicode-bidi: bidi-override } bdo[dir="rtl"] { direction: rtl; unicode-bidi: bidi-override } *[dir="ltr"] { direction: ltr; unicode-bidi: embed } *[dir="rtl"] { direction: rtl; unicode-bidi: embed }...
Don't compressed font* attributes. For example this: `font-family:RobotoRegular,sans-serif;font-size:14px;` length: 52 symbols compact equivalent: `font:14px RobotoRegular,sans-serif;` length: 35 symbols padding, margin, border similarly yet maybe compress this: `margin-bottom: 15px;` length: 21...
I would like to configure compiling of css with different theme configurations so as to avoid duplicating common properties. Test case: ```css .foo { color: red; padding: 10px; } @media(prefers-color-scheme:...
When a CSS declaration contains multiple spaces/tabs or even a line break, all of those is preserved in a function context (like `calc()`). I believe these could be reduced to...
[`:where()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:where) selectors have zero specificity so their order is the only thing that matters. csso will merge multiple selectors into a single comma-separated selector if they have the same content....
Hello the following code isn't working after compressing: `a.read-more { font-size: 0.8em; text-transform: uppercase; &:after { font-family: "dashicons"; content: '\f344'; // arrow-right display: inline-block; -webkit-font-smoothing: antialiased; font: normal 16px/1; vertical-align:...
Currently CSSO doesn't traverse selectors in functional pseudo-classes when build [pseudoSignature](https://github.com/css/csso/blob/master/lib/restructure/prepare/processSelector.js) which leads to the incorrect merge of rules, e.g. ```css .cc-expiry-month:not(:-moz-placeholder-shown) { width: 42px; } .cc-expiry-month:not(:-ms-input-placeholder) { width: 42px;...
Starting from csso 5.0.0 (including the latest 5.0.3), it has similar issue as this example: Original css: .star-rating{content:'\73\73\73\73\73'} .star-rating span::before{content:'\53\53\53\53\53'} After csso minification: .star-rating{content:"**sssss**"}.star-rating span::before{content:"**SSSSS**"} V4.2.0 does not have this...
Before: ``` .icon-shopping-cart:before { content: "\e72f" } ``` After CSSO: `.icon-shopping-cart:before{content:""}` Is there a setting I need to activate to prevent this?