Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide themes without autoprefixer applied? #160

Open
mjy9088 opened this issue May 26, 2024 · 0 comments
Open

Provide themes without autoprefixer applied? #160

mjy9088 opened this issue May 26, 2024 · 0 comments

Comments

@mjy9088
Copy link

mjy9088 commented May 26, 2024

Problem

I'm using theme css files in postcss with autoprefixer enabled, like following:

body:not(.dark) {
  @nested-import "../../submodules/prism-themes/themes/prism-one-light.css";
}

body.dark {
  @nested-import "../../submodules/prism-themes/themes/prism-one-dark.css";
}

It produces duplicate selector like following:

  code[class*="language-"]::-moz-selection,
  code[class*="language-"] ::-moz-selection,
  pre[class*="language-"] ::-moz-selection {
    background: #e5e5e6;
    color: inherit;
  }
  code[class*="language-"]::-moz-selection,
  code[class*="language-"] ::-moz-selection,
  pre[class*="language-"] ::-moz-selection {
    background: #e5e5e6;
    color: inherit;
  }
  code[class*="language-"]::selection,
  code[class*="language-"] ::selection,
  pre[class*="language-"] ::selection {
    background: #e5e5e6;
    color: inherit;
  }

Current workaround

Edit file: remove prefixed selectors manually

Possible solutions?

  • provide unprefixed version too (like themes/prism-one-dark-unprefixed.css)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant