Skip to content

Rendering of style and script elements (white-space: pre) #7167

@nuxodin

Description

@nuxodin

Although script and style elements are not displayed by default, it would make sense to display spaces if you want to display the elements anyway.

This document specifies the rendering of "flow content".
https://www.w3.org/TR/2021/NOTE-html53-20210128/rendering.html#non-replaced-elements-flow-content

I recommend the following change:

- listing, plaintext, pre, xmp {
+ listing, plaintext, pre, xmp, script, style {
    font-family: monospace; white-space: pre;
  }

I don't know exactly what this would mean for backwards compatibility, but I think it would be a tolerable change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions