File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # CSS Selector Precedence
2+
3+ > [ https://youtu.be/eofMNcafgMU ] ( https://youtu.be/eofMNcafgMU )
4+
5+ Install [ io.js] ( https://iojs.org/en/index.html ) or [ node.js] ( https://nodejs.org/ ) .
6+
7+ Within this folder run the terminal command ` npm install ` to install the
8+ ` dependencies ` and ` devDependencies ` .
9+
10+ Then run ` npm start ` to run the app and ` http://localhost:9966 ` to view.
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > </ title >
6+ < style >
7+ body {
8+ font-size : 3em ;
9+ font-family : Helvetica;
10+ }
11+ </ style >
12+ </ head >
13+ < body >
14+
15+
16+
17+ < style >
18+ /* 1,0,1 */
19+ .animals strong { color : blue; }
20+ /* 0,2,1 */
21+ strong .bear .bears { color : green; }
22+ /* 0,2,1 */
23+ strong .bear .red { color : red; }
24+ </ style >
25+ < div class ="animals ">
26+ < strong class ="red bear bears " style ="color: magenta; "> Grizzly</ strong >
27+ </ div >
28+
29+
30+
31+ < script src ="bundle.js " charset ="utf-8 "> </ script >
32+ </ body >
33+ </ html >
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " css-selector-precedence" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " " ,
5+ "main" : " index.js" ,
6+ "scripts" : {
7+ "start" : " budo index.js:bundle.js --live" ,
8+ "test" : " node test.js"
9+ },
10+ "author" : " Kyle Robinson Young <kyle@dontkry.com> (http://dontkry.com)" ,
11+ "license" : " MIT" ,
12+ "devDependencies" : {
13+ "budo" : " ^4.2.1"
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments