mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
This is the first PR as a part of the Fleet UI Refresh #38. Changes include: - Add Nunito Sans font files and modify global styles to reflect the font change. - Modify global font variables to reflect new sizing and weight naming conventions. -- New sizing and naming conventions: --- SIZE: xx-small: 12px, x-small: 14px, small: 16px, medium: 20px, large: 24px, x-large: 28px --- WEIGHT: regular: 400, bold: 700 - Remove the old Oxygen font files. Changes to other style sheets reflect the changes to the new font sizing and weight naming conventions for global variables. The changes don't necessarily use the correct size (as illustrated by mockups). Those "up to spec" sizing changes are to come.
165 lines
2.9 KiB
SCSS
165 lines
2.9 KiB
SCSS
$gradient-start: $brand-dark;
|
|
$gradient-end: $brand;
|
|
$inverse-hover: #fafbff;
|
|
$base-class: 'button';
|
|
|
|
@mixin button-variant($color, $hover: null, $shadow: null) {
|
|
@if not $shadow {
|
|
$shadow: adjust-color($color, $lightness: -20%, $saturation: 20%);
|
|
}
|
|
|
|
@if not $hover {
|
|
$hover: darken($color, 5%);
|
|
}
|
|
|
|
background-color: $color;
|
|
|
|
&.#{$base-class}--disabled {
|
|
&:hover {
|
|
background-color: $color;
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
background-color: $hover;
|
|
}
|
|
}
|
|
|
|
.#{$base-class} {
|
|
@include button-variant($link);
|
|
user-select: none;
|
|
transition: color 150ms ease-in-out, background 150ms ease-in-out, top 50ms ease-in-out, box-shadow 50ms ease-in-out, border 50ms ease-in-out;
|
|
position: relative;
|
|
height: 38px;
|
|
text-align: center;
|
|
color: $white;
|
|
line-height: 36px;
|
|
text-decoration: none;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
border-radius: 0;
|
|
font-size: $medium;
|
|
font-family: 'Nunito Sans', sans-serif;
|
|
font-weight: $bold;
|
|
display: inline-block;
|
|
padding: 0 $pad-large;
|
|
top: 0;
|
|
border: 0;
|
|
cursor: pointer;
|
|
box-sizing: border-box;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
&--brand {
|
|
@include button-variant($brand);
|
|
}
|
|
|
|
&--success {
|
|
@include button-variant($success);
|
|
}
|
|
|
|
&--alert {
|
|
@include button-variant($alert);
|
|
}
|
|
|
|
&--muted {
|
|
@include button-variant(#eceef1, null, $footer-accent);
|
|
|
|
color: $footer-accent;
|
|
}
|
|
|
|
&--warning {
|
|
@include button-variant($warning);
|
|
}
|
|
|
|
&--link {
|
|
@include button-variant($link);
|
|
}
|
|
|
|
&--inverse {
|
|
@include button-variant($white, $inverse-hover, $brand);
|
|
color: $brand;
|
|
border: 1px solid $brand;
|
|
border-bottom-color: $brand;
|
|
|
|
&:active {
|
|
border-bottom-color: $brand;
|
|
}
|
|
}
|
|
|
|
&--inverse-alert {
|
|
@include button-variant($white, $inverse-hover, $alert);
|
|
color: $alert;
|
|
border: 1px solid $alert;
|
|
border-bottom-color: $white;
|
|
|
|
&:active {
|
|
border-bottom-color: $alert;
|
|
}
|
|
}
|
|
|
|
&--block {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
&--disabled {
|
|
opacity: 0.4;
|
|
cursor: default;
|
|
|
|
&:hover {
|
|
cursor: default;
|
|
}
|
|
}
|
|
|
|
&--small {
|
|
height: 28px;
|
|
line-height: 26px;
|
|
padding: 0 $pad-medium;
|
|
}
|
|
|
|
&--large {
|
|
height: 48px;
|
|
line-height: 46px;
|
|
}
|
|
|
|
&--gradient {
|
|
background-color: transparent;
|
|
background-image: linear-gradient(134deg, $gradient-start 0%, $gradient-end 0%);
|
|
color: $white;
|
|
font-size: $large;
|
|
font-weight: $regular;
|
|
letter-spacing: 4px;
|
|
padding: $medium;
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
&--unstyled {
|
|
@include button-variant(transparent);
|
|
border: 0;
|
|
box-shadow: none;
|
|
color: $text-dark;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
padding: 0;
|
|
height: auto;
|
|
line-height: normal;
|
|
|
|
&:active {
|
|
box-shadow: none;
|
|
top: 0;
|
|
}
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: transparent;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
}
|