## Description BREAKING CHANGE: Color values have changed and will have different contrasts. If you use any of Payload's colors in your apps, you may need to adjust your use of them to maintain proper styling/accessibility. Colors palettes changed: - `--theme-success-*` - `--theme-error-*` - `--theme-warning-*` - `--color-success-*` - `--color-error-*` - `--color-warning-*` - `--color-blue-*` Updates the color palette used throughout Payload to be more consistent between dark and light values. Contrast values are now more in line with the `theme-elevation` contrasts. Some adjustments to the Toast components as well to match light/dark mode better. - [x] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Change to the [templates](https://github.com/payloadcms/payload/tree/main/templates) directory (does not affect core functionality) - [x] Change to the [examples](https://github.com/payloadcms/payload/tree/main/examples) directory (does not affect core functionality) ## Checklist: - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] Existing test suite passes locally with my changes - [ ] I have made corresponding changes to the documentation
203 lines
3.5 KiB
SCSS
203 lines
3.5 KiB
SCSS
@import 'styles';
|
|
@import './toasts.scss';
|
|
@import './colors.scss';
|
|
|
|
:root {
|
|
--base-px: 25;
|
|
--base-body-size: 13;
|
|
--base: calc((var(--base-px) / var(--base-body-size)) * 1rem);
|
|
|
|
--breakpoint-xs-width: #{$breakpoint-xs-width};
|
|
--breakpoint-s-width: #{$breakpoint-s-width};
|
|
--breakpoint-m-width: #{$breakpoint-m-width};
|
|
--breakpoint-l-width: #{$breakpoint-l-width};
|
|
--scrollbar-width: 17px;
|
|
|
|
--theme-bg: var(--theme-elevation-0);
|
|
--theme-input-bg: var(--theme-elevation-0);
|
|
--theme-text: var(--theme-elevation-800);
|
|
--theme-overlay: rgba(5, 5, 5, 0.5);
|
|
--theme-baseline: #{$baseline-px};
|
|
--theme-baseline-body-size: #{$baseline-body-size};
|
|
--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
sans-serif;
|
|
--font-mono: monospace;
|
|
|
|
--style-radius-s: #{$style-radius-s};
|
|
--style-radius-m: #{$style-radius-m};
|
|
--style-radius-l: #{$style-radius-l};
|
|
|
|
--z-popup: 10;
|
|
--z-nav: 20;
|
|
--z-modal: 30;
|
|
--z-status: 40;
|
|
|
|
--accessibility-outline: 2px solid var(--theme-text);
|
|
--accessibility-outline-offset: 2px;
|
|
|
|
--gutter-h: #{base(3)};
|
|
--spacing-view-bottom: var(--gutter-h);
|
|
--app-header-height: calc(var(--base) * 3);
|
|
--doc-controls-height: calc(var(--base) * 3);
|
|
--nav-width: 275px;
|
|
--nav-trans-time: 150ms;
|
|
|
|
@include mid-break {
|
|
--gutter-h: #{base(2)};
|
|
--app-header-height: calc(var(--base) * 2);
|
|
--doc-controls-height: calc(var(--base) * 2.5);
|
|
}
|
|
|
|
@include small-break {
|
|
--gutter-h: #{base(0.5)};
|
|
--spacing-view-bottom: calc(var(--base) * 2);
|
|
--nav-width: 100vw;
|
|
}
|
|
}
|
|
|
|
/////////////////////////////
|
|
// GLOBAL STYLES
|
|
/////////////////////////////
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html {
|
|
@extend %body;
|
|
background: var(--theme-bg);
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
&[data-theme='dark'] {
|
|
--theme-bg: var(--theme-elevation-0);
|
|
--theme-text: var(--theme-elevation-1000);
|
|
--theme-input-bg: var(--theme-elevation-50);
|
|
--theme-overlay: rgba(5, 5, 5, 0.75);
|
|
color-scheme: dark;
|
|
|
|
::selection {
|
|
color: var(--color-base-1000);
|
|
}
|
|
|
|
::-moz-selection {
|
|
color: var(--color-base-1000);
|
|
}
|
|
}
|
|
|
|
@include mid-break {
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
html,
|
|
body,
|
|
#app {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-body);
|
|
font-weight: 400;
|
|
color: var(--theme-text);
|
|
margin: 0;
|
|
// this is for the nav to be able to push the document over
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
::selection {
|
|
background: var(--color-success-250);
|
|
color: var(--theme-base-800);
|
|
}
|
|
|
|
::-moz-selection {
|
|
background: var(--color-success-250);
|
|
color: var(--theme-base-800);
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
h1 {
|
|
@extend %h1;
|
|
}
|
|
|
|
h2 {
|
|
@extend %h2;
|
|
}
|
|
|
|
h3 {
|
|
@extend %h3;
|
|
}
|
|
|
|
h4 {
|
|
@extend %h4;
|
|
}
|
|
|
|
h5 {
|
|
@extend %h5;
|
|
}
|
|
|
|
h6 {
|
|
@extend %h6;
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 $baseline;
|
|
}
|
|
|
|
ul,
|
|
ol {
|
|
padding-left: $baseline;
|
|
margin: 0 0 $baseline;
|
|
}
|
|
|
|
:focus-visible {
|
|
outline: var(--accessibility-outline);
|
|
}
|
|
|
|
a {
|
|
color: currentColor;
|
|
|
|
&:focus {
|
|
&:not(:focus-visible) {
|
|
opacity: 0.8;
|
|
}
|
|
outline: none;
|
|
}
|
|
|
|
&:active {
|
|
opacity: 0.7;
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
svg {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
dialog {
|
|
width: 100%;
|
|
border: 0;
|
|
padding: 0;
|
|
color: currentColor;
|
|
}
|
|
|
|
.payload__modal-item {
|
|
min-height: 100%;
|
|
background: transparent;
|
|
}
|
|
|
|
.payload__modal-container--enterDone {
|
|
overflow: auto;
|
|
}
|
|
|
|
.payload__modal-item--enter,
|
|
.payload__modal-item--enterDone {
|
|
z-index: var(--z-modal);
|
|
}
|
|
|
|
// @import '~payload-user-css'; TODO: re-enable this
|