Skip to content

Preserve sensitive whitespace #9

@mcandre

Description

@mcandre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions