Skip to content

text-decoration prefixing inconsistent #1473

@h3rmanj

Description

@h3rmanj

text-decoration support was added in #857. However, it doesn't prefix for basic values. This can cause inconsistent situations;

span {
  text-decoration: underline dashed;
}

span.underline-only {
  text-decoration: underline;
}

/* after autoprefix */
span {
  -webkit-text-decoration: underline dashed;
  text-decoration: underline dashed;
}

span.underline-only {
  text-decoration: underline;
}
<span class="underline-only">Underlined text</span>

The span would then have a normal solid underline in most browsers, but in safari it will prefer the prefixed one, even though it should be overridden.

For my situation, I'm using a third party design system, and don't manage the bundling/processing myself (create-react-app), which makes it hard to debug and fix myself.

The solution would be to always apply the prefix on text-decoration, or have some global property that prefixes all if it has been prefixed once.

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