Skip to content

Commit d567bb1

Browse files
Use rem for fonts, margins, and padding (#561)
* Use rem for font-size * Use rem for padding * Use rem for margins
1 parent 14777f8 commit d567bb1

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

assets/theme-css/backtotop.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
opacity: 0;
55
visibility: hidden;
66
bottom: 25px;
7-
margin: 0 25px 0 0;
7+
margin: 0 1.563rem 0 0;
88
z-index: 9999;
99
transition: 0.35s;
1010
transform: scale(0.7);
@@ -34,7 +34,7 @@
3434
transition: all 0.3s;
3535
border-radius: 50%;
3636
text-align: center;
37-
font-size: 26px;
37+
font-size: 1.625rem;
3838
}
3939
body #backtotop a {
4040
outline: none;

assets/theme-css/content.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
flex-basis: 70em;
1010
flex-shrink: 1;
1111
flex-direction: column;
12-
margin: 0 30px;
12+
margin: 0 1.875rem;
1313
padding: 1rem;
1414

1515
/* Handle code cells overflowing */

assets/theme-css/footer.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
#footer-logo-column {
13-
padding: 20px 5vw;
13+
padding: 1.25rem 5vw;
1414
font-size: 1rem;
1515
}
1616

@@ -23,8 +23,8 @@
2323
}
2424

2525
.footer-column {
26-
padding-left: 0px;
27-
margin-top: 20px;
26+
padding-left: 0;
27+
margin-top: 1.25rem;
2828
flex-basis: 0;
2929
flex-grow: 1;
3030
flex-shrink: 1;
@@ -40,7 +40,7 @@
4040

4141
.footer-actions {
4242
max-width: 25vw;
43-
margin: 20px 25px;
43+
margin: 1.25rem 1.563rem;
4444
}
4545

4646
.footer-actions > p {
@@ -104,6 +104,6 @@
104104
}
105105

106106
.copyright {
107-
font-size: 12px;
107+
font-size: 0.75rem;
108108
color: var(--colorSecondary);
109109
}

assets/theme-css/lists.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ dl.field-list {
66
dl.field-list > dt {
77
font-weight: bold;
88
word-break: break-word;
9-
padding-left: 0.5em;
10-
padding-right: 5px;
9+
padding-left: 0.5rem;
10+
padding-right: 0.313rem;
1111
}
1212

1313
dl.field-list > dd {
14-
padding-left: 0.5em;
15-
margin-top: 0em;
16-
margin-left: 0em;
17-
margin-bottom: 0em;
14+
padding-left: 0.5rem;
15+
margin-top: 0;
16+
margin-left: 0;
17+
margin-bottom: 0;
1818
}

assets/theme-css/news.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
.news-title {
2121
display: flex;
2222
letter-spacing: 1.5px;
23-
font-size: 27px;
23+
font-size: 1.688rem;
2424
font-weight: bold;
25-
margin: 10px;
26-
margin-right: 20px;
25+
margin: 0.625rem;
26+
margin-right: 1.25rem;
2727
}
2828

2929
@media only screen and (max-width: 1300px) {
@@ -39,7 +39,7 @@
3939
@media only screen and (max-width: 1090px) {
4040
.news-container {
4141
flex-direction: column;
42-
padding: 30px;
42+
padding: 1.875rem;
4343
}
4444

4545
.news-date {

assets/theme-css/posts.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
}
100100

101101
.tag-cloud-title {
102-
font-size: 32px;
103-
margin-top: 60px;
104-
padding-bottom: 10px;
102+
font-size: 2rem;
103+
margin-top: 3.75rem;
104+
padding-bottom: 0.625rem;
105105
}

assets/theme-css/shortcuts.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
#shortcuts {
13-
margin-top: 10px;
13+
margin-top: 0.625rem;
1414
font-size: 0.9rem;
1515
}
1616

@@ -20,7 +20,7 @@
2020
}
2121

2222
#shortcuts > div:not(.active) {
23-
margin-left: 2px;
23+
margin-left: 0.125rem;
2424
border-left: 1px solid var(--pst-color-text-base);
2525
opacity: 0.75;
2626
}
@@ -32,19 +32,19 @@
3232
}
3333

3434
.shortcuts-H2 {
35-
padding: 5px 5px 0 15px;
35+
padding: 0.313rem 0.313rem 0 0.938rem;
3636
font-size: 95%;
3737
cursor: pointer;
3838
}
3939

4040
.shortcuts-H3 {
41-
padding: 5px 5px 0 25px;
41+
padding: 0.313rem 0.313rem 0 1.563rem;
4242
font-size: 90%;
4343
cursor: pointer;
4444
}
4545

4646
.shortcuts-H4 {
47-
padding: 5px 5px 0 35px;
47+
padding: 0.313rem 0.313rem 0 2.188rem;
4848
font-size: 85%;
4949
cursor: pointer;
5050
}

assets/theme-css/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ a > code {
109109

110110
@media only screen and (max-width: 600px) {
111111
.flex-column {
112-
margin: 0 30px;
112+
margin: 0 1.875rem;
113113
}
114114
}
115115

@@ -130,7 +130,7 @@ svg.icon {
130130
}
131131

132132
.chroma {
133-
padding: 10px;
133+
padding: 0.625rem;
134134
}
135135

136136
/* reboot stuff needed for pydata-sphinx-theme */

assets/theme-css/tabs.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
display: flex;
88
flex-flow: row wrap;
99
row-gap: 0.25rem;
10-
margin-bottom: 0px;
11-
padding-bottom: 0px;
10+
margin-bottom: 0;
11+
padding-bottom: 0;
1212
}
1313

1414
/* The tab is the clickable element that selects between tabpanels (see below) */
@@ -48,7 +48,7 @@
4848
[role="tabpanel"] {
4949
border-top: 1px solid var(--pst-color-border);
5050
border-bottom: 1px solid var(--pst-color-border);
51-
margin-top: 1px;
51+
margin-top: 0.063rem;
5252
padding-top: 0.5rem;
5353
padding-bottom: 0.5rem;
5454
width: 100%;

assets/theme-css/videos.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ iframe {
1313
max-width: 100%;
1414
height: 360px;
1515
margin-top: 1rem;
16-
margin-bottom: 0rem;
16+
margin-bottom: 0;
1717
}
1818

1919
.youtube .video-meta {

0 commit comments

Comments
 (0)