Skip to content

Commit 2574118

Browse files
authored
perf(ui): standardize metadata text styles (#1295)
1 parent 0e2d593 commit 2574118

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

_sass/addon/commons.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,11 @@ kbd {
132132
}
133133

134134
footer {
135-
font-size: 0.8rem;
136135
background-color: var(--main-bg);
137136
height: $footer-height;
138137
border-top: 1px solid var(--main-border-color);
139138

140-
@extend %text-color;
139+
@extend %text-meta;
141140

142141
a {
143142
@extend %text-highlight;
@@ -382,7 +381,7 @@ main {
382381
}
383382

384383
.post-meta {
385-
font-size: 0.85rem;
384+
@extend %text-meta;
386385

387386
a {
388387
&:not([class]):hover {

_sass/addon/module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@
123123
}
124124

125125
%text-highlight {
126-
color: inherit;
126+
color: var(--text-muted-hightlight-color);
127127
font-weight: 600;
128128
}
129129

130+
%text-meta {
131+
font-size: 0.85rem;
132+
}
133+
130134
%sup-fn-target {
131135
&:target {
132136
background-color: var(--footnote-target-bg);

_sass/colors/typography-dark.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/* Common color */
1212
--text-color: rgb(175, 176, 177);
1313
--text-muted-color: #868686;
14+
--text-muted-hightlight-color: #aeaeae;
1415
--heading-color: #cccccc;
1516
--label-color: #a7a7a7;
1617
--blockquote-border-color: rgb(66, 66, 66);

_sass/colors/typography-light.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/* Common color */
1212
--text-color: #34343c;
1313
--text-muted-color: #757575;
14+
--text-muted-hightlight-color: inherit;
1415
--heading-color: #2a2a2a;
1516
--label-color: #585858;
1617
--blockquote-border-color: #eeeeee;

_sass/layout/post.scss

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,14 @@
2222
padding-right: $pr;
2323
}
2424

25-
%text-color {
26-
color: var(--text-color);
27-
}
28-
2925
h1 + .post-meta {
3026
> span + span::before {
3127
@include dot;
3228
}
3329

3430
em,
3531
time {
36-
color: var(--text-color);
32+
@extend %text-highlight;
3733
}
3834

3935
em {
@@ -44,13 +40,10 @@ h1 + .post-meta {
4440
}
4541

4642
.post-tail-wrapper {
43+
@extend %text-meta;
44+
4745
margin-top: 6rem;
4846
border-bottom: 1px double var(--main-border-color);
49-
font-size: 0.85rem;
50-
51-
.post-tail-bottom a {
52-
color: inherit;
53-
}
5447

5548
.license-wrapper {
5649
line-height: 1.2rem;
@@ -64,7 +57,7 @@ h1 + .post-meta {
6457
}
6558

6659
span:last-child {
67-
font-size: 0.85rem;
60+
@extend %text-meta;
6861
}
6962
} /* .license-wrapper */
7063

@@ -320,7 +313,6 @@ h1 + .post-meta {
320313

321314
.card {
322315
h4 {
323-
@extend %text-color;
324316
@extend %text-clip;
325317
}
326318
}

0 commit comments

Comments
 (0)