option for locally scoped styles
See original GitHub issueI totally dig this pr in postcss-prefix, I think it makes the API for globals muchhhh cleaner and agree on changes that drop deps.
butttt I wonder if it would be cool to make a new possible option called local
for example:
const html = require('choo/html')
const css = require('sheetify')
const styles = css('./component.css', { local: true})
module.exports = (state, prev, send) => html`
<div class=${styles}>Yo!</div>
`
and the css is ./component.css
is scoped to that particular component
whatchya think?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Scoped CSS - Vue Loader
# Scoped CSS · # Mixing Local and Global Styles · # Child Component Root Elements · # Deep Selectors · # Dynamically...
Read more >Locally Scoped CSS Variables: What, How, and ... - Una Kravets
CSS Custom Properties (also popularly called CSS Variables) are here! This is really exciting because we finally have true variables in CSS!
Read more >Saving the Day with Scoped CSS
The scope method allows you to keep those styles specific to the page they're needed on, without bloating your main stylesheet and having...
Read more >scope - CSS: Cascading Style Sheets - MDN Web Docs
The :scope CSS pseudo-class represents elements that are a reference point for selectors to match against. Currently, when used in a stylesheet ...
Read more >What is the current state of the "scoped" attribute for the style ...
This option also adds the possible advantage that if the browser does not understand the scoped attribute, the styles will not be applied...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
awesome! thanks for taking the time to read my issue and for making sheetify, choo, bankai, and all those tools that make my dev stack 100% better
Ah yeah this seems reasonable. Given how small and transparent the feature is I’m in favor of adding it. PR welcome
On Wed, Nov 30, 2016, 03:38 Jacob Burden notifications@github.com wrote: