-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not possible to style top-level element #22
Comments
Ah, it took me a while to understand what you're doing. This might perhaps be an alternative: // I think ES6 template strings make sense here, but they're always optional
function render (props) {
return h(`div.${prefix}.thing`, [
textContent: 'hello world'
])
} /* .thing will be prefixed, mapping back to the top level element */
.thing: { color: green }
.thing:hover { color: blue } Does this make sense / work for you? |
Closing for now, feel free to reopen if this doesn't work for you. I'm trying to be more decisive in issue-control, hah ✨ |
@yoshuawuyts Are you sure |
Oh, I meant the linked example: {
flex: 1;
} I ran it through |
Oh sorry, missed that! In that case, you’re def. right! |
@yoshuawuyts thanks for the help, the approach for still, the problem with what you suggest is that the css is then prefixed as: .prefix .thing: { color: green }
.prefix .thing:hover { color: blue } which doesn't match |
Might this be a candidate for /* This: */
:host { color: green; }
:host(:hover) { color: blue; }
/* Becomes: */
.prefix { color: green; }
.prefix:hover { color: blue; } |
@hughsk I like it |
@hughsk 👍, here's an issue for |
Closing this issue since stackcss/postcss-prefix#3 has been merged |
want to be able to something like:
but instead had to do:
ran into this writing: js css
or am i missing something?
The text was updated successfully, but these errors were encountered: