Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYan Zhu <picturepan2@hotmail.com>2017-09-06 12:48:24 +0300
committerYan Zhu <picturepan2@hotmail.com>2017-09-06 12:48:24 +0300
commitd8064d06254576af99228df650d13d05f771f09e (patch)
treea6be096f15bfcd8e6a92bc0cde3290abc1ddb76f /src
parentfe86c1a2eb53be625cf5ecb30415122e29ffee72 (diff)
Add Details and Summary Accordians support #256
Diffstat (limited to 'src')
-rw-r--r--src/_accordions.scss51
-rw-r--r--src/_normalize.scss1
2 files changed, 28 insertions, 24 deletions
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