facebook / facebook/stylex

[babel-plugin] refine priorities for pseudos and descendant and sibling selectors

Open
#1,264 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

Right now we use a predetermined priority mapping for pseudoclasses and descendant and sibling selectors. Some are intuitive and nondisruptive (:hover loses to :active), others will be confusing. This is especially true for descendant and sibling selector cases.

We probably can't apply a negation like we do for media queries for CSS size reasons (there are too many permutations), though it's something we can investigate.

A simpler approach would be to include an autosort so the user understands the expected prioritization between selectors.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.