Skip to content

Commit 9c33f00

Browse files
authored
Rename rem() to to-rem() (#8092)
2 parents 658828d + d6542e0 commit 9c33f00

File tree

162 files changed

+571
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+571
-569
lines changed

packages/components/src/components/@shared/_kol-button-mixin.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.#{$block-classname} {
12-
font-style: rem(16);
12+
font-style: to-rem(16);
1313
display: inline-flex;
1414
place-items: center;
1515
text-align: center;

packages/components/src/components/@shared/_kol-link-mixin.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
&__icon {
3636
display: inline-flex;
37-
margin-left: rem(8);
37+
margin-left: to-rem(8);
3838
}
3939
}
4040
}

packages/components/src/components/@shared/_kol-pagination-mixin.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.kol-pagination {
66
align-items: center;
77
display: grid;
8-
gap: rem(16);
8+
gap: to-rem(16);
99
grid-template-columns: 1fr auto;
1010

1111
&__navigation-list {

packages/components/src/components/@shared/_kol-table-settings-mixin.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
z-index: 1;
1111

1212
&__columns-container {
13-
margin-top: rem(16);
14-
max-height: rem(200);
13+
margin-top: to-rem(16);
14+
max-height: to-rem(200);
1515
overflow: auto;
1616
}
1717

1818
&__columns {
1919
align-items: center;
2020
display: grid;
21-
gap: rem(8);
21+
gap: to-rem(8);
2222
grid-auto-rows: min-content;
23-
grid-template-columns: min-content 1fr rem(100) auto auto;
23+
grid-template-columns: min-content 1fr to-rem(100) auto auto;
2424
overflow: hidden;
2525
}
2626

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
@function rem($size) {
1+
@function to-rem($size) {
22
@return calc(#{$size}rem / var(--kolibri-root-font-size, 16));
33
}

packages/components/src/components/a11y.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/*
99
* Minimum size of interactive elements.
1010
*/
11-
--a11y-min-size: #{rem(44)};
11+
--a11y-min-size: #{to-rem(44)};
1212
/*
1313
* No element should be used without a background and font color whose contrast ratio has
1414
* not been checked. By initially setting the background color to white and the font color
@@ -42,7 +42,7 @@
4242
}
4343

4444
/*
45-
* All interactive elements should have a minimum size of rem(44).
45+
* All interactive elements should have a minimum size of to-rem(44).
4646
*/
4747
/* input:not([type='checkbox'], [type='radio'], [type='range']), */
4848
/* option, */

packages/components/src/components/avatar/style.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
border-radius: 50%;
88
overflow: hidden;
99
/* Visible with forced colors */
10-
outline: transparent solid rem(1);
10+
outline: transparent solid to-rem(1);
1111
/*theme?*/
12-
width: rem(100);
13-
height: rem(100);
12+
width: to-rem(100);
13+
height: to-rem(100);
1414

1515
&__image {
1616
width: 100%;
@@ -25,7 +25,7 @@
2525
justify-content: center;
2626
/*theme?*/
2727
background-color: #d3d3d3;
28-
font-size: rem(40);
28+
font-size: to-rem(40);
2929
}
3030
}
3131
}

packages/components/src/components/badge/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
display: inline-flex;
88
place-items: center;
99
/* Visible with forced colors */
10-
outline: transparent solid rem(1);
10+
outline: transparent solid to-rem(1);
1111

1212
.kol-badge__smart-button {
1313
.button {

packages/components/src/components/input-checkbox/style.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
}
6363

6464
.kol-input {
65-
width: rem(22);
66-
height: rem(22);
65+
width: to-rem(22);
66+
height: to-rem(22);
6767
}
6868

6969
&#{$root}--checked,
@@ -90,8 +90,8 @@
9090
&::before {
9191
background-color: #000;
9292
height: 1.2em;
93-
left: calc(0.25em - rem(2));
94-
top: calc(0.25em - rem(2));
93+
left: calc(0.25em - to-rem(2));
94+
top: calc(0.25em - to-rem(2));
9595
position: absolute;
9696
transition: 0.5s;
9797
width: 1.2em;
@@ -115,7 +115,7 @@
115115
position: absolute;
116116
z-index: 1;
117117
top: 50%;
118-
left: rem(4);
118+
left: to-rem(4);
119119
transform: translate(0, -50%);
120120
transition: 0.5s;
121121
color: #000;

packages/components/src/components/input-color/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
}
1818

1919
&--text {
20-
width: rem(112);
20+
width: to-rem(112);
2121
}
2222
}
2323

2424
&__inputs-wrapper {
2525
align-items: center;
2626
display: flex;
2727
flex-direction: row;
28-
gap: rem(6) !important;
28+
gap: to-rem(6) !important;
2929
}
3030
}
3131

0 commit comments

Comments
 (0)