https://github.com/oscarmarina/pseudo-css-support
Detecting Support - CSS pseudo-classes and CSS A CSS pseudo-elements
https://github.com/oscarmarina/pseudo-css-support
Last synced: 2 months ago
JSON representation
Detecting Support - CSS pseudo-classes and CSS A CSS pseudo-elements
- Host: GitHub
- URL: https://github.com/oscarmarina/pseudo-css-support
- Owner: oscarmarina
- License: mit
- Created: 2022-01-09T20:52:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T17:31:08.000Z (over 2 years ago)
- Last Synced: 2025-03-08T14:17:54.541Z (3 months ago)
- Language: HTML
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pseudo-css-support
**Detecting Support** - CSS [pseudo-classes](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) and CSS [pseudo-elements](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)
- It's totally based on [testing-support-for-focus-visible](https://www.abeautifulsite.net/posts/testing-support-for-focus-visible/)
> Demo: https://stackblitz.com/github/oscarmarina/pseudo-css-support?file=README.md
```js
import { pseudoCssSupport } from '@blockquote/pseudo-css-support'
console.info(':focus-visible ', pseudoCssSupport(':focus-visible'));
console.info('::part(foo) ', pseudoCssSupport('::part(foo)'));
console.info(':has(foo) ', pseudoCssSupport(':has(foo)'));
console.info(':lang(xx-XX) ', pseudoCssSupport(':lang(xx-XX)'));
// https://developer.mozilla.org/en-US/docs/Web/CSS/@property
console.info('@property --property-name ', pseudoCssSupport('@property --property-name'));// https://developer.mozilla.org/en-US/docs/Web/CSS/:host-context
console.info(':host-context(foo) ', pseudoCssSupport(':host-context(foo)'));// https://developer.mozilla.org/en-US/docs/Web/CSS/:playing
console.info(':playing ', pseudoCssSupport(':playing'));```