Skip to content
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

Standardize Buttons #15330

Draft
wants to merge 2 commits into
base: develop
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
85 changes: 48 additions & 37 deletions website/client/src/assets/scss/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@
font-family: 'Roboto', sans-serif;
font-size: 14px;
font-weight: bold;
line-height: 1.71;
border: 1px solid transparent;
padding: 4px 12px;
line-height: 24px;
border: 2px solid transparent;
padding: 2px 12px;
border-radius: 4px;
box-shadow: 0 1px 3px 0 rgba($black, 0.12), 0 1px 2px 0 rgba($black, 0.24);
color: $white;

&:hover, &:focus {
box-shadow: 0 3px 6px 0 rgba($black, 0.16), 0 3px 6px 0 rgba($black, 0.24);
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);

&.btn-flat {
box-shadow: none;
}
}

&:focus {
border: 2px solid $purple-200;
border-color: $purple-400;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:active, &.active:not(.btn-flat) {
Expand All @@ -32,15 +34,15 @@
opacity: 0.75;
box-shadow: 0 1px 3px 0 rgba(26, 24, 29, 0.12), 0 1px 2px 0 rgba(26, 24, 29, 0.24);
background-color: $gray-700;
border: 1px solid transparent;
border: 2px solid transparent;

.svg {
color: $gray-300;
}
}

&.with-icon {
height: 2rem; // otherwise would something set the height to 33px
height: 32px; // otherwise would something set the height to 33px
display: flex;
flex-direction: row;
align-items: center;
Expand All @@ -49,39 +51,41 @@

.btn-front {
font-size: 16px;
line-height: 1.5;
line-height: 28px;
padding: 7.5px 15.5px;
}

.btn-primary {
background: $purple-200;
border: 1px solid transparent;
border: 2px solid transparent;
line-height: 24px;
--icon-color: #{$purple-500};

&:focus {
background: $purple-200;
border-color: $purple-400;
border: 2px solid $purple-400;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
--icon-color: #{$white};
}

&:not(:disabled):not(.disabled) {
&:hover {
background: #5d3b9c;
border: 1px solid transparent;
background: $purple-200;;
border: 2px solid transparent;

--icon-color: #{$white};
}

&:active, &.active {
background: $purple-200;
border: 1px solid transparent;
border: 2px solid transparent;

--icon-color: #{$white};
}

&:active:focus, &.active:focus {
box-shadow: none;
border-color: $purple-400;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
border: 2px solid $purple-200;
}
}

Expand All @@ -97,15 +101,16 @@
.show > .btn-secondary.dropdown-toggle:not(.btn-success)
{
background: $white;
border: 1px solid transparent;
border: 2px solid transparent;
color: $gray-50;

--icon-color: #{$gray-200};

&:focus, &:active {
color: $gray-50;
background: $white;
border-color: $purple-400;
border: 2px solid $purple-400;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);

--icon-color: #{$purple-300};
}
Expand All @@ -117,19 +122,19 @@

&:focus {
color: $purple-300;
box-shadow: none;
border-color: $purple-400;
border: 2px solid $purple-400;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

background: $white;
border: 1px solid transparent;
border: 2px solid transparent;
}

&:hover {
color: $purple-300;

background: $white !important;
border: 1px solid transparent;
border: 2px solid transparent;

--icon-color: #{$purple-300};
.svg {
Expand All @@ -151,46 +156,50 @@

.btn-danger {
background: $maroon-100;
border: 1px solid transparent;
border: 2px solid transparent;
box-shadow: 0px 1px 3px 0px rgba(26, 24, 29, 0.16), 0px 1px 2px 0px rgba(26, 24, 29, 0.24);


&:hover:not(:disabled):not(.disabled) {
background: #e14e4e;
border: 1px solid transparent;
background: $maroon-100;
border: 2px solid transparent;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:focus {
background: $maroon-100;
border-color: $purple-400;
border: 2px solid $purple-200;
}

&:not(:disabled):not(.disabled):active:focus, &:not(:disabled):not(.disabled).active:focus {
box-shadow: none;
border-color: $purple-400;
border: 2px solid $purple-200;
}

&:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active {
background: $maroon-100;
border: 1px solid transparent;
border: 2px solid transparent;
}
}

.btn-warning {
background: $orange-10;
box-shadow: 0px 1px 3px 0px rgba(26, 24, 29, 0.16), 0px 1px 26px 0px rgba(26, 24, 29, 0.24);
color: $white !important;

&:hover:not(:disabled):not(.disabled) {
background: $orange-100;
background: $orange-10;
color: $white;
}

&:focus {
background: $orange-10;
border-color: $purple-400;
border: 2px solid $purple-200;
}

&:not(:disabled):not(.disabled):active:focus, &:not(:disabled):not(.disabled).active:focus {
box-shadow: none;
border-color: $purple-400;
border: 2px solid $purple-200;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active {
Expand All @@ -200,26 +209,28 @@

.btn-success {
background: $green-50;
border: 1px solid transparent;
border: 2px solid transparent;

&:hover:not(:disabled):not(.disabled) {
background: #32bd8a;
border: 1px solid transparent;
background: $green-50;
border: 2px solid transparent;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:focus {
background: $green-50;
border-color: $purple-400;
border: 2px solid $purple-200;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:not(:disabled):not(.disabled):active:focus, &:not(:disabled):not(.disabled).active:focus {
box-shadow: none;
border-color: $purple-400;
border: 2px solid $purple-200;
box-shadow: 0px 3px 6px 0px rgba(26, 24, 29, 0.16), 0px 3px 6px 0px rgba(26, 24, 29, 0.24);
}

&:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active {
background: $green-50;
border: 1px solid transparent;
border: 2px solid transparent;
}
}

Expand Down
8 changes: 4 additions & 4 deletions website/client/src/assets/scss/dropdown.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.dropdown > .btn {
padding: 0.219rem 0.75rem;
font-family: 'Roboto', sans-serif;
font-size: 14px;
font-weight: normal;
line-height: 24px;
padding: 2px 12px;
}

.dropdown-toggle:hover {
Expand Down Expand Up @@ -33,10 +34,10 @@
}

.dropdown-menu {
padding: 0px;
border: none;
border: transparent;
border-radius: 2px;
box-shadow: 0 3px 6px 0 rgba(26, 24, 29, 0.16), 0 3px 6px 0 rgba(26, 24, 29, 0.24);
padding: 0;

}

Expand Down Expand Up @@ -128,7 +129,6 @@

.dropdown-toggle {
width: 100% !important;
height: 32px;
text-align: left;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:class="{'open': expand}"
@click="expand = !expand"
>
Priviliges, Gem Balance
Privileges, Gem Balance
</h3>
</div>
<div
Expand Down
Loading
Loading