Skip to content

Commit 58fbe1e

Browse files
heiskrmikesurowiec
andauthored
Move px to rem in scss files (#23009)
Co-authored-by: Mike Surowiec <[email protected]>
1 parent e8d6d37 commit 58fbe1e

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.breadcrumbs {
2-
clip-path: inset(-5px -5px -5px 0px);
2+
clip-path: inset(-0.5rem -0.5rem -0.5rem 0);
33
}

components/sidebar/SidebarProduct.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.sidebarArticle::before {
22
content: "";
33
position: absolute;
4-
left: 26px;
4+
left: calc(1.5rem + 2px);
55
height: 100%;
66
border-left: 1px solid var(--color-fg-default);
77
width: 1px;

components/ui/MarkdownContent/MarkdownContent.module.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
h5,
1515
h6 {
1616
display: inline-block;
17-
margin-top: 10px;
18-
margin-bottom: 10px;
17+
margin-top: 0.5rem;
18+
margin-bottom: 0.5rem;
1919

2020
p {
2121
margin: 0;
@@ -36,8 +36,8 @@
3636
}
3737
}
3838
& > a[class~="doctocat-link"] {
39-
padding: 8px;
40-
margin-left: -32px;
39+
padding: 0.5rem;
40+
margin-left: -2rem;
4141
color: var(--color-fg-muted);
4242
&:active,
4343
&:focus {
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.markdownBody {
22
[class~="highlight"] pre,
33
pre {
4-
margin-top: 10px;
4+
margin-top: 0.5rem;
55
}
66

77
[class~="height-constrained-code-block"] pre {
8-
max-height: 500px;
8+
max-height: 32rem;
99
overflow: auto;
1010
}
1111

1212
[class~="code-extra"] {
13-
margin-top: 24px;
13+
margin-top: 1.5rem;
1414

1515
pre {
1616
margin-top: 0 !important;
@@ -22,24 +22,24 @@
2222
}
2323
}
2424

25+
// on graphql/overview/resource-limitations
26+
pre [class~="redbox"],
27+
pre [class~="greenbox"],
28+
pre [class~="bluebox"] {
29+
color: var(--color-fg-on-emphasis);
30+
padding: 0 0.25rem;
31+
border-radius: 4px; // primer rounded-1
32+
}
33+
2534
pre [class~="redbox"] {
26-
border: 2px solid var(--color-danger-emphasis);
27-
padding: 2px;
28-
border-radius: 2px;
29-
margin-right: 2px;
35+
background-color: var(--color-danger-emphasis);
3036
}
3137

3238
pre [class~="greenbox"] {
33-
border: 2px solid var(--color-success-emphasis);
34-
padding: 2px;
35-
border-radius: 2px;
36-
margin-right: 2px;
39+
background-color: var(--color-success-emphasis);
3740
}
3841

3942
pre [class~="bluebox"] {
40-
border: 2px solid var(--color-accent-emphasis);
41-
padding: 2px;
42-
border-radius: 2px;
43-
margin-right: 2px;
43+
background-color: var(--color-accent-emphasis);
4444
}
4545
}

components/ui/MarkdownContent/stylesheets/lists.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
counter-reset: li;
44
list-style: none;
55
position: relative;
6-
padding-bottom: 10px;
6+
padding-bottom: 0.5rem;
77
padding-left: 0;
88

99
> li {
10-
padding: 8px 0 8px 40px;
10+
padding: 0.5rem 0 0.5rem 2.5rem;
1111
border: 0;
1212
position: relative;
13-
margin-bottom: 5px;
13+
margin-bottom: 0.25rem;
1414

1515
&:before {
16-
width: 22px;
17-
height: 22px;
18-
font-size: 14px;
19-
margin: 1px 0 0 8px;
16+
width: calc(1.5rem - 2px);
17+
height: calc(1.5rem - 2px);
18+
font-size: calc(1rem - 2px);
19+
margin: 1px 0 0 0.5rem;
2020
content: counter(li);
2121
counter-increment: li;
2222
position: absolute;
@@ -46,11 +46,11 @@
4646
}
4747

4848
p:not(:first-child) {
49-
margin-top: 15px;
49+
margin-top: 1rem;
5050
}
5151

5252
[class~="extended-markdown"] {
53-
margin-top: 15px;
53+
margin-top: 1rem;
5454
}
5555
}
5656

@@ -63,8 +63,8 @@
6363
ul ol,
6464
ol ol,
6565
ol ul {
66-
margin-top: 15px;
67-
margin-bottom: 15px;
66+
margin-top: 1rem;
67+
margin-bottom: 1rem;
6868
}
6969
}
7070

components/ui/MarkdownContent/stylesheets/table.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
font-size: 85%;
1717
padding: 0.2em 0.4em;
1818
background-color: var(--color-canvas-subtle);
19-
border-radius: 6px;
19+
border-radius: 6px; // primer rounded-2
2020
}
2121

2222
pre > code {
@@ -37,8 +37,8 @@
3737
top: 0;
3838
background: var(--color-canvas-default);
3939
box-shadow: 0 3px 0 0 var(--color-canvas-subtle);
40-
padding: 12px 8px;
41-
border: 0px;
40+
padding: 0.75rem 0.5rem;
41+
border: 0;
4242
}
4343

4444
th[align="center"] {
@@ -55,8 +55,8 @@
5555
}
5656

5757
td {
58-
padding: 10px 8px;
59-
border: 0px;
58+
padding: 0.75rem 0.5rem;
59+
border: 0;
6060
vertical-align: top;
6161
}
6262

stylesheets/extended-markdown.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616

1717
p:not(:first-child) {
18-
margin-top: 15px;
18+
margin-top: 1rem;
1919
}
2020

2121
&.note pre code {
@@ -24,7 +24,7 @@
2424

2525
&.note pre {
2626
background: none;
27-
padding: 10px 10px 10px 0;
27+
padding: 0.5rem 0.5rem 0.5rem 0;
2828
margin-bottom: 0;
2929
}
3030
}

0 commit comments

Comments
 (0)