1body { 2 margin: 30px; 3 font-family: sans-serif; 4 } 5 6#fontSizeWrapper { font-size: 16px; } 7 8#fontSize { 9 width: 100px; 10 font-size: 1em; 11 } 12 13/* ————————————————————– 14 Tree core styles 15*/ 16.tree { margin: 1em; } 17 18.tree input { 19 position: absolute; 20 clip: rect(0, 0, 0, 0); 21 } 22 23.tree input ~ ul { display: none; } 24 25.tree input:checked ~ ul { display: block; } 26 27/* ————————————————————– 28 Tree rows 29*/ 30.tree li { 31 line-height: 1.2; 32 position: relative; 33 padding: 0 0 1em 1em; 34 } 35 36.tree ul li { padding: 1em 0 0 1em; } 37 38.tree > li:last-child { padding-bottom: 0; } 39 40/* ————————————————————– 41 Tree labels 42*/ 43.tree_label { 44 position: relative; 45 display: inline-block; 46 background: #fff; 47 } 48 49label.tree_label { cursor: pointer; } 50 51label.tree_label:hover { color: #666; } 52 53/* ————————————————————– 54 Tree expanded icon 55*/ 56label.tree_label:before { 57 background: #000; 58 color: #fff; 59 position: relative; 60 z-index: 1; 61 float: left; 62 margin: 0 1em 0 -2em; 63 width: 1em; 64 height: 1em; 65 border-radius: 1em; 66 content: '+'; 67 text-align: center; 68 line-height: .9em; 69 } 70 71:checked ~ label.tree_label:before { content: '–'; } 72 73/* ————————————————————– 74 Tree branches 75*/ 76.tree li:before { 77 position: absolute; 78 top: 0; 79 bottom: 0; 80 left: -.5em; 81 display: block; 82 width: 0; 83 border-left: 1px solid #777; 84 content: ""; 85 } 86 87.tree_label:after { 88 position: absolute; 89 top: 0; 90 left: -1.5em; 91 display: block; 92 height: 0.5em; 93 width: 1em; 94 border-bottom: 1px solid #777; 95 border-left: 1px solid #777; 96 border-radius: 0 0 0 .3em; 97 content: ''; 98 } 99 100label.tree_label:after { border-bottom: 0; } 101 102:checked ~ label.tree_label:after { 103 border-radius: 0 .3em 0 0; 104 border-top: 1px solid #777; 105 border-right: 1px solid #777; 106 border-bottom: 0; 107 border-left: 0; 108 bottom: 0; 109 top: 0.5em; 110 height: auto; 111 } 112 113.tree li:last-child:before { 114 height: 1em; 115 bottom: auto; 116 } 117 118.tree > li:last-child:before { display: none; } 119 120.tree_custom { 121 display: block; 122 background: #eee; 123 padding: 1em; 124 border-radius: 0.3em; 125} 126