cssinjs / cssinjs/jss

[jss-pseudo] Support a short notation for pseudo selectors

Open
#334 1 comment 0 reactions 0 assignees View on GitHub
complexity:moderate enhancement plugin
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

Why?
- Sometimes we don't need all the features jss-nested provides
- Most other cssinjs libs use ":hover" syntax
- jss-isolate would be able to detect pseudo rules and avoid double isolation for those #698

How?
We can check existence of ":" same way we check "&" and add a parent selector before it when extracting to a separate rule.

Another idea: write jss-pseudo plugin and put this functionality into a separate repository. So one can decide if they want to use jss-nested. Potentially we can completely avoid jss-nested by using jss-pseudo + jss-global.

Contributor guide

Open the contributing guide

Research direction

Start by reading the jss-nested handling for '&' and the discussion around jss-isolate issue #698. Determine whether short pseudo-selector notation belongs in jss-nested or a separate jss-pseudo repository; done means the chosen design supports ':' shorthand and preserves the intended isolation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.