refactor: accordion and dropdown

This commit is contained in:
Lucas Larroche 2023-01-01 14:00:33 +07:00
parent f11fbb8b93
commit 51dd2293ca
2 changed files with 227 additions and 175 deletions

View file

@ -63,11 +63,17 @@
&:focus {
outline: none;
&:not([role="button"]) {
&:not([role]) {
color: var(#{$}accordion-active-summary-color);
}
}
&:focus-visible {
&:not([role]) {
color: var(#{$}primary);
}
}
// Type button
&[role="button"] {
width: 100%;
@ -80,11 +86,14 @@
}
@if $enable-classes {
// .contrast
&:not(.outline).contrast {
// Marker
&.outline {
&::after {
background-image: var(#{$}icon-chevron-button-inverse);
background-image: var(#{$}icon-chevron);
}
}
&.contrast:not(.outline) {
&::after {
background-image: var(#{$}icon-chevron-button-contrast);
}
}
}
@ -94,7 +103,7 @@
// Open
&[open] {
> summary {
margin-bottom: calc(var(#{$}spacing));
margin-bottom: var(#{$}spacing);
&:not([role]) {
&:not(:focus) {