Skip to content

Commit

Permalink
Merge pull request #1806 from SpareBank1/develop_overflow-wrap
Browse files Browse the repository at this point in the history
fix(ffe-form): overflow-wrap: anywhere radio/checkboxes
  • Loading branch information
pethel authored Feb 26, 2024
2 parents 1546dff + c0e1bd4 commit c5c5dc0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
12 changes: 7 additions & 5 deletions packages/ffe-form/less/checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
color: var(--ffe-v-input-color);
grid-template-columns: auto 1fr;
grid-template-rows: var(--line-height) 1fr;

.ffe-checkbox__content {
grid-column: 2/3;
grid-row: 1/-1;
}
overflow-wrap: anywhere;
hyphens: auto;

&--no-margin {
margin-top: 0;
Expand Down Expand Up @@ -68,6 +65,11 @@
}
}

.ffe-checkbox__content {
grid-column: 2/3;
grid-row: 1/-1;
}

.ffe-hidden-checkbox {
position: absolute;
opacity: 0;
Expand Down
4 changes: 3 additions & 1 deletion packages/ffe-form/less/radio-block.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
margin-top: @ffe-spacing-md;
width: 100%;
transition: width @ffe-transition-duration @ffe-ease-in-out-back;
overflow-wrap: anywhere;
hyphens: auto;

&__content,
&__header {
Expand Down Expand Up @@ -56,7 +58,7 @@

&__wrapper {
grid-column: 2/3;
grid-row: 2/2;
grid-row: 2/3;
padding: @ffe-spacing-sm @ffe-spacing-sm @ffe-spacing-lg;
cursor: auto;

Expand Down
2 changes: 1 addition & 1 deletion packages/ffe-form/less/radio-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--line-height: 1.15rem;

line-height: var(--line-height);
word-break: break-all;
overflow-wrap: anywhere;
hyphens: auto;
font-family: var(--ffe-g-font);
font-variant-numeric: tabular-nums;
Expand Down
2 changes: 2 additions & 0 deletions packages/ffe-form/less/radio-switch.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
margin-bottom: @ffe-spacing-2xs;
margin-top: @ffe-spacing-sm;
line-height: 1.5;
overflow-wrap: anywhere;
hyphens: auto;

&::before {
content: '';
Expand Down
2 changes: 2 additions & 0 deletions packages/ffe-form/less/tooltip.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
overflow: hidden;
visibility: hidden;
transition: height @ffe-transition-duration @ffe-ease;
overflow-wrap: anywhere;
hyphens: auto;
}

&--open &__text {
Expand Down

0 comments on commit c5c5dc0

Please sign in to comment.