oocss

OOCSS Separation of Container and Content?

别说谁变了你拦得住时间么 提交于 2019-11-29 02:41:20
Question : Is the second OOCSS principle really valid? According to the OOCSS second principle you're not supposed to have location dependent styles: Quote from https://github.com/stubbornella/oocss/wiki Essentially, this means “rarely use location-dependent styles”. An object should look the same no matter where you put it. So instead of styling a specific h2 with .myObject h2 {...}, create and apply a class that describes the h2 in question, like h2 class="category". Lets take a practical example of this. Say I have a standard 2.0 setup with a normal body (white background) and a huge footer

OOCSS Separation of Container and Content?

时光毁灭记忆、已成空白 提交于 2019-11-27 16:58:02
问题 Question : Is the second OOCSS principle really valid? According to the OOCSS second principle you're not supposed to have location dependent styles: Quote from https://github.com/stubbornella/oocss/wiki Essentially, this means “rarely use location-dependent styles”. An object should look the same no matter where you put it. So instead of styling a specific h2 with .myObject h2 {...}, create and apply a class that describes the h2 in question, like h2 class="category". Lets take a practical

modify a css rule object with javascript [duplicate]

被刻印的时光 ゝ 提交于 2019-11-26 08:32:30
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Changing a CSS rule-set from Javascript I was wondering if there is any possibility to modify Css stylesheet declarations without going for inline styling. Here is a quick example : <style> .box {color:green;} .box:hover {color:blue;} </style> <div class=\"box\">TEXT</div> That gives a blue written box that turns green written on hover. If I give inline styling for the color, the hover behavior will be lost :