Skip to content

Commit

Permalink
fix: use explicit values for line-height - even this is more a refact…
Browse files Browse the repository at this point in the history
…oring and should not have effect on the layout
  • Loading branch information
tujoworker committed Mar 11, 2019
1 parent 6d89d80 commit f44feee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ exports[`Logo scss have to match snapshot 1`] = `
display: inline-block;
vertical-align: baseline;
font-size: inherit;
line-height: 1;
line-height: 1em;
color: var(--color-sea-green);
--ratio: attr(data-ratio);
width: calc(1em * var(--ratio, 1.453690625));
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-ui-lib/src/components/logo/style/_logo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: inline-block;
vertical-align: baseline;
font-size: inherit;
line-height: 1; // for vertical alignment, we have to have no line-height
line-height: 1em; // for vertical alignment, we have to have no line-height

color: var(--color-sea-green);
svg {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
}

&__amount__inner {
font-size: 0.8rem;
display: block;
width: 0.8rem;
height: 0.8rem;
// line-height: 0.8rem;
line-height: 1;
width: 0.8em;
height: 0.8em;

line-height: 0.8em;
font-size: 0.8em;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-ui-lib/src/style/elements/code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
padding: 0.25em 0.25em; /* 2px 4px */

font-size: inherit;
line-height: 1; // for vertical alignment, we have to have no line-height
line-height: 1.25em; // 1.5 - 0.25

background-color: var(--color-mint-green-25);
border-radius: 0.1875em;
Expand Down
4 changes: 2 additions & 2 deletions packages/dnb-ui-lib/src/style/elements/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
h4 > small,
h5 > small,
h6 > small {
line-height: 1; // for vertical alignment, we have to have no line-height
line-height: 1em; // for vertical alignment, we have to have no line-height
}
.dnb-spacing {
h1,
Expand Down Expand Up @@ -177,7 +177,7 @@
.dnb-h4 > .dnb-small,
.dnb-h5 > .dnb-small,
.dnb-h6 > .dnb-small {
line-height: 1; // for vertical alignment, we have to have no line-height
line-height: 1em; // for vertical alignment, we have to have no line-height
}

.dnb-h1 {
Expand Down

0 comments on commit f44feee

Please sign in to comment.