diff options
author | Yan Zhu <picturepan2@hotmail.com> | 2017-09-06 12:48:24 +0300 |
---|---|---|
committer | Yan Zhu <picturepan2@hotmail.com> | 2017-09-06 12:48:24 +0300 |
commit | d8064d06254576af99228df650d13d05f771f09e (patch) | |
tree | a6be096f15bfcd8e6a92bc0cde3290abc1ddb76f /src | |
parent | fe86c1a2eb53be625cf5ecb30415122e29ffee72 (diff) |
Add Details and Summary Accordians support #256
Diffstat (limited to 'src')
-rw-r--r-- | src/_accordions.scss | 51 | ||||
-rw-r--r-- | src/_normalize.scss | 1 |
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 |