| 1 |
.tabs { |
| 2 |
position: relative; |
| 3 |
clear: both; |
| 4 |
margin: 25px 0; |
| 5 |
} |
| 6 |
.tabs label { |
| 7 |
background: #eee; |
| 8 |
padding: 10px; |
| 9 |
border: 1px solid #ccc; |
| 10 |
margin-left: -1px; |
| 11 |
position: relative; |
| 12 |
left: 1px; |
| 13 |
} |
| 14 |
|
| 15 |
.tabs [type=radio] { |
| 16 |
display: none; |
| 17 |
} |
| 18 |
|
| 19 |
.content-rendering, .content-code { |
| 20 |
background: white; |
| 21 |
margin-top: 10px; |
| 22 |
margin-bottom: -10px; |
| 23 |
padding: 5px; |
| 24 |
border: 1px solid #ccc; |
| 25 |
} |
| 26 |
|
| 27 |
/* Does not require immediate sibbling */ |
| 28 |
.tab-rendering[type=radio]:checked ~ .label-rendering { |
| 29 |
background: white; |
| 30 |
border-bottom: 1px solid white; |
| 31 |
} |
| 32 |
|
| 33 |
.tab-code[type=radio]:checked ~ .label-code { |
| 34 |
background: white; |
| 35 |
border-bottom: 1px solid white; |
| 36 |
} |
| 37 |
|
| 38 |
.tab-metadata[type=radio]:checked ~ .label-metadata { |
| 39 |
background: white; |
| 40 |
border-bottom: 1px solid white; |
| 41 |
} |
| 42 |
|
| 43 |
.tab-rendering[type=radio]:not(:checked) ~ .content-rendering { |
| 44 |
display: none; |
| 45 |
} |
| 46 |
|
| 47 |
.tab-code[type=radio]:not(:checked) ~ .content-code { |
| 48 |
display: none; |
| 49 |
} |
| 50 |
|
| 51 |
.tab-metadata[type=radio]:not(:checked) ~ .content-metadata { |
| 52 |
display: none; |
| 53 |
} |
| 54 |
|
| 55 |
.content-rendering img { |
| 56 |
padding: 5px; |
| 57 |
border: 1px solid #ccc; |
| 58 |
} |