Skip to content

Commit

Permalink
Replace mixin error_message
Browse files Browse the repository at this point in the history
  • Loading branch information
Wysogota committed Aug 22, 2022
1 parent bf641a7 commit bfdb4c3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
20 changes: 20 additions & 0 deletions client/src/common/styles/_functions.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import './colors ';

%text-overflow {
text-overflow: ellipsis;
overflow: hidden;
Expand All @@ -10,4 +12,22 @@
-webkit-line-clamp: $lines;
-webkit-box-orient: vertical;
overflow: hidden;
}

@mixin error_message($padding) {
padding: $padding;
color: $error_color;
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
}

%remove-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;

&::-webkit-scrollbar {
display: none;
}
}
15 changes: 0 additions & 15 deletions client/src/common/styles/elements.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,4 @@
>* {
text-align: center;
}
}

.header {
@media screen and (max-width: 1200px) {
font-size: 1.5rem;
}
}

@mixin error_message($padding) {
padding: $padding;
color: $error_color;
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
}
2 changes: 1 addition & 1 deletion client/src/components/Input/Input.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../common/styles/elements.module.scss';
@import '../../common/styles/functions';

.error {
@include error_message(0 0.75rem 0 0);
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Settings/Settings.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../common/styles/colors';
@import '../../common/styles/elements.module.scss';
@import '../../common/styles/functions';

.submit {
width: 10rem;
Expand Down

0 comments on commit bfdb4c3

Please sign in to comment.