Skip to content

Commit 913b79e

Browse files
committed
Improvement: Set Font size 14, as we do in Backoffice (#995)
* change base font size to 14px * fix card font sizes * general font size * just inherit * make more room in combo box list options
1 parent 31700c2 commit 913b79e

File tree

11 files changed

+20
-16
lines changed

11 files changed

+20
-16
lines changed

packages/uui-card-block-type/lib/uui-card-block-type.element.ts

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class UUICardBlockTypeElement extends UUICardElement {
5959
return html`
6060
<button
6161
id="open-part"
62+
class="uui-text"
6263
tabindex=${this.disabled ? (nothing as any) : '0'}
6364
@click=${this.handleOpenClick}
6465
@keydown=${this.handleOpenKeydown}>
@@ -71,6 +72,7 @@ export class UUICardBlockTypeElement extends UUICardElement {
7172
return html`
7273
<a
7374
id="open-part"
75+
class="uui-text"
7476
tabindex=${this.disabled ? (nothing as any) : '0'}
7577
href=${ifDefined(!this.disabled ? this.href : undefined)}
7678
target=${ifDefined(this.target || undefined)}

packages/uui-card-media/lib/uui-card-media.element.ts

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ export class UUICardMediaElement extends UUICardElement {
202202
width: 100%;
203203
align-items: center;
204204
font-family: inherit;
205-
font-size: var(--uui-type-small-size);
206205
box-sizing: border-box;
207206
text-align: left;
208207
word-break: break-word;

packages/uui-card/lib/uui-card.element.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
SelectOnlyMixin,
44
} from '@umbraco-ui/uui-base/lib/mixins';
55
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
6+
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
67
import { css, html, LitElement } from 'lit';
78
import { property } from 'lit/decorators.js';
89

@@ -87,6 +88,7 @@ export class UUICardElement extends SelectOnlyMixin(
8788
}
8889

8990
static styles = [
91+
UUITextStyles,
9092
css`
9193
:host {
9294
position: relative;

packages/uui-combobox-list/lib/uui-combobox-list-option.element.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ export class UUIComboboxListOptionElement extends SelectableMixin(
8585
:host {
8686
position: relative;
8787
cursor: pointer;
88-
margin: 0 4px;
88+
margin: 1px var(--uui-size-2);
8989
border-radius: var(--uui-border-radius);
9090
outline: 2px solid transparent;
9191
outline-offset: -2px;
92-
padding-left: 4px;
92+
padding: var(--uui-size-1);
93+
padding-left: var(--uui-size-2);
9394
}
9495
9596
:host(:first-child) {

packages/uui-css/lib/custom-properties.story.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export const Sizing = () => html`
488488
// <h5>Headline H5</h5>
489489
// <br />
490490
// <p>
491-
// The default font-size is 15px, for a nice reading experience this conforms
491+
// The default font-size is 14px, for a nice reading experience this conforms
492492
// well with a line-height of 24px, which is our base-unit times 4.
493493
// </p>
494494
// <p>

packages/uui-css/lib/custom-properties/sizes.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
--uui-border-radius: var(--uui-size-1);
5454

5555
/** Typography */
56-
--uui-type-default-size: var(--uui-size-5);
57-
--uui-type-small-size: var(--uui-size-4);
56+
--uui-type-default-size: 14px;
57+
--uui-type-small-size: 12px;
5858
--uui-type-h1-size: 60px; /*--uui-size-20*/
5959
--uui-type-h2-size: 42px; /*--uui-size-14*/
6060
--uui-type-h3-size: 30px; /*--uui-size-10*/

packages/uui-css/lib/guidelines.story.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const Typography = () => html`
116116
class 'uui-lead' to a &#60;p&#62; element.
117117
</p>
118118
<p>
119-
The default font-size is 15px, for a nice reading experience this conforms
119+
The default font-size is 14px, for a nice reading experience this conforms
120120
well with a line-height of 24px, (base-unit * 4).
121121
</p>
122122

packages/uui-css/lib/uui-font.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.uui-font {
44
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
5-
font-size: 15px;
5+
font-size: 14px;
66
line-height: calc(var(--uui-size-2) * 4);
77
-webkit-font-smoothing: antialiased;
88
}

packages/uui-css/lib/uui-text.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
.uui-ol,
1313
.uui-text {
1414
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
15-
font-size: 15px;
16-
line-height: calc(var(--uui-size-2) * 4);
15+
font-size: 14px;
16+
line-height: 21px;
1717
-webkit-font-smoothing: antialiased;
1818
}
1919

@@ -114,6 +114,7 @@
114114
.uui-p-lead,
115115
.uui-text p.uui-lead {
116116
font-size: var(--uui-size-6);
117+
line-height: var(--uui-size-8);
117118
}
118119

119120
.uui-a,
@@ -135,22 +136,21 @@
135136
.uui-text small {
136137
display: inline-block;
137138
font-size: var(--uui-type-small-size);
138-
line-height: calc(var(--uui-size-2) * 3);
139-
margin-bottom: var(--uui-size-layout-1);
139+
line-height: 18px;
140140
}
141141

142142
.uui-quoteblock,
143143
.uui-text blockquote {
144144
float: right;
145-
font-size: 15px;
145+
font-size: 14px;
146+
line-height: inherit;
146147
font-weight: 700;
147148
font-style: italic;
148149
margin-top: 0;
149150
margin-bottom: var(--uui-size-layout-1);
150151
margin-right: -0.035em;
151152
max-width: 16em;
152153
quotes: '“' '”' '‘' '’';
153-
line-height: inherit;
154154
}
155155

156156
.uui-quoteblock:before,

packages/uui-select/lib/uui-select.element.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export class UUISelectElement extends UUIFormControlMixin(LitElement, '') {
280280
#native {
281281
display: inline-block;
282282
font-family: inherit;
283-
font-size: var(--uui-select-font-size, var(--uui-size-5));
283+
font-size: var(--uui-select-font-size, inherit);
284284
height: var(--uui-select-height, var(--uui-size-11));
285285
padding: var(--uui-select-padding-y, var(--uui-size-1))
286286
var(--uui-select-padding-x, var(--uui-size-2));

packages/uui-tabs/lib/uui-tab.element.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class UUITabElement extends ActiveMixin(LabelMixin('', LitElement)) {
182182
right: auto;
183183
border-radius: var(--uui-border-radius) var(--uui-border-radius) 0 0;
184184
height: 0px;
185-
width: calc(100% - 15px);
185+
width: calc(100% - 14px);
186186
bottom: 0;
187187
transition:
188188
opacity linear 120ms,

0 commit comments

Comments
 (0)