-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(accordion.scss): Add Accordion component styles
- Loading branch information
1 parent
6b5a999
commit 5347b9f
Showing
7 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@use '../internal' as *; | ||
|
||
/* Accordion */ | ||
/* Use with <detail> and <summary> HTML tags */ | ||
$generate-utility: should-generate-classes($ACCORDION); | ||
|
||
@if $generate-utility { | ||
details.accordion { | ||
border-bottom: 1px solid fill('gray', '300'); | ||
display: block; | ||
padding: 1rem; | ||
|
||
summary.accordion__summary { | ||
align-items: center; | ||
cursor: pointer; | ||
display: flex; | ||
justify-content: space-between; | ||
list-style-type: none; | ||
|
||
&:after { | ||
background-image: url($img-chevron-dark); | ||
background-position: right center; | ||
background-size: 1rem auto; | ||
background-repeat: no-repeat; | ||
content: ''; | ||
display: block; | ||
float: right; | ||
height: 1rem; | ||
transform: rotate(-90deg); | ||
transition: all var(--animation-duration); | ||
width: 1rem; | ||
} | ||
} | ||
|
||
&[open] summary.accordion__summary { | ||
margin-bottom: 1rem; | ||
|
||
&:after { | ||
transform: rotate(0); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters