Skip to content

svg:not(:root) specificity is very high #718

@Jessidhia

Description

@Jessidhia

When a document uses normalize.css and inline svg, it's not possible to set an svg element's overflow via CSS through a simple class selector. The overflow value is always overridden by the svg:not(:root) override, unless !important or other means of artificially raising the specificity of the selector are used.

Maybe this override could be accomplished by doing, instead:

svg {
  overflow: hidden;
}

svg:root {
  overflow: visible;
}

This would still require that the user artificially increases the specificity of a selector if they really do mean to override the overflow of an svg root in css, but I suspect that is a much more unlikely use case.

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