elad2412 / the-new-css-reset

The New Simple and Lighter CSS Reset
https://elad2412.github.io/the-new-css-reset/
MIT License
2.25k stars 229 forks source link

all: unset strips line breaks from <pre> #54

Closed viktorix closed 1 year ago

viktorix commented 1 year ago

I noticed code blocks using <pre> were missing line breaks. The problem seems to stem from this line:

*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

If I disable all: unset in devtools, line breaks return to <pre>. But for the life of me, I can't seem to figure out which CSS property it unsets to remove line breaks so I can add them back.

Here's an example with all: unset and while its disabled: image

Thanks.

graymatter00 commented 1 year ago

It might be the CSS white-space property.

See https://developer.mozilla.org/en-US/docs/Web/CSS/white-space.

elad2412 commented 1 year ago

Added fix in the new version (1.8.0) revert for

 and  element