Skip to content

Commit

Permalink
Refactor line-heights to use relative values (#6871)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvg authored Oct 9, 2024
2 parents 60d7ed8 + ab10f6c commit 0d9f5e9
Show file tree
Hide file tree
Showing 260 changed files with 2,859 additions and 6,263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
justify-content: center;
background-color: rgb(255, 255, 255);
border-width: 2px;
line-height: 24px;
line-height: 1.5;
transition: all 0.5s ease 0s;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
input {
border-style: solid;
border-width: 2px;
line-height: 24px;
line-height: 1.5;
}

input[type='checkbox'] {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/input-range/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
display: inline-block;
flex-grow: 1;
height: rem(8);
line-height: 1.5em;
line-height: 1.5;
padding: 0;
margin: 0;
/* Design-Hack - related with flex-grow */
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
overflow: hidden;
position: absolute;
z-index: 9999999;
line-height: 1em;
line-height: 1;
}

.skip:focus {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/skip-nav/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
overflow: hidden;
position: absolute;
z-index: 9999999;
line-height: 1em;
line-height: 1;
}

.kol-link-wc a:focus {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions packages/themes/bmf/src/@shared/input-core.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@import '../mixins/input.scss';

@layer kol-theme-component {
@include input;

input {
border: none;

&::placeholder {
color: var(--color-grey);
}

&[disabled],
&[disabled]:focus {
cursor: not-allowed;
opacity: 1;
}
}

.input {
padding: 0 1em;

> input:first-child {
padding-left: 0.375em;
}

> input:last-child {
padding-right: 0.375em;
}
}
}
2 changes: 1 addition & 1 deletion packages/themes/bmf/src/components/abbr.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@layer kol-theme-component {
abbr {
border-bottom: dotted var(--color-black) 1px;
text-decoration: none !important;
text-decoration: none;
}
abbr:focus {
border-radius: 5px;
Expand Down
5 changes: 2 additions & 3 deletions packages/themes/bmf/src/components/accordion.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../mixins/rem';
@import '../mixins/typography.scss';

@layer kol-theme-component {
:host {
Expand All @@ -18,9 +19,7 @@
}

:host > div > .kol-heading-wc button .kol-span-wc {
font-weight: 700;
font-size: rem(18);
line-height: 24px;
@include kol-typography-accordion;
gap: rem(8);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/themes/bmf/src/components/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

ul li > :is(span, .kol-link) {
line-height: rem(20);
line-height: 1.25;
}

ul li:last-child > span {
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/bmf/src/components/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

:host .kol-heading-wc {
line-height: rem(28);
line-height: 1.75;
}

:host div.header {
Expand Down
6 changes: 3 additions & 3 deletions packages/themes/bmf/src/components/combobox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $visible-options: 5;
place-items: center;

&:focus {
outline: 0 !important;
outline: 0;
}
}

Expand All @@ -65,15 +65,15 @@ $visible-options: 5;
&__item {
display: flex;
align-items: center;
height: $option-height;
min-height: $option-height;
padding: rem(10) rem(12);
border-radius: 0.25em;
color: var(--color-black);

&:focus {
background-color: var(--color-ocean);
color: white;
outline: 0 !important;
outline: 0;
}
}
}
Expand Down
17 changes: 4 additions & 13 deletions packages/themes/bmf/src/components/heading.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../mixins/rem';
@import '../mixins/typography.scss';

@layer kol-theme-component {
.headline-h1,
Expand All @@ -13,24 +13,15 @@
padding: 0;
}

.headline-h1,
.headline-h2,
.headline-h3 {
font-weight: 700;
}

.headline-h1 {
font-size: rem(24);
line-height: rem(28);
@include kol-typography-h1;
}

.headline-h2 {
font-size: rem(20);
line-height: rem(28);
@include kol-typography-h2;
}

.headline-h3 {
font-size: rem(18);
line-height: rem(24);
@include kol-typography-h3;
}
}
19 changes: 10 additions & 9 deletions packages/themes/bmf/src/components/input-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

/* INPUT */
:host .kol-input {
.kol-input {
display: grid;
align-items: center;
justify-items: left;
Expand Down Expand Up @@ -67,18 +67,18 @@
}

&.error input:focus {
outline-color: var(--color-red) !important;
outline-color: var(--color-red);
}
}

:host input {
input {
order: 1;
width: 100%;
border-color: var(--color-grey);
border-width: 2px;
border-style: solid;
border-radius: 5px;
line-height: 24px;
line-height: 1;
font-size: rem(16);

&:focus {
Expand All @@ -92,22 +92,22 @@
}
}

:host kol-icon:hover ~ input,
:host input:hover {
kol-icon:hover ~ input,
input:hover {
border-color: var(--color-midnight);
}

/* CHECKBOX */
:host .kol-input:not(.button) label span {
.kol-input:not(.button) label span {
margin-top: rem(2);
}

:host .required label > span::after {
.required label > span::after {
content: '*';
padding-left: 0.125em;
}

:host .kol-input {
.kol-input {
input[type='checkbox'] {
appearance: none;
background-color: white;
Expand Down Expand Up @@ -136,6 +136,7 @@
}
}
.icon {
display: flex;
color: var(--color-white);
margin: rem(-2) 0 0 rem(4);
/* visually align */
Expand Down
22 changes: 1 addition & 21 deletions packages/themes/bmf/src/components/input-color.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
@import '../mixins/input.scss';
@use '../@shared/input-core.scss';

@layer kol-theme-component {
input {
border: none;
min-height: 40px !important;
background-color: transparent;

&::placeholder {
color: var(--color-grey);
}

&:not([type='color']):read-only,
&:disabled {
cursor: not-allowed;
}
}

.input {
padding: 0 1em;

> input:first-child {
padding-left: 0.375em;
}

> input:last-child {
padding-right: 0.375em;
}
}

@include input;
}
26 changes: 1 addition & 25 deletions packages/themes/bmf/src/components/input-date.scss
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
@import '../mixins/input.scss';
@use '../@shared/input-core.scss';

@layer kol-theme-component {
input {
border: none;

&::placeholder {
color: var(--color-grey);
}

&::-webkit-datetime-edit {
color: var(--color-grey);
}

&:disabled {
cursor: not-allowed;
}
}

.input {
padding: 0 1em;

> input:first-child {
padding-left: 0.375em;
}

> input:last-child {
padding-right: 0.375em;
}
}

@include input;
}
30 changes: 1 addition & 29 deletions packages/themes/bmf/src/components/input-email.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
@import '../mixins/input.scss';

@layer kol-theme-component {
input {
border: none;

&::placeholder {
color: var(--color-grey);
}

&:disabled {
cursor: not-allowed;
}
}

.input {
padding: 0 1em;

> input:first-child {
padding-left: 0.375em;
}

> input:last-child {
padding-right: 0.375em;
}
}

@include input;
}
@use '../@shared/input-core.scss';
25 changes: 1 addition & 24 deletions packages/themes/bmf/src/components/input-file.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
@import '../mixins/input.scss';
@use '../@shared/input-core.scss';

@layer kol-theme-component {
input {
border: none;
background-color: transparent;
padding-top: calc(0.5em + 2px);

&::placeholder {
color: var(--color-grey);
}

&:disabled {
cursor: not-allowed;
}
}

.input {
padding: 0 1em;

> input:first-child {
padding-left: 0.375em;
}

> input:last-child {
padding-right: 0.375em;
}
}

@include input;
}
Loading

0 comments on commit 0d9f5e9

Please sign in to comment.