Closed queckezz closed 8 years ago
This is kind of intentional, since global styles go against the idea of having cleanly namespaced styles. What do you need it for? Technically, this does exist in an undocumented way using registerRule('body', {})
.
Right, I was just thinking about a base reset and some sane defaults like:
* {
box-sizing: border-box
}
body {
margin: 0;
padding: 0
}
But it's totally fine to just put that in a <style>
tag separately.
So you would advise against using the undocumented registerRule()
even for base resets (or something along those lines)?
If you want to use it, go ahead. I'll document it and add some tests so a regression doesn't occur.
registerRule('body', {
margin: 0,
padding: 0
})
Just not that this API doesn't do interpolation like registerStyle
, but it's unlikely you need it anyhow.
Awesome library!
Currently it's not possible to style base tags like
body
,h1
etc:Is there a reason behind this or an alternative method? If this is something that you want to add I'm happy to open a PR. I need to investigate into learning the typescript language before I can contribute tough.