papercss/src/components/_accordion.scss

56 lines
1.1 KiB
SCSS
Raw Normal View History

2017-12-27 17:39:45 +01:00
.collapsible {
2017-12-30 13:07:53 +01:00
display: flex;
flex-direction: column;
2017-12-27 17:39:45 +01:00
2017-12-30 13:07:53 +01:00
&:nth-of-type(1) {
2020-08-10 01:12:00 +02:00
@include color('border-top-color', 'muted-light');
border-top-style: solid;
border-top-width: 1px;
2017-12-30 13:07:53 +01:00
}
2017-12-27 17:39:45 +01:00
2017-12-30 13:07:53 +01:00
.collapsible-body {
2020-08-10 01:12:00 +02:00
@include color('border-bottom-color', 'muted-light');
@include color('background-color', 'white-dark-light-80');
2018-05-24 14:13:53 +02:00
@include transition;
2020-08-10 01:12:00 +02:00
border-bottom-style: solid;
border-bottom-width: 1px;
2018-05-24 14:13:53 +02:00
margin: 0;
max-height: 0;
opacity: 0;
overflow: hidden;
padding: 0 0.75rem;
2017-12-30 13:07:53 +01:00
}
2017-12-27 17:39:45 +01:00
> input {
2017-12-30 13:07:53 +01:00
display: none;
2017-12-27 17:39:45 +01:00
2017-12-30 13:07:53 +01:00
&:checked + label {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary');
2017-12-27 17:39:45 +01:00
}
2017-12-30 13:07:53 +01:00
2018-05-24 14:13:53 +02:00
&[id^='collapsible']:checked~div.collapsible-body {
2017-12-30 13:07:53 +01:00
margin: 0;
2018-05-24 14:13:53 +02:00
max-height: 960px;
opacity: 1;
padding: 0.75rem;
2017-12-27 17:39:45 +01:00
}
2017-12-30 13:07:53 +01:00
}
> label {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary');
2020-08-10 01:12:00 +02:00
@include color('border-bottom-color', 'muted-light');
border-bottom-style: solid;
border-bottom-width: 1px;
2017-12-30 13:07:53 +01:00
display: inline-block;
font-weight: 600;
2018-05-24 14:13:53 +02:00
margin: 0 0 -1px;
padding: 0.75rem;
2017-12-30 13:07:53 +01:00
text-align: center;
&:hover {
2020-06-01 23:02:51 +02:00
@include color('color', 'muted');
2017-12-30 13:07:53 +01:00
cursor: pointer;
2017-12-27 17:39:45 +01:00
}
2017-12-30 13:07:53 +01:00
}
2017-12-27 17:39:45 +01:00
}