Skip to content

Commit 9ef7f28

Browse files
authored
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 e71ed10 commit 9ef7f28

File tree

11 files changed

+25
-20
lines changed

11 files changed

+25
-20
lines changed

Diff for: packages/uui-card-block-type/lib/uui-card-block-type.element.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ export class UUICardBlockTypeElement extends UUICardElement {
5757
return html`
5858
<button
5959
id="open-part"
60+
class="uui-text"
6061
tabindex=${this.disabled ? (nothing as any) : '0'}
6162
@click=${this.handleOpenClick}
6263
@keydown=${this.handleOpenKeydown}>
63-
<strong>${this.name}</strong><small>${this.description}</small>
64+
<span id="name">${this.name}</span>
65+
<small>${this.description}</small>
6466
</button>
6567
`;
6668
}
@@ -69,6 +71,7 @@ export class UUICardBlockTypeElement extends UUICardElement {
6971
return html`
7072
<a
7173
id="open-part"
74+
class="uui-text"
7275
tabindex=${this.disabled ? (nothing as any) : '0'}
7376
href=${ifDefined(!this.disabled ? this.href : undefined)}
7477
target=${ifDefined(this.target || undefined)}
@@ -78,7 +81,8 @@ export class UUICardBlockTypeElement extends UUICardElement {
7881
this.target === '_blank' ? 'noopener noreferrer' : undefined,
7982
),
8083
)}>
81-
<strong>${this.name}</strong><small>${this.description}</small>
84+
<span id="name">${this.name}</span>
85+
<small>${this.description}</small>
8286
</a>
8387
`;
8488
}
@@ -121,12 +125,11 @@ export class UUICardBlockTypeElement extends UUICardElement {
121125
border-top: 1px solid var(--uui-color-divider);
122126
border-radius: 0 0 var(--uui-border-radius) var(--uui-border-radius);
123127
font-family: inherit;
124-
font-size: var(--uui-type-small-size);
125128
box-sizing: border-box;
126129
padding: var(--uui-size-2) var(--uui-size-4);
127130
display: flex;
128131
flex-direction: column;
129-
line-height: var(--uui-size-6);
132+
line-height: normal;
130133
}
131134
132135
:host([disabled]) #open-part {

Diff for: packages/uui-card-media/lib/uui-card-media.element.ts

-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ export class UUICardMediaElement extends UUICardElement {
200200
width: 100%;
201201
align-items: center;
202202
font-family: inherit;
203-
font-size: var(--uui-type-small-size);
204203
box-sizing: border-box;
205204
text-align: left;
206205
word-break: break-word;

Diff for: 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;

Diff for: 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) {

Diff for: 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>

Diff for: 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*/

Diff for: 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

Diff for: 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
}

Diff for: 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,

Diff for: 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));

Diff for: 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)