Skip to content

Commit

Permalink
DCAS-1169: improve on read more heading (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
melwong-jcc authored Oct 12, 2023
1 parent e66c173 commit 8b41594
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
31 changes: 22 additions & 9 deletions source/_patterns/02-molecules/read-more/_read-more.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,31 @@ $_config: map-merge-by-keys($_config_schemes, base, $_config_schemes, $scheme);
h3.read-more__heading {
@include u-display(flex);
@include u-border(map-get($_config, rm-border-size), map-get($_config, rm-border));
@include u-bg(map-get($_config, rm-background));
@include u-padding-left(2);
@include u-font-size(body, map-get($_config, rm-text-size));
@include u-color(ink);
@include u-line-height(ui, 3);
align-items: center;
align-items: stretch;
justify-content: space-between;
border-radius: map-get($_config, rm-border-radius);
}

.read-more__heading_text {
@include u-padding(2);
@include u-bg(map-get($_config, rm-background));
@include u-border-right(map-get($_config, rm-border-size), map-get($_config, rm-border));
border-top-left-radius: map-get($_config, rm-border-radius);
border-bottom-left-radius: map-get($_config, rm-border-radius);
}

.read-more__action {
@include u-display(flex);
@include u-margin-left(3);
@include u-padding(4);
@include u-border(0);
@include u-border-left(map-get($_config, rm-border-size), map-get($_config, rm-border));
@include u-bg("white");
@include u-color(primary);
@include u-font-weight(bold);
align-items: center;
min-width: 13ch;
justify-content: center;
min-width: 11ch;
border-top-right-radius: map-get($_config, rm-border-radius);
border-bottom-right-radius: map-get($_config, rm-border-radius);
text-decoration: none;
Expand Down Expand Up @@ -89,15 +92,25 @@ h3.read-more__heading {
@include u-border(0);
@include u-radius(0);
@include u-bg("transparent");
align-items: center;
padding-inline-start: unset;
}

.read-more--text .read-more__heading_text,
.read-more--text .read-more__action {
padding: unset
}

.read-more--text .read-more__heading_text {
@include u-border(0);
@include u-radius(0);
@include u-bg("transparent");
}

.read-more--text .read-more__action {
@include u-border(0);
@include u-radius(0);
@include u-bg("transparent");
@include u-margin-left(0);
padding-block: unset;
}

.read-more--text .read-more__action::after {
Expand Down
2 changes: 1 addition & 1 deletion source/_patterns/02-molecules/read-more/read-more.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="{{ classes|join(' ') }}">
<h3 class="read-more__heading">
{{ readmore.heading }}
<div class="read-more__heading_text">{{ readmore.heading }}</div>
<button class="read-more__action">
<span class="read-more__action_label">More</span>
{% include "@atoms/icon/icon.twig" with {
Expand Down

0 comments on commit 8b41594

Please sign in to comment.