Created
May 24, 2012 10:13
-
-
Save tyv/2780652 to your computer and use it in GitHub Desktop.
1. селектор + !important в user.css > никак не повлиять
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. селектор + !important в user.css > никак не повлиять | |
2. селектор + !important в style.css | |
3. селектор в style.css | |
4. селектор в user.css | |
5. селектор в browser.css > reset.css | |
*/ | |
/* | |
уберем дефолты браузера для списка | |
*/ | |
ul | |
{ | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
/* | |
в рамках style.css, при селекторе одинакового веса, | |
побеждает тот, что ниже | |
*/ | |
.first | |
{ | |
color: green; | |
} | |
.item | |
{ | |
color: red; | |
} | |
/* | |
Мощь переопределения и дополнения: | |
все заголовки серые, но заголвок | |
при условиях "черный и имеет отступ" | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="list"> | |
<li class="item first">first item</li> | |
<li>second item</li> | |
<li><span>span + item</span></li> | |
<li><span>span + item</span></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment