Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add missing hyphenation behaviour to all text components #1864

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/css/src/components/accordion/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-accordion {
display: flex;
flex-direction: column;
gap: var(--ams-accordion-gap);

@include hyphenation;
@include text-rendering;
}

Expand Down
6 changes: 6 additions & 0 deletions packages/css/src/components/badge/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-badge {
background-color: var(--ams-badge-background-color);
color: var(--ams-badge-color);
Expand All @@ -12,6 +15,9 @@
font-weight: var(--ams-badge-font-weight);
line-height: var(--ams-badge-line-height);
padding-inline: var(--ams-badge-padding-inline);

@include hyphenation;
@include text-rendering;
}

.ams-badge--azure {
Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-ol {
Expand All @@ -22,6 +23,7 @@
break-after: avoid;
break-inside: avoid;

@include hyphenation;
@include text-rendering;
@include reset-ol;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-button {
Expand All @@ -26,6 +27,7 @@
padding-inline: var(--ams-button-padding-inline);
touch-action: manipulation;

@include hyphenation;
@include text-rendering;
@include reset-button;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-character-count {
Expand All @@ -12,6 +13,7 @@
font-weight: var(--ams-character-count-font-weight);
line-height: var(--ams-character-count-line-height);

@include hyphenation;
@include text-rendering;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@use "../../common/input-label-focus" as *;
@use "../../common/hide-input" as *;
@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-checkbox__input {
Expand Down Expand Up @@ -44,6 +45,7 @@
line-height: var(--ams-checkbox-line-height);
outline-offset: var(--ams-checkbox-outline-offset);

@include hyphenation;
@include text-rendering;

&:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

@use "../../common/breakpoint" as *;
@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-dl {
Expand All @@ -25,6 +26,7 @@
row-gap: var(--ams-description-list-row-gap);

@include reset-dl;
@include hyphenation;
@include text-rendering;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-p {
Expand All @@ -19,6 +20,7 @@
gap: var(--ams-error-message-gap);
line-height: var(--ams-error-message-line-height);

@include hyphenation;
@include text-rendering;
@include reset-p;
}
2 changes: 2 additions & 0 deletions packages/css/src/components/figure/figure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-figure {
Expand All @@ -25,6 +26,7 @@
font-weight: var(--ams-figure-caption-font-weight);
line-height: var(--ams-figure-caption-line-height);

@include hyphenation;
@include text-rendering;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/file-list/file-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-ul {
Expand All @@ -17,6 +18,7 @@
gap: var(--ams-file-list-gap);
padding-block: var(--ams-file-list-padding-block);

@include hyphenation;
@include text-rendering;
@include reset-ul;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/css/src/components/link-list/link-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
display: grid;
gap: var(--ams-link-list-gap);

@include hyphenation;
@include text-rendering;
@include reset-ul;
}
Expand Down Expand Up @@ -49,8 +50,6 @@
.ams-link-list__link--large {
font-size: var(--ams-link-list-link-large-font-size);
line-height: var(--ams-link-list-link-large-line-height);

@include hyphenation;
}

.ams-link-list__link--contrast {
Expand Down
3 changes: 3 additions & 0 deletions packages/css/src/components/link/link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-link {
Expand All @@ -26,6 +27,8 @@
text-decoration-thickness: var(--ams-link-standalone-text-decoration-thickness);
text-underline-offset: var(--ams-link-standalone-text-underline-offset);

@include hyphenation;

&:hover {
text-decoration-thickness: var(--ams-link-standalone-hover-text-decoration-thickness);
text-underline-offset: var(--ams-link-standalone-hover-text-underline-offset);
Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/ordered-list/ordered-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-ol {
Expand All @@ -17,6 +18,7 @@
gap: var(--ams-ordered-list-gap);

@include text-rendering;
@include hyphenation;
@include reset-ol;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/paragraph/paragraph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-p {
Expand All @@ -18,6 +19,7 @@
line-height: var(--ams-paragraph-line-height);

@include text-rendering;
@include hyphenation;
@include reset-p;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@use "../../common/input-label-focus" as *;
@use "../../common/hide-input" as *;
@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

.ams-radio__input {
Expand All @@ -26,6 +27,7 @@
text-decoration-thickness: var(--ams-radio-text-decoration-thickness);
text-underline-offset: var(--ams-radio-text-underline-offset);

@include hyphenation;
@include text-rendering;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-ul {
Expand All @@ -27,6 +28,7 @@
gap: var(--ams-table-of-contents-list-gap);
list-style: none;

@include hyphenation;
@include text-rendering;
@include reset-ul;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
gap: var(--ams-top-task-link-gap);
outline-offset: var(--ams-top-task-link-outline-offset);
text-decoration: none;

@include hyphenation;
@include text-rendering;
}

.ams-top-task-link__label {
Expand All @@ -25,9 +28,6 @@
text-decoration-line: var(--ams-top-task-link-label-text-decoration-line);
text-decoration-thickness: var(--ams-top-task-link-label-text-decoration-thickness);
text-underline-offset: var(--ams-top-task-link-label-text-underline-offset);

@include hyphenation;
@include text-rendering;
}

.ams-top-task-link:hover .ams-top-task-link__label {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/hyphenation" as *;
@use "../../common/text-rendering" as *;

@mixin reset-ul {
Expand All @@ -16,6 +17,7 @@
display: grid;
gap: var(--ams-unordered-list-gap);

@include hyphenation;
@include text-rendering;
@include reset-ul;
}
Expand Down
Loading