3 ms·
This is not how CSS works: padding-right + padding-left are not equivalent to `padding: 0 something`, that 0 is overriding existing padding from the element. T
by sureIy 2y ago
This is not how CSS works: padding-right + padding-left are not equivalent to `padding: 0 something`, that 0 is overriding existing padding from the element.
The whole tool should be scrapped. I suggest working on code for PostCSS/cssnano instead of doing search and replaces.
- croes 2y agoIs it that what it does? I thought it just finds things like padding-left: 10px; padding-top:20px; padding-right:30px; and combines them to one padding: 20px 30px 0 10px;
- sureIy 2y agoThat’s what it does, and that’s wrong. Unspecified properties are not equivalent to 0. Example of code that this tool breaks: p { margin: 10px; } aside p { margin-left: 0; margin-right: 0; } This is turned into `aside p {margin: 0}` and that’s not what the authored CSS meant at all.
- croes 2y agoThen the author didn't grasp the complexity of CSS