Skip to content

Commit

Permalink
inputField as mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
leesamuel423 committed May 25, 2023
1 parent 62ad271 commit 7efe063
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 42 deletions.
18 changes: 1 addition & 17 deletions client/scss/_testPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,12 @@
}

input {
padding: 0.625rem;
margin-bottom: 1.25rem;
border: 0.1rem solid $color-input-border;
border-radius: 0.3rem;
font-size: $font-size-base;
color: $color-text;
background-color: $color-input-background;
outline: none;

&::placeholder {
color: $color-input-placeholder;
}

&:focus {
border-color: $color-primary;
}
@include inputField;
}

button {
@include standard-button;
margin-bottom: 2rem;
transition: background-color 0.3s ease, transform 0.3s ease; // Add transform transition
}

details {
Expand Down
28 changes: 3 additions & 25 deletions client/scss/_welcomePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,9 @@
}

textarea {
padding: 1rem 0.625rem;
margin-bottom: 1.25rem;
border: 0.1rem solid $color-input-border;
border-radius: 0.3rem;
font-size: $font-size-base;
color: $color-text;
background-color: $color-input-background;
outline: none;


&::placeholder {
color: $color-input-placeholder;
}

&:focus {
border-color: $color-primary;
}
@include inputField;
}


button {
@include standard-button;
Expand All @@ -45,10 +30,7 @@
border: 1px solid white;
padding: 1rem;
border-radius: 4px;
background-color: #202020;
*{
background-color: #202020;
}

summary {
font-weight: $font-weight-semibold;
margin-bottom: 0.5rem;
Expand All @@ -61,9 +43,5 @@
margin: 0.5rem 0;
}
}

p {
margin-bottom: 1rem;
}
}
}
1 change: 1 addition & 0 deletions client/scss/application.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "variables";
@import "styles";
@import "components/buttons";
@import "components/input";
@import "eventLogger";
@import "topBar";
@import "welcomePage";
Expand Down
18 changes: 18 additions & 0 deletions client/scss/components/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@mixin inputField {
padding: 0.625rem;
margin-bottom: 1.25rem;
border: 0.1rem solid $color-input-border;
border-radius: 0.3rem;
font-size: $font-size-base;
color: $color-text;
background-color: $color-input-background;
outline: none;

&::placeholder {
color: $color-input-placeholder;
}

&:focus {
border-color: $color-primary;
}
}

0 comments on commit 7efe063

Please sign in to comment.