lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

Provide any workaround for ":where" selector

Open northern-mindset opened this issue 4 years ago • 1 comments

Currently global coverage is no more than 90%: caniuse.com/?search=where

The main feature of :where is to achieve 0 specificity which can't be emulated with plain CSS (seemingly). However, maybe emulating :where with increased specificity still could be beneficial? At least there may be a chance of proper styling in the old browsers instead of completely unstyled HTML?

Examples:

  • https://github.com/tailwindlabs/tailwindcss/discussions/8001
  • https://github.com/facebook/docusaurus/issues/7617

postcss-preset-env also does not provide any workaround for this selector: https://github.com/csstools/postcss-plugins/discussions/509

Created from discussion https://github.com/parcel-bundler/parcel/discussions/8262

northern-mindset avatar Jun 30 '22 10:06 northern-mindset

What would you expect it to compile to? I can't think of another way to lower specificity...

devongovett avatar Jul 03 '22 15:07 devongovett