phonograph/sass/_globals.scss

154 lines
2.9 KiB
SCSS
Raw Normal View History

2025-07-16 22:03:04 -07:00
@use 'sass:color';
2025-10-01 22:36:19 -07:00
$button-primary-background: #fc0;
$button-primary-color: #000;
2025-09-25 14:51:09 -07:00
$button-shadow: 0 0.15rem 0.15rem #3331;
2025-08-24 23:24:01 -07:00
$default-border-color: #ccc;
$default-border: solid 1px $default-border-color;
2025-09-25 14:51:09 -07:00
$font-family-default: 'Funnel Sans', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
$font-family-data: Menlo, 'Courier New', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
$font-family-mono: Menlo, 'Courier New', Courier, mono;
2025-07-16 22:03:04 -07:00
$popover-border: $default-border;
$popover-shadow: 0 0.5rem 0.5rem #3333;
$border-radius-rounded-sm: 0.25rem;
$border-radius-rounded: 0.5rem;
2025-08-04 13:59:42 -07:00
$link-color: #069;
2025-08-09 00:14:58 -07:00
$notice-color-info: #39d;
2025-10-01 22:36:19 -07:00
$hover-lightness-scale-factor: -5%;
2025-07-16 22:03:04 -07:00
@mixin reset-button {
appearance: none;
background: none;
border: none;
2025-08-04 13:59:42 -07:00
padding: 0;
2025-07-16 22:03:04 -07:00
box-sizing: border-box;
cursor: pointer;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
}
@mixin button-base {
@include reset-button;
@include rounded;
2025-09-25 14:51:09 -07:00
box-shadow: $button-shadow;
2025-10-01 22:36:19 -07:00
font-family: $font-family-mono;
2025-09-25 14:51:09 -07:00
font-weight: 500;
2025-07-16 22:03:04 -07:00
padding: 0.5rem 1rem;
transition: background 0.2s ease;
}
@mixin button-primary {
@include button-base;
2025-09-25 14:51:09 -07:00
2025-07-16 22:03:04 -07:00
background: $button-primary-background;
2025-10-01 22:36:19 -07:00
border: solid 1px color.scale(
$button-primary-background,
$lightness: -5%,
$space: oklch
);
2025-07-16 22:03:04 -07:00
color: $button-primary-color;
&:hover {
2025-08-24 23:24:01 -07:00
background: color.scale(
$button-primary-background,
$lightness: $hover-lightness-scale-factor,
$space: oklch
);
2025-10-01 22:36:19 -07:00
border-color: color.scale(
$button-primary-background,
$lightness: -10%,
$space: oklch
);
2025-08-24 23:24:01 -07:00
}
}
@mixin button-outline {
@include button-base;
background: $button-primary-color;
2025-10-01 22:36:19 -07:00
border: solid 1px color.scale(
$button-primary-background,
$lightness: -5%,
$space: oklch
);
2025-08-24 23:24:01 -07:00
color: $button-primary-background;
&:hover {
border-color: color.scale(
$button-primary-background,
2025-10-01 22:36:19 -07:00
$lightness: -10%,
2025-08-24 23:24:01 -07:00
$space: oklch
);
}
}
@mixin button-secondary {
@include button-base;
2025-09-25 14:51:09 -07:00
2025-08-24 23:24:01 -07:00
background: #fff;
color: #000;
border: $default-border;
&:hover {
border-color: color.scale(
$default-border-color,
$lightness: $hover-lightness-scale-factor,
$space: oklch
);
2025-07-16 22:03:04 -07:00
}
}
@mixin button-clear {
@include button-base;
2025-09-25 14:51:09 -07:00
box-shadow: none;
2025-07-16 22:03:04 -07:00
&:hover {
2025-08-24 23:24:01 -07:00
background: #0000001f;
2025-07-16 22:03:04 -07:00
}
}
2025-09-25 14:51:09 -07:00
@mixin button-small {
padding: 4px 8px;
2025-09-25 14:51:09 -07:00
font-size: 0.9rem;
}
@mixin reset-input {
appearance: none;
background: none;
border: none;
box-sizing: border-box;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
2025-08-10 14:32:15 -07:00
outline: none;
}
2025-10-25 05:32:22 +00:00
@mixin reset-anchor {
color: inherit;
text-decoration: none;
}
2025-07-16 22:03:04 -07:00
@mixin rounded-sm {
border-radius: $border-radius-rounded-sm;
2025-07-16 22:03:04 -07:00
}
@mixin rounded {
border-radius: $border-radius-rounded;
2025-07-16 22:03:04 -07:00
}
2025-09-08 15:56:57 -07:00
@mixin popover {
@include rounded;
inset: unset;
border: $popover-border;
margin: 0;
margin-top: 4px;
padding: 0;
2025-09-08 15:56:57 -07:00
position: relative;
display: block;
background: #fff;
box-shadow: $popover-shadow;
}