Skip to content

CSS property mask is not vendor prefixed #4357

@BPJEnnova

Description

@BPJEnnova

The CSS shorthand property mask without prefix is relatively new, but it has good support with the -webkit prefix. See caniuse.com mask and mask-image compared.

Currently esbuild does not prefix the shorthand mask, but it does prefix the individual properties, mask-image, mask-position, etc.

See the esbuild playground example which outputs the following:

Observed output

main {
  mask: url(x.png) center/4rem no-repeat;
  -webkit-mask-image: url(y.png);
  mask-image: url(y.png);
}

Expected output

main {
  -webkit-mask: url(x.png) center/4rem no-repeat;
  mask: url(x.png) center/4rem no-repeat;
  -webkit-mask-image: url(y.png);
  mask-image: url(y.png);
}

Notes

  • I'm working on a PR
  • The documentation should probably be updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions