diff --git a/module/animate/_index.scss b/module/animate/_index.scss new file mode 100644 index 000000000..16b233c6d --- /dev/null +++ b/module/animate/_index.scss @@ -0,0 +1 @@ +@forward 'mixin/caret'; diff --git a/module/animate/mixin/_caret.scss b/module/animate/mixin/_caret.scss new file mode 100644 index 000000000..d39eae3ce --- /dev/null +++ b/module/animate/mixin/_caret.scss @@ -0,0 +1,11 @@ +@mixin caret() { + &::after { + transition: transform 0.3s; + } + + &[aria-expanded='true'] { + &::after { + transform: rotate(-180deg); + } + } +} diff --git a/src/component/accordion/style/_legacy.scss b/src/component/accordion/style/_legacy.scss index 23f632404..82389f104 100644 --- a/src/component/accordion/style/_legacy.scss +++ b/src/component/accordion/style/_legacy.scss @@ -17,10 +17,12 @@ @include enable-list-style-legacy; &__btn { - @include icon-legacy(add-line, sm); + @include icon-legacy(arrow-down-s-line, sm); &[aria-expanded="true"] { - @include icon-image-legacy(subtract-line); + @include after { + transform: rotate(-180deg); + } } } } diff --git a/src/component/accordion/style/_module.scss b/src/component/accordion/style/_module.scss index 2c1740a6f..827563a2f 100644 --- a/src/component/accordion/style/_module.scss +++ b/src/component/accordion/style/_module.scss @@ -3,6 +3,8 @@ /// @group accordion //// +@use 'module/animate'; + #{ns(accordion)} { position: relative; @@ -22,21 +24,18 @@ &__btn { @include _build-link-base; @include _link-display(flex); - @include nest-accordion-button(add-line); + @include font-weight('medium'); + @include nest-accordion-button(arrow-down-s-line); @include size(100%); text-align: left; @include margin(0); - + @include animate.caret(); + @include after { @include margin-right(0); @include margin-left(auto); } - &[aria-expanded="true"] { - @include font-weight('bold'); - @include icon-image(subtract-line, after); - } - @include padding(3v 0); @include padding(3v 4v, md); } diff --git a/src/component/accordion/style/_scheme.scss b/src/component/accordion/style/_scheme.scss index c1550636e..5d09fe8ab 100644 --- a/src/component/accordion/style/_scheme.scss +++ b/src/component/accordion/style/_scheme.scss @@ -12,11 +12,7 @@ } &__btn { - @include color.text(action-high grey, (legacy:$legacy)); - - &[aria-expanded="true"] { - @include color.text(active grey, (legacy:$legacy)); - } + @include color.text(action-high blue-france, (legacy:$legacy)); } } } diff --git a/src/component/transcription/style/_legacy.scss b/src/component/transcription/style/_legacy.scss index 18277a4a5..0857b0439 100644 --- a/src/component/transcription/style/_legacy.scss +++ b/src/component/transcription/style/_legacy.scss @@ -11,10 +11,12 @@ &__btn { @include icon-legacy(align-left, sm, before); - @include icon-legacy(add-line, sm, after); + @include icon-legacy(arrow-down-s-line, sm, after); &[aria-expanded="true"] { - @include icon-image-legacy(subtract-line); + @include after { + transform: rotate(-180deg); + } } } diff --git a/src/component/transcription/style/_module.scss b/src/component/transcription/style/_module.scss index 1c14a2a19..f6dfd69f2 100644 --- a/src/component/transcription/style/_module.scss +++ b/src/component/transcription/style/_module.scss @@ -4,6 +4,7 @@ //// @use 'module/media-query'; +@use 'module/animate'; #{ns(transcription)} { position: relative; @@ -17,7 +18,8 @@ &__btn { @include _build-link-base; @include _link-display(flex); - @include nest-transcription-button(add-line); + @include font-weight('medium'); + @include nest-transcription-button(arrow-down-s-line); @include size(100%); text-align: left; @include margin(0); @@ -29,10 +31,7 @@ @include icon(align-left, sm, before) { @include margin-right(2v); } - - &[aria-expanded='true'] { - @include icon-image(subtract-line, after); - } + @include animate.caret(); } &__content { diff --git a/src/component/translate/style/_legacy.scss b/src/component/translate/style/_legacy.scss index 1b2a47269..9045f3ac9 100644 --- a/src/component/translate/style/_legacy.scss +++ b/src/component/translate/style/_legacy.scss @@ -9,7 +9,7 @@ #{ns(translate)} { #{ns(translate)} &__btn { @include icon-legacy(translate-2, sm, before); - @include icon-legacy(arrow-down-s-fill, sm, after); + @include icon-legacy(arrow-down-s-line, sm, after); } } } diff --git a/src/component/translate/style/_module.scss b/src/component/translate/style/_module.scss index dcda710c2..997f1bdc7 100644 --- a/src/component/translate/style/_module.scss +++ b/src/component/translate/style/_module.scss @@ -3,6 +3,8 @@ /// @group header //// +@use 'module/animate'; + #{ns(translate)} { --rows: 8; position: relative; @@ -15,18 +17,12 @@ @include width(100%); @include width(auto, lg); @include margin-bottom(4v, lg); + @include animate.caret(); - @include icon(arrow-down-s-fill, sm, after) { + @include icon(arrow-down-s-line, sm, after) { @include margin-left(auto); @include margin-left(1v, lg); @include margin-right(-1v, lg); - transition: transform 0.3s; - } - - &[aria-expanded=true] { - @include after { - transform: rotate(-180deg); - } } @include respond-from(lg) {