Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commitd8064d06254576af99228df650d13d05f771f09e (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-09-06 17:48:24 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-09-06 17:48:24 +0800
Filesa6be096f15bfcd8e6a92bc0cde3290abc1ddb76f /src
Spectre-Dark-Gruvbox-d8064d06254576af99228df650d13d05f771f09e.tar
Spectre-Dark-Gruvbox-d8064d06254576af99228df650d13d05f771f09e.tar.gz
Spectre-Dark-Gruvbox-d8064d06254576af99228df650d13d05f771f09e.zip
Parentfe86c1a2eb53be625cf5ecb30415122e29ffee72 (diff)
Add Details and Summary Accordians support #256
2 files changed, 28 insertions, 24 deletions
-rw-r--r--src/_accordions.scss51
-rw-r--r--src/_normalize.scss1
diff --git a/src/_accordions.scss b/src/_accordions.scss
index 685c9a5..47b6c6b 100644
--- a/src/_accordions.scss
+++ b/src/_accordions.scss
@@ -1,34 +1,37 @@
// Accordions
.accordion {
- .accordion-item {
- input {
- &:checked {
- & ~ .accordion-header {
- .icon {
- transform: rotate(90deg);
-
- }
- }
- & ~ .accordion-body {
- max-height: 50rem;
- }
+ input:checked ~,
+ &[open] {
+ & .accordion-header {
+ .icon {
+ transform: rotate(90deg);
}
}
- .accordion-header {
- display: block;
- padding: $unit-1 $unit-2;
-
- .icon {
- transition: all .2s ease;
- }
+ & .accordion-body {
+ max-height: 50rem;
}
+ }
+
+ .accordion-header {
+ display: block;
+ padding: $unit-1 $unit-2;
- .accordion-body {
- margin-bottom: $layout-spacing;
- max-height: 0;
- overflow: hidden;
- transition: max-height .2s ease;
+ .icon {
+ transition: all .2s ease;
}
}
+
+ .accordion-body {
+ margin-bottom: $layout-spacing;
+ max-height: 0;
+ overflow: hidden;
+ transition: max-height .2s ease;
+ }
+}
+
+summary.accordion-header {
+ &::-webkit-details-marker {
+ display: none;
+ }
}
diff --git a/src/_normalize.scss b/src/_normalize.scss
index c97c718..a098a84 100644
--- a/src/_normalize.scss
+++ b/src/_normalize.scss
@@ -412,6 +412,7 @@ menu {
summary {
display: list-item;
+ outline: none;
}
/* Scripting