Skip to content

Commit dc37f94

Browse files
authored
history: windows fonts (#1542)
* history: windows fonts * header styling
1 parent 55590e0 commit dc37f94

File tree

7 files changed

+43
-16
lines changed

7 files changed

+43
-16
lines changed

special-pages/pages/history/app/components/App.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body {
1919
&[data-layout-mode="reduced"] {
2020
--sidebar-width: 230px;
2121
--main-padding-left: 28px;
22-
--main-padding-right: 56px;
22+
--main-padding-right: 36px;
2323
}
2424

2525
[data-platform="windows"] & {

special-pages/pages/history/app/components/Header.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export function Header() {
1717
const domain = useComputed(() => search.value.domain);
1818
return (
1919
<div class={styles.root}>
20-
<Controls term={term} range={range} domain={domain} />
20+
<div class={styles.controls}>
21+
<Controls term={term} range={range} domain={domain} />
22+
</div>
2123
<div class={styles.search}>
2224
<SearchForm term={term} domain={domain} />
2325
</div>
@@ -83,11 +85,9 @@ function Controls({ term, range, domain }) {
8385
}
8486

8587
return (
86-
<div class={styles.controls}>
87-
<button class={styles.largeButton} onClick={onClick} aria-disabled={ariaDisabled} title={title} tabindex={0}>
88-
<Trash />
89-
<span>{buttonTxt}</span>
90-
</button>
91-
</div>
88+
<button class={styles.largeButton} onClick={onClick} aria-disabled={ariaDisabled} title={title} tabindex={0}>
89+
<Trash />
90+
<span>{buttonTxt}</span>
91+
</button>
9292
);
9393
}

special-pages/pages/history/app/components/Header.module.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.root {
22
display: flex;
3+
justify-content: space-between;
34
align-items: center;
45
gap: 8px;
56
color: var(--history-text-normal);
@@ -10,6 +11,7 @@
1011
.controls {
1112
display: flex;
1213
gap: 8px;
14+
flex-shrink: 0;
1315
}
1416

1517
.largeButton {
@@ -49,7 +51,13 @@
4951
}
5052

5153
.search {
52-
margin-left: auto;
54+
max-width: 238px;
55+
width: 100%;
56+
flex-shrink: 1;
57+
display: flex;
58+
}
59+
.form {
60+
width: 100%;
5361
}
5462
.label {
5563
color: inherit;
@@ -70,7 +78,7 @@
7078
}
7179
}
7280
.searchInput {
73-
width: 238px;
81+
width: 100%;
7482
height: 28px;
7583
border-radius: 6px;
7684
border: 0.5px solid var(--history-surface-border-color);

special-pages/pages/history/app/components/Item.module.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@
9797
}
9898

9999
.entryLink {
100+
font-size: var(--label-font-size);
101+
font-weight: var(--label-font-weight);
102+
line-height: var(--row-height);
100103
white-space: nowrap;
101-
font-weight: 510;
102104
flex-shrink: 1;
103105
min-width: 0;
104106
overflow: hidden;
105107
text-overflow: ellipsis;
106108
text-decoration: none;
107109
color: inherit;
108-
line-height: var(--row-height);
109110
pointer-events: none;
110111
}
111112

special-pages/pages/history/app/components/SearchForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function SearchForm({ term, domain }) {
4343
}
4444

4545
return (
46-
<form role="search" onSubmit={submit}>
46+
<form role="search" class={styles.form} onSubmit={submit}>
4747
<label class={styles.label}>
4848
<span class="sr-only">{t('search_your_history')}</span>
4949
<span class={styles.searchIcon}>

special-pages/pages/history/app/components/Sidebar.module.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@
5151

5252

5353
.link {
54+
font-size: var(--label-font-size);
55+
font-weight: var(--label-font-weight);
56+
line-height: var(--label-line-height);
57+
color: var(--history-text-normal);
58+
5459
height: 40px;
5560
display: flex;
5661
align-items: center;
5762
border-radius: 8px;
5863
padding-left: 16px;
5964
text-decoration: none;
60-
font-weight: 510;
61-
color: var(--history-text-normal);
6265
gap: 6px;
6366
border: 0;
6467
box-shadow: none;

special-pages/pages/history/styles/history-theme.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,24 @@
1212
--body-font-weight: 400;
1313
--body-line-height: 16px;
1414

15+
/* Mac/System/Label */
16+
--label-font-size: 13px;
17+
--label-font-weight: 510;
18+
--label-line-height: 13px;
19+
1520
/* title 3 em */
1621
--title-3-em-font-size: 15px;
1722
--title-3-em-font-weight: 590;
1823
--title-3-em-line-height: 20px;
1924
}
2025

2126
/* This comes from the application settings */
22-
:root:has(body[data-platform-name="windows"]) {
27+
:root:has([data-platform="windows"]) {
28+
/* H1 title */
29+
--title-font-size: 24px;
30+
--title-font-weight: 600;
31+
--title-line-height: 32px;
32+
2333
/* Windows/System/Body */
2434
--body-font-size: 14px;
2535
--body-font-weight: 400;
@@ -29,6 +39,11 @@
2939
--title-3-em-font-size: 16px;
3040
--title-3-em-font-weight: 600;
3141
--title-3-em-line-height: 20px;
42+
43+
/* Windows/System/Label */
44+
--label-font-size: 14px;
45+
--label-font-weight: 400;
46+
--label-line-height: normal;
3247
}
3348

3449
[data-theme=light] {

0 commit comments

Comments
 (0)