Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve sensitive whitespace #9

Open
mcandre opened this issue Jul 18, 2019 · 0 comments
Open

Preserve sensitive whitespace #9

mcandre opened this issue Jul 18, 2019 · 0 comments

Comments

@mcandre
Copy link

mcandre commented Jul 18, 2019

Some HTML elements render differently depending on extra spaces. This can happen with <pre>, <tt>, <kbd>, <span>, and so on. For inner HTML on these kinds of DOM elements, please leave the original whitespace as-is.

breezewish/express-minify#12 (comment)

For <span> elements in particular, designers are ill-advised to use leading or trailing whitespace in inner HTML. Perhaps jade-compress could emit a console warning when such extra space is found. Though again, this should be preserved until the designer gets around to accounting for styling the page properly once the space is manually removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant