Comments (1)
The idea is around the sequential nature of nested selectors:
// `dark-theme` is introduced first
<div class="dark-theme"> "unlocks .dark-theme"
// dependent selectors are always follow
<div class='header'>uses style</div>
This allows embedding a check into usedFilter
- a function before preventing duplication of selectors.
- before: if
selector
has been introduced - skip - now: and if
parent part of a selector
has NOT been introduced - skip
It does not handle proper gating, and absolutely ignores DOM structure. But it does the job
from used-styles.
Related Issues (20)
- Is moving / removing styles mandatory? HOT 5
- media query support HOT 5
- Support publicURL HOT 8
- Inline full files and exclude them from loading twice HOT 1
- Styles priority HOT 1
- Correct rules order HOT 1
- detect when classes from different files are used on single node
- No dist in published package HOT 3
- Below The Fold
- Styles with same selector and content but different media are missing
- Usage example for CRA HOT 2
- `:not()` pseudo selector support HOT 2
- React 17 support HOT 2
- Rule filtering
- Cloudflare workers compatibility HOT 4
- React 18 (WebPack 5) doesn't work HOT 1
- missing css HOT 1
- [Q/A] "used-style" is simple ? HOT 2
- CSS truncated incorrectly HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from used-styles.