mazipan / vue2-simplert

⚠️ Vue 2 Simple Alert Component (SweetAlert Inspired)

Home Page:https://vue2-simplert.gitbook.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use scoped styles instead of global

zeratul1 opened this issue · comments

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.

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

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; 
}

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

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

Close in 48450d1.
Published with version 0.5.5