Skip to content

Commit fb4e566

Browse files
committed
improve(stylesheet): fix left align spotted on Firefox Mobile
1 parent ee91869 commit fb4e566

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

mkdocs_rss_plugin/templates/default.xsl

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@
1010
<html>
1111
<head>
1212
<meta charset="UTF-8"/>
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
1314
<title>
1415
<xsl:value-of select="rss/channel/title"/>
1516
</title>
1617
<style>
18+
19+
*, *::before, *::after {
20+
box-sizing: border-box;
21+
}
22+
1723
body {
1824
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
1925
max-width: 900px;
20-
margin: 40px auto;
21-
padding: 0 20px;
26+
margin: 0 auto;
27+
padding: 20px 16px;
2228
background: #f9fafb;
2329
color: #111827;
2430
}
@@ -41,6 +47,8 @@ header .meta {
4147

4248
h1 {
4349
margin: 0;
50+
font-size: clamp(1.2rem, 5vw, 1.8rem);
51+
word-break: break-word;
4452
}
4553

4654
.item {
@@ -53,6 +61,8 @@ h1 {
5361

5462
.item h2 {
5563
margin-top: 0;
64+
font-size: clamp(1rem, 4vw, 1.3rem);
65+
word-break: break-word;
5666
}
5767

5868
.meta {
@@ -63,22 +73,26 @@ h1 {
6373

6474
.categories span {
6575
background: #eef2ff;
66-
color: #3730a3;
67-
padding: 3px 8px;
68-
margin-right: 5px;
6976
border-radius: 6px;
77+
color: #3730a3;
78+
display: inline-block;
7079
font-size: 0.75em;
80+
margin-right: 5px;
81+
padding: 3px 8px;
7182
}
7283

7384
.item img {
74-
max-width: 100%;
75-
margin: 15px 0;
7685
border-radius: 8px;
86+
display: block;
87+
height: auto;
88+
margin: 15px 0;
89+
width: 100%;
7790
}
7891

7992
a {
8093
color: #2563eb;
8194
text-decoration: none;
95+
word-break: break-word;
8296
}
8397

8498
a:hover {

0 commit comments

Comments
 (0)