Skip to content

Commit

Permalink
fix(accordion, transcription, translate): modifie apparence du bouton
Browse files Browse the repository at this point in the history
  • Loading branch information
zellerbaptiste authored and lab9fr committed Jun 20, 2023
1 parent 1c01df7 commit 1a663ec
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 30 deletions.
1 change: 1 addition & 0 deletions module/animate/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@forward 'mixin/caret';
11 changes: 11 additions & 0 deletions module/animate/mixin/_caret.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@mixin caret() {
&::after {
transition: transform 0.3s;
}

&[aria-expanded='true'] {
&::after {
transform: rotate(-180deg);
}
}
}
6 changes: 4 additions & 2 deletions src/component/accordion/style/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down
13 changes: 6 additions & 7 deletions src/component/accordion/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/// @group accordion
////

@use 'module/animate';

#{ns(accordion)} {
position: relative;

Expand All @@ -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);
}
Expand Down
6 changes: 1 addition & 5 deletions src/component/accordion/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
6 changes: 4 additions & 2 deletions src/component/transcription/style/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/component/transcription/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
////

@use 'module/media-query';
@use 'module/animate';

#{ns(transcription)} {
position: relative;
Expand All @@ -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);
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/component/translate/style/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
12 changes: 4 additions & 8 deletions src/component/translate/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/// @group header
////

@use 'module/animate';

#{ns(translate)} {
--rows: 8;
position: relative;
Expand All @@ -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) {
Expand Down

0 comments on commit 1a663ec

Please sign in to comment.