modulerizr
Version:
Integrate a powerful, component based architecture to your legacy project in just a few steps
17 lines • 654 B
HTML
<template name="scoped-styles-1">
<style>
/*These styles are global and can have siteeffects to all other components*/
.globalFromComponent1 {
color: red;
}
</style>
<style m-scoped>
.local,.local_1{
color: green;
}
</style>
<div class="globalFromComponent1">This is a red text. </div>
<div class="local">This is a green text. But the selector is scoped. </div>
<div class="local_1">This is also a green text. And the selector is scoped.</div>
<div class="styleFromSrc">This text is blue, because the styledefinition comes from the src-file</div>
</template>