Skip to content

Commit a54e79e

Browse files
committed
Px/em to rem
Update all scss-files to use rem (where appropriate)
1 parent a57f00f commit a54e79e

File tree

25 files changed

+339
-333
lines changed

25 files changed

+339
-333
lines changed

packages/css/src/accordionitem/accordionitem.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
border: 1px solid var(--mdGreyColor60);
44
color: var(--mdGreyColor);
55
font-family: 'Open sans';
6-
margin-bottom: 1em;
6+
margin-bottom: 1rem;
77
transition: all 0.2s linear;
88
}
99

1010
.md-accordion-item.md-accordion-item--rounded {
11-
border-radius: 4px;
11+
border-radius: 0.25rem;
1212
}
1313

1414
.md-accordion-item.md-accordion-item--secondary {
@@ -52,7 +52,7 @@
5252
padding: 1.5em 1.8em;
5353
cursor: pointer;
5454
text-align: left;
55-
line-height: 24px;
55+
line-height: 1.5rem;
5656
}
5757

5858
.md-accordion-item__header:focus {
@@ -67,9 +67,9 @@
6767

6868
.md-accordion-item__header .md-accordion-item__header-icon {
6969
position: relative;
70-
width: 12px;
71-
height: 12px;
72-
min-width: 12px;
70+
width: 0.75rem;
71+
height: 0.75rem;
72+
min-width: 0.75rem;
7373
}
7474
.md-accordion-item__header .md-accordion-item__header-icon:before,
7575
.md-accordion-item__header .md-accordion-item__header-icon:after {
@@ -82,7 +82,7 @@
8282
.md-accordion-item__header .md-accordion-item__header-icon:before {
8383
top: 0;
8484
left: 50%;
85-
width: 2px;
85+
width: 0.125rem;
8686
height: 100%;
8787
margin-left: -1px;
8888
}
@@ -91,7 +91,7 @@
9191
top: 50%;
9292
left: 0;
9393
width: 100%;
94-
height: 2px;
94+
height: 0.125rem;
9595
margin-top: -1px;
9696
}
9797
.md-accordion-item__header--expanded .md-accordion-item__header-icon:before {
@@ -102,7 +102,7 @@
102102
}
103103

104104
.md-accordion-item__header-label {
105-
font-size: 20px;
105+
font-size: 1.25rem;
106106
margin-left: 1em;
107107
}
108108
.md-accordion-item__header:hover .md-accordion-item__header-label {
@@ -111,26 +111,26 @@
111111

112112
/* CONTENT */
113113
.md-accordion-item__content {
114-
padding: 0 1.8em;
114+
padding: 0 1.8rem;
115115
max-height: 0;
116116
overflow: hidden;
117117
transition: all 0.15s linear;
118118
}
119119
.md-accordion-item__content--expanded {
120120
max-height: 5000px;
121-
padding: 1em 1.8em 1.5em 1.8em;
121+
padding: 1rem 1.8rem 1.5rem 1.8rem;
122122
transition: all 0.15s linear;
123123
}
124124

125125
.md-accordion-item__close-button {
126126
display: flex;
127-
gap: 1em;
127+
gap: 1rem;
128128
padding: 0;
129129
background: none;
130130
border: 0;
131-
margin: 2em 0 0 -0.2em;
131+
margin: 2rem 0 0 -0.2rem;
132132
cursor: pointer;
133-
font-size: 16px;
133+
font-size: 1rem;
134134
}
135135

136136
.md-accordion-item__close-button:hover {
@@ -143,8 +143,8 @@
143143
}
144144

145145
.md-accordion-item__close-button__icon {
146-
height: 20px;
147-
width: 20px;
146+
height: 1.25rem;
147+
width: 1.25rem;
148148
}
149149

150150
/* DISABLED */

packages/css/src/chips/chips.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
outline: 1px solid var(--mdPrimaryColor);
66
outline-offset: -1px;
77
border: none;
8-
border-radius: 10em;
8+
border-radius: 10rem;
99
color: var(--mdPrimaryColor);
1010
font-weight: 400;
1111
font-family: 'Open sans';
1212
font-size: 1rem;
13-
line-height: 22px;
13+
line-height: 1.375rem;
1414
padding: 0.5rem 1rem;
1515
cursor: pointer;
1616
text-align: left;
@@ -59,9 +59,9 @@
5959

6060
.md-chip__left-icon {
6161
display: flex;
62-
width: 16px;
63-
height: 16px;
64-
margin-right: 0.66em;
62+
width: 1rem;
63+
height: 1rem;
64+
margin-right: 0.66rem;
6565
}
6666

6767
.md-chip__label {
@@ -70,7 +70,7 @@
7070

7171
.md-chip__right-icon {
7272
display: flex;
73-
width: 16px;
74-
height: 16px;
75-
margin-left: 0.8em;
73+
width: 1rem;
74+
height: 1rem;
75+
margin-left: 0.8rem;
7676
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.md-filelist {
22
display: flex;
33
flex-direction: column;
4-
gap: 0.5em;
4+
gap: 0.5rem;
55
}
66

77
.md-filelist__file {
88
display: flex;
99
justify-content: space-between;
1010
border: 1px solid var(--mdPrimaryColor);
11-
padding: 0.8em 1.1em;
11+
padding: 0.8rem 1.1rem;
1212
font-family: 'Open sans';
1313
background-color: #fff;
1414
transition: background 0.2s linear;
@@ -21,36 +21,36 @@
2121

2222
.md-filelist__file-label {
2323
display: flex;
24-
gap: 1em;
25-
font-size: 16px;
24+
gap: 1rem;
25+
font-size: 1rem;
2626
}
2727

2828
.md-filelist__file-icon {
29-
width: 32px;
29+
width: 2rem;
3030
}
3131

3232
.md-filelist__file-size {
33-
font-size: 14px;
34-
margin-top: 0.3em;
33+
font-size: 0.875rem;
34+
margin-top: 0.3rem;
3535
}
3636

3737
/* File actions */
3838
.md-filelist__file-actions {
3939
display: flex;
4040
align-items: center;
41-
gap: 1em;
41+
gap: 1rem;
4242
}
4343

4444
.md-filelist__file-actions-button {
4545
display: flex;
4646
align-items: center;
4747
justify-content: center;
48-
width: 40px;
49-
height: 40px;
48+
width: 2.5rem;
49+
height: 2.5rem;
5050
background-color: transparent;
51-
border-radius: 100px;
51+
border-radius: 6.25rem;
5252
border: 0;
53-
padding: 0.2em;
53+
padding: 0.2rem;
5454
cursor: pointer;
5555
transition: background 0.1s linear;
5656
}
@@ -61,6 +61,6 @@
6161
}
6262

6363
.md-filelist__file-action-icon {
64-
width: 20px;
65-
height: 20px;
64+
width: 1.25rem;
65+
height: 1.25rem;
6666
}

0 commit comments

Comments
 (0)