mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-24 20:18:18 +00:00
wip accordion
This commit is contained in:
@@ -62,3 +62,66 @@
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
//accordion
|
||||
.tab {
|
||||
position: relative;
|
||||
margin-bottom: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border: solid $border thin;
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
label {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $spacer-xs;
|
||||
background: lighten($bg-default,4%);
|
||||
border: solid 1px $border;
|
||||
font-size: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
-webkit-transition: max-height .35s;
|
||||
-o-transition: max-height .35s;
|
||||
transition: max-height .35s;
|
||||
padding: $spacer-sm;
|
||||
}
|
||||
|
||||
/* :checked */
|
||||
input:checked~.tab-content {
|
||||
display: block;
|
||||
}
|
||||
/* Icon */
|
||||
label::after {
|
||||
position: absolute;
|
||||
right: $spacer-xs;
|
||||
top: $spacer-xs;
|
||||
display: block;
|
||||
text-align: center;
|
||||
-webkit-transition: all .35s;
|
||||
-o-transition: all .35s;
|
||||
transition: all .35s;
|
||||
}
|
||||
input[type=checkbox]+label::after {
|
||||
content: "+";
|
||||
}
|
||||
input[type=radio]+label::after {
|
||||
content: "\25BC";
|
||||
}
|
||||
input[type=checkbox]:checked+label::after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
input[type=radio]:checked+label::after {
|
||||
transform: rotateX(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user