Skip to content

Commit

Permalink
feat(text): add text-wrapping to reset and max-width to abstract and …
Browse files Browse the repository at this point in the history
…body
  • Loading branch information
benjag committed Jan 24, 2024
1 parent 24922ee commit 980bc50
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions public/cdr-reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ body {
background-color: #ffffff;
}

h1,h2,h3,h4,h5,h6 {
text-wrap: balance;
}

p {
text-wrap: pretty
}

a,
area,
button,
Expand Down
1 change: 1 addition & 0 deletions src/components/abstract/styles/CdrAbstract.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
margin: 0;
font-size: var(--cdr-type-scale-1);
line-height: calc(var(--cdr-type-scale-1) * var(--cdr-subheading-sans-line-height-ratio));
max-width: 75ch;

@container (max-width: 720px) {
@include cdr-text-body-500;
Expand Down
1 change: 1 addition & 0 deletions src/components/text/presets/styles/CdrBody.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
font-size: var(--cdr-body-font-size);
line-height: var(--cdr-body-line-height);
font-weight: var(--cdr-body-font-weight);
max-width: var(--cdr-body-max-width, 75ch);
}
1 change: 0 additions & 1 deletion src/components/text/styles/CdrText.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
@import './vars/CdrText.vars.scss';

.cdr-text {
@include cdr-text-default;
@include cdr-text-base-mixin;
}

0 comments on commit 980bc50

Please sign in to comment.