Skip to content

Commit

Permalink
fix(accordion): proper margins for rtl extra-light ver (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and GitHub Enterprise committed Dec 10, 2020
1 parent 612395a commit 59d692a
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions projects/ng-aquila/src/accordion/expansion-panel-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,26 @@ $mobile-header-padding: nx-spacer(s);
}
}

$header-title-margin-after: nx-spacer(2m);
$header-title-small-screen-margin-after: nx-spacer(s);
::ng-deep .nx-expansion-panel__header-title {
@include type-style(accordion-regular);
text-align: left;
margin-right: nx-spacer(2m);
margin-right: $header-title-margin-after;

@include media-breakpoint-down(small) {
@include type-style(accordion-regular-mobile);
margin-right: nx-spacer(s);
margin-right: $header-title-small-screen-margin-after;
}

:host-context([dir="rtl"]) & {
text-align: right;
margin-right: initial;
margin-left: nx-spacer(2m);
margin-left: $header-title-margin-after;

@include media-breakpoint-down(small) {
margin-right: initial;
margin-left: nx-spacer(s);
margin-left: $header-title-small-screen-margin-after;
}
}
}
Expand Down Expand Up @@ -135,6 +137,7 @@ $mobile-header-padding: nx-spacer(s);
}

// extra light
$extra-light-header-title-margin-after: 8px;
:host-context(.nx-expansion-panel--extra-light) {
.nx-expansion-panel__header-content {
padding: 0;
Expand All @@ -154,13 +157,20 @@ $mobile-header-padding: nx-spacer(s);

::ng-deep .nx-expansion-panel__header-title {
@include type-style(accordion-extra-light);
margin-right: 8px;
margin-right: $extra-light-header-title-margin-after;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}

:host-context([dir='rtl'] .nx-expansion-panel--extra-light) {
::ng-deep .nx-expansion-panel__header-title {
margin-left: $extra-light-header-title-margin-after;
margin-right: 0;
}
}

:host-context(.nx-expansion-panel--extra-light.nx-expansion-panel--negative) {
.nx-expansion-panel__header-content {
@include var(color, negative);
Expand Down

0 comments on commit 59d692a

Please sign in to comment.