Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.#{$block-classname} {
font-style: rem(16);
font-style: to-rem(16);
display: inline-flex;
place-items: center;
text-align: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

&__icon {
display: inline-flex;
margin-left: rem(8);
margin-left: to-rem(8);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.kol-pagination {
align-items: center;
display: grid;
gap: rem(16);
gap: to-rem(16);
grid-template-columns: 1fr auto;

&__navigation-list {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
z-index: 1;

&__columns-container {
margin-top: rem(16);
max-height: rem(200);
margin-top: to-rem(16);
max-height: to-rem(200);
overflow: auto;
}

&__columns {
align-items: center;
display: grid;
gap: rem(8);
gap: to-rem(8);
grid-auto-rows: min-content;
grid-template-columns: min-content 1fr rem(100) auto auto;
grid-template-columns: min-content 1fr to-rem(100) auto auto;
overflow: hidden;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/@shared/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@function rem($size) {
@function to-rem($size) {
@return calc(#{$size}rem / var(--kolibri-root-font-size, 16));
}
4 changes: 2 additions & 2 deletions packages/components/src/components/a11y.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* Minimum size of interactive elements.
*/
--a11y-min-size: #{rem(44)};
--a11y-min-size: #{to-rem(44)};
/*
* No element should be used without a background and font color whose contrast ratio has
* not been checked. By initially setting the background color to white and the font color
Expand Down Expand Up @@ -42,7 +42,7 @@
}

/*
* All interactive elements should have a minimum size of rem(44).
* All interactive elements should have a minimum size of to-rem(44).
*/
/* input:not([type='checkbox'], [type='radio'], [type='range']), */
/* option, */
Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/components/avatar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
border-radius: 50%;
overflow: hidden;
/* Visible with forced colors */
outline: transparent solid rem(1);
outline: transparent solid to-rem(1);
/*theme?*/
width: rem(100);
height: rem(100);
width: to-rem(100);
height: to-rem(100);

&__image {
width: 100%;
Expand All @@ -25,7 +25,7 @@
justify-content: center;
/*theme?*/
background-color: #d3d3d3;
font-size: rem(40);
font-size: to-rem(40);
}
}
}
2 changes: 1 addition & 1 deletion packages/components/src/components/badge/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: inline-flex;
place-items: center;
/* Visible with forced colors */
outline: transparent solid rem(1);
outline: transparent solid to-rem(1);

.kol-badge__smart-button {
.button {
Expand Down
10 changes: 5 additions & 5 deletions packages/components/src/components/input-checkbox/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
}

.kol-input {
width: rem(22);
height: rem(22);
width: to-rem(22);
height: to-rem(22);
}

&#{$root}--checked,
Expand All @@ -90,8 +90,8 @@
&::before {
background-color: #000;
height: 1.2em;
left: calc(0.25em - rem(2));
top: calc(0.25em - rem(2));
left: calc(0.25em - to-rem(2));
top: calc(0.25em - to-rem(2));
position: absolute;
transition: 0.5s;
width: 1.2em;
Expand All @@ -115,7 +115,7 @@
position: absolute;
z-index: 1;
top: 50%;
left: rem(4);
left: to-rem(4);
transform: translate(0, -50%);
transition: 0.5s;
color: #000;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/input-color/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
}

&--text {
width: rem(112);
width: to-rem(112);
}
}

&__inputs-wrapper {
align-items: center;
display: flex;
flex-direction: row;
gap: rem(6) !important;
gap: to-rem(6) !important;
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/input-file/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@layer kol-component {
.kol-input {
padding: calc((var(--a11y-min-size) - rem(16)) / 10) 0.5em;
padding: calc((var(--a11y-min-size) - to-rem(16)) / 10) 0.5em;
position: absolute;
inset: 0;
width: 100%;
Expand Down Expand Up @@ -48,7 +48,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: rem(4);
margin-left: to-rem(4);
}

&:has(> #{$root}__adornment--start):has(> #{$root}__adornment--end) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

@layer kol-component {
.kol-input-password {
--kol-tooltip-width: #{rem(160)};
--kol-tooltip-width: #{to-rem(160)};
}
}
10 changes: 5 additions & 5 deletions packages/components/src/components/input-range/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
border: 1px solid #000;
display: inline-block;
flex-grow: 1;
height: rem(8);
height: to-rem(8);
line-height: 1.5;
padding: 0;
margin: 0;
Expand All @@ -41,8 +41,8 @@

&::-webkit-slider-thumb {
background-color: #000;
height: rem(20);
width: rem(20);
height: to-rem(20);
width: to-rem(20);
border-radius: 20px;
-webkit-appearance: none;

Expand All @@ -57,8 +57,8 @@

&::-moz-range-thumb {
background-color: #000;
height: rem(20);
width: rem(20);
height: to-rem(20);
width: to-rem(20);
border-radius: 20px;
-moz-appearance: none;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/kolibri/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
max-height: 100%;

&__text {
font-size: rem(90);
font-size: to-rem(90);
letter-spacing: normal;
word-spacing: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

&__close-button {
position: absolute;
top: rem(1);
right: rem(1);
top: to-rem(1);
right: to-rem(1);
z-index: 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/select/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/* needed hack for vertical alignment */
&[multiple] option {
padding: calc((var(--a11y-min-size) - rem(16)) / 2) 0.5em;
padding: calc((var(--a11y-min-size) - to-rem(16)) / 2) 0.5em;
}
}
}
6 changes: 3 additions & 3 deletions packages/components/src/components/single-select/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@include kol-input-container;
@include kol-input;

$option-height: rem(40);
$option-height: to-rem(40);
$visible-options: var(--visible-options, 5);

@layer kol-component {
Expand All @@ -34,11 +34,11 @@ $visible-options: var(--visible-options, 5);
display: flex;
align-items: center;
justify-content: center;
min-height: rem(50);
min-height: to-rem(50);
}

.kol-custom-suggestions-options-group {
max-height: calc($option-height * $visible-options + rem(2)) !important;
max-height: calc($option-height * $visible-options + to-rem(2)) !important;
}
}
}
2 changes: 1 addition & 1 deletion packages/components/src/components/skip-nav/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

.kol-link {
left: rem(-99999);
left: to-rem(-99999);
overflow: hidden;
position: absolute;
z-index: 9999999;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/spin/cycle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
.kol-spin {
&__spinner {
&--cycle {
width: rem(48);
height: rem(48);
width: to-rem(48);
height: to-rem(48);
}
}

Expand Down
22 changes: 11 additions & 11 deletions packages/components/src/components/spin/dot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@
.kol-spin {
&__spinner {
&--dot {
height: rem(16);
width: rem(48);
height: to-rem(16);
width: to-rem(48);
}
}

&__spinner-element {
animation-timing-function: cubic-bezier(0, 1, 1, 0);
border-radius: 50%;
border: rem(0.16) solid #fff;
height: rem(12.8);
border: to-rem(0.16) solid #fff;
height: to-rem(12.8);
position: absolute;
top: rem(0.16);
width: rem(12.8);
top: to-rem(0.16);
width: to-rem(12.8);

&--1 {
background-color: #000;
z-index: 0;
animation: 1s infinite spin1;
left: rem(0.16);
left: to-rem(0.16);
}

&--2 {
background-color: #000;
z-index: 1;
animation: 1s infinite spin2;
left: rem(0.16);
left: to-rem(0.16);
}

&--3 {
background-color: #000;
z-index: 1;
animation: 1s infinite spin2;
left: rem(17.6);
left: to-rem(17.6);
}

&--neutral {
background-color: #666;
z-index: 0;
animation: 1s infinite spin3;
left: rem(33.6);
left: to-rem(33.6);
}
}
}
Expand All @@ -64,7 +64,7 @@
}

100% {
transform: translate(rem(16), 0);
transform: translate(to-rem(16), 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/spin/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.kol-spin {
&__spinner {
display: block;
padding: rem(2);
padding: to-rem(2);
position: relative;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/split-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

.kol-popover {
&__content {
margin-top: rem(2);
margin-top: to-rem(2);
}

&__arrow {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/tooltip/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
&__arrow {
background-color: #fff;
color: #000;
height: rem(10);
height: to-rem(10);
position: absolute;
transform: rotate(45deg);
width: rem(10);
width: to-rem(10);
z-index: 999;
}

Expand Down
Loading
Loading