Skip to content

DRAFT 830-refactor: Move style params to scss variables #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 3 additions & 3 deletions src/app/docs/components/docs-layout/docs-layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
overflow-y: initial;
display: flex;
flex-direction: column;
gap: 20px;
gap: $gap-m;

height: initial;
}
Expand All @@ -40,7 +40,7 @@
.docs-content {
display: flex;
flex-direction: column;
gap: 40px;
gap: $gap-xxl;

width: 100%;
min-width: 0;
Expand All @@ -59,7 +59,7 @@
align-items: center;

@include media-mobile-landscape {
gap: 20px;
gap: $gap-m;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/docs/components/docs-menu/docs-menu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

padding-left: 12px;

font-size: 14px;
font-size: $font-size-xs;
text-align: left;
list-style-type: none;

Expand Down
2 changes: 1 addition & 1 deletion src/app/docs/components/search/search.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
}

.subresult p {
font-size: 14px;
font-size: $font-size-xs;
}
25 changes: 25 additions & 0 deletions src/core/styles/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,28 @@ $ease-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
$ease-emphasize-decelerate: cubic-bezier(0, 0, 0, 1);
$ease-in-cubic: cubic-bezier(0.32, 0, 0.67, 0);
$standard-decelerate: cubic-bezier(0, 0, 0, 1);

// Border radius
$border-radius-xs: 8px;
$border-radius-s: 12px;
$border-radius-m: 16px;
$border-radius-l: 20px;
$border-radius-xxxl: 999px;

// Font sizes
$font-size-xxs: 12px;
$font-size-xs: 14px;
$font-size-s: 16px;
$font-size-m: 18px;
$font-size-l: 20px;
$font-size-xl: 24px;
$font-size-xxl: 36px;

// Gap
$gap-xs: 8px;
$gap-s: 16px;
$gap-m: 20px;
$gap-l: 24px;
$gap-xl: 32px;
$gap-xxl: 40px;
$gap-xxxl: 50px;
4 changes: 2 additions & 2 deletions src/core/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ figure {

height: var(--slider-arrow-btn-height);
margin: 2px;
border-radius: 8px;
border-radius: $border-radius-xs;

opacity: $opacity-100;
backdrop-filter: blur(20px);
Expand Down Expand Up @@ -205,7 +205,7 @@ figure {
width: 100%;
height: 100%;

font-size: 24px;
font-size: $font-size-xl;
color: $color-white;

background: $color-gray-400;
Expand Down
14 changes: 7 additions & 7 deletions src/entities/course/ui/course-card/course-card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

min-width: 100px;
height: 100%;
border-radius: 12px;
border-radius: $border-radius-s;

&::before {
content: '';
Expand All @@ -33,13 +33,13 @@

overflow: hidden;
display: flex;
gap: 16px;
gap: $gap-s;
align-items: center;

height: 100%;
min-height: 112px;
padding: 36px 32px;
border-radius: 12px 12px 0 0;
border-radius: $border-radius-s $border-radius-s 0 0;

background-color: $color-purple-50;

Expand All @@ -57,15 +57,15 @@

.course-info {
display: flex;
gap: 16px;
gap: $gap-s;
align-items: center;
justify-content: space-between;

padding: 32px;
border-color: $color-gray-200;
border-style: solid;
border-width: 0 1px 1px 1px;
border-radius: 0 0 12px 12px;
border-radius: 0 0 $border-radius-s $border-radius-s;

background-color: $color-white;

Expand Down Expand Up @@ -103,7 +103,7 @@

.course-info {
padding: 24px;
font-size: 14px;
font-size: $font-size-xs;

@include media-laptop-medium {
flex-direction: row;
Expand All @@ -117,7 +117,7 @@
.course-link {
gap: 4px;
padding: 10px 12px;
font-size: 14px;
font-size: $font-size-xs;
}

section {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.course-info {
display: flex;
flex-direction: column;
gap: 8px;
gap: $gap-xs;

width: 100%;

Expand Down
14 changes: 7 additions & 7 deletions src/entities/event/ui/event-card/event-card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

width: 320px;
padding: 0;
border-radius: 12px;
border-radius: $border-radius-s;

.card-header {
position: relative;
Expand All @@ -16,7 +16,7 @@
padding: 32px 24px 24px 24px;
border: solid $color-gray-200;
border-width: 1px 1px 0 1px;
border-radius: 12px 12px 0 0;
border-radius: $border-radius-s $border-radius-s 0 0;

background-color: $color-purple-50;

Expand All @@ -38,7 +38,7 @@
border: 4px solid $color-purple-100;
border-radius: 36px;

font-size: 16px;
font-size: $font-size-s;
line-height: 1.2;
}

Expand All @@ -52,7 +52,7 @@

.event-organization {
margin-top: 10px;
font-size: 20px;
font-size: $font-size-l;
font-weight: $font-weight-medium;
}
}
Expand Down Expand Up @@ -81,7 +81,7 @@
margin-top: 0;
margin-bottom: 8px;

font-size: 16px;
font-size: $font-size-s;
text-overflow: ellipsis;
white-space: nowrap;
}
Expand All @@ -100,7 +100,7 @@
padding: 24px;
border: solid $color-gray-200;
border-width: 0 1px 1px 1px;
border-radius: 0 0 12px 12px;
border-radius: 0 0 $border-radius-s $border-radius-s;

background-color: hsla(from $color-gray-100 h s l/ $opacity-20);

Expand All @@ -112,7 +112,7 @@

margin-bottom: 16px;

font-size: 14px;
font-size: $font-size-xs;
font-weight: $font-weight-medium;
color: $color-gray-500;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.card {
display: flex;
flex-direction: column;
gap: 24px;
gap: $gap-l;
}

.card-wrapper {
max-width: 624px;
min-height: 510px;
padding: 40px 32px 40px 32px;
border-radius: 12px;
border-radius: $border-radius-s;

box-shadow: 0 4px 12px 0 hsla(from $color-black h s l / $opacity-10);

Expand Down Expand Up @@ -36,7 +36,7 @@

.card-info {
display: flex;
gap: 24px;
gap: $gap-l;
align-items: center;
}

Expand All @@ -51,15 +51,15 @@

.card-subtitle {
margin: 0;
font-size: 18px;
font-size: $font-size-m;
font-weight: $font-weight-medium;
}
}

.card-content-wrapper {
display: flex;
flex-direction: column;
gap: 24px;
gap: $gap-l;
align-items: flex-start;
}

Expand Down
16 changes: 8 additions & 8 deletions src/entities/trainer/ui/trainers-card/trainer-card.module.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.trainer-card {
display: flex;
gap: 24px;
gap: $gap-l;
align-items: flex-start;
justify-content: space-between;

max-width: 700px;
padding: 40px 32px 40px 32px;
border-radius: 16px;
border-radius: $border-radius-m;

box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%);

Expand All @@ -17,7 +17,7 @@
img {
width: 100%;
height: auto;
border-radius: 12px;
border-radius: $border-radius-s;
}
}

Expand All @@ -27,28 +27,28 @@

.card-title {
margin: 0;
font-size: 24px;
font-size: $font-size-xl;
font-weight: $font-weight-medium;
line-height: 32px;

@include media-tablet {
font-size: 20px;
font-size: $font-size-l;
}
}

.card-subtitle {
margin: 0;
font-size: 18px;
font-size: $font-size-m;
font-weight: $font-weight-medium;
color: $color-gray-500;

@include media-tablet {
font-size: 18px;
font-size: $font-size-m;
}
}

.card-content {
font-size: 16px;
font-size: $font-size-s;
font-weight: $font-weight-regular;
line-height: 24px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/ui/date-simple/date-simple.module.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.date {
display: flex;
gap: 8px;
gap: $gap-xs;
align-items: center;
justify-content: flex-start;

margin: 0;

font-size: 14px;
font-size: $font-size-xs;
}

.icon {
Expand Down
10 changes: 5 additions & 5 deletions src/shared/ui/link-custom/link-custom.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

display: flex;
flex-flow: row nowrap;
gap: 8px;
gap: $gap-xs;
place-content: center center;
align-items: center;

Expand All @@ -19,7 +19,7 @@
padding: 12px 24px;
border: 1px solid $color-black;

font-size: 18px;
font-size: $font-size-m;
color: $color-black;

.icon-wrapper {
Expand All @@ -41,7 +41,7 @@
padding: 16px 24px;
border: 2px solid $color-black;

font-size: 18px;
font-size: $font-size-m;
line-height: 24px;
color: $color-white;

Expand All @@ -61,9 +61,9 @@
width: max-content;
height: 36px;
padding: 10px 12px;
border-radius: 9999px;
border-radius: $border-radius-xxxl;

font-size: 14px;
font-size: $font-size-xs;
line-height: 16px;
color: $color-black;

Expand Down
Loading