Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

use scoped styles instead of global #40

Closed
zeratul1 opened this issue Sep 11, 2017 · 5 comments
Closed

use scoped styles instead of global #40

zeratul1 opened this issue Sep 11, 2017 · 5 comments

Comments

@zeratul1
Copy link

html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}

Hi,
Would you like to use scoped styles instead of these global ones.
I don't think it is a good practice that changing box-sizing of the root element in simplert.

@mazipan
Copy link
Owner

mazipan commented Sep 11, 2017

can not use the scope style when inject html root element.
maybe you can hack the CSS for better implementation.
FYI : Pull Request are very welcome

@zeratul1
Copy link
Author

Oh I'm sorry,
I am not meaning the real scope style.
We could set this box-sizing style on simplert root instead of html root

.simplert { 
  box-sizing: border-box; 
} 
  
.simplert *, .simplert *:before, .simplert *:after { 
  box-sizing: inherit; 
}

@mazipan
Copy link
Owner

mazipan commented Sep 11, 2017

Haven't tried this one, do you have try those code @zeratul1 ?

@zeratul1
Copy link
Author

zeratul1 commented Sep 11, 2017

Yes, I have tried these styles in my local package.
I'll run the test and make a PR :D

@mazipan
Copy link
Owner

mazipan commented Sep 11, 2017

Close in 48450d1.
Published with version 0.5.5

@mazipan mazipan closed this as completed Sep 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants