mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
## Problem Primary colour serves readable text and selected controls, but those uses need different shades. Light mode needs darker text, while dark mode needs a deeper button fill. Fixed brand green on interactive chrome also prevents a custom primary hue from carrying through the interface. Some slider tracks and selected text are hard to read. ## Solution - Keep `--primary` for accessible text and small selected indicators. Use `--primary-solid` for button fills, which need a deeper shade in dark mode. - Add `--primary-bright` for focus rings, selected control chrome, chart accents, and other interactive highlights. It follows `--primary-hue`; `brand-*` stays fixed for Supabase identity. - Make slider troughs clearer and text selection translucent with theme foreground text. - Document the split in the design-system colour guide. | Before | After | | --- | --- | | <img width="980" height="244" alt="Before: light mode primary controls" src="https://github.com/user-attachments/assets/dfae325d-0dfe-4231-8bcd-3f89c4b9d793" /> | <img width="982" height="204" alt="After: light mode primary controls" src="https://github.com/user-attachments/assets/5fdcb531-a6e3-4549-8a13-9d9a5ebe6e20" /> | | <img width="610" height="120" alt="Before: slider track" src="https://github.com/user-attachments/assets/04f768e0-51e8-4d06-9b97-c52f4a34f122" /> | <img width="622" height="126" alt="After: slider track" src="https://github.com/user-attachments/assets/95127f4e-13dc-4f0f-b63c-cf5d70a28b42" /> | | <img width="652" height="512" alt="Before: dark mode controls" src="https://github.com/user-attachments/assets/3f88de66-90cc-40ee-8cf1-b5f4eb87b09a" /> | <img width="658" height="498" alt="After: dark mode controls" src="https://github.com/user-attachments/assets/906bec30-6ca1-4614-9fb3-6cf5e5feec22" /> | ## Review instructions 1. Compare light and dark mode in the [colour usage guide](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#primary-and-brand-colors). Check primary ink, primary-solid, primary-bright, and fixed brand swatches. 2. In Studio, open the ‘new table’ sheet in [Table Editor](https://studio-staging-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/dashboard/project/_/editor). Tab through the new table sheet's fields and toggles. Check the focus rings, selected controls, and the sheet's edges in both themes. You do not need to save a table. 3. Select text in Studio in both themes, including a link or primary-coloured label. The selection and text should remain legible. 4. Check the [Field](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/field) Price Range slider: the unused track should remain visible in both themes. The selected field card border should follow primary-bright. 5. Check the [Button](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/button) and [Radio Group](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/radio-group) previews. In dark mode, `primary` button fill should be deeper than primary [text](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#text); selected radios should remain readable.
439 lines
7.5 KiB
CSS
439 lines
7.5 KiB
CSS
@reference "./globals.css";
|
|
/* Brought over from platform to be cleaned if needed */
|
|
|
|
/* Form panels */
|
|
|
|
.Form,
|
|
.Form button {
|
|
animation: fade 200ms ease-out;
|
|
}
|
|
|
|
.Form .form-control,
|
|
.Form select {
|
|
min-width: 250px;
|
|
width: calc(67% - 0.5rem);
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
.Form .form-group,
|
|
.Form .checkbox {
|
|
@apply w-full;
|
|
}
|
|
|
|
.form-group {
|
|
@apply mb-2 p-0 leading-5 border-0 bg-transparent;
|
|
font-size: 15px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* TO DO: REMOVE */
|
|
.form-group label {
|
|
@apply inline-block text-foreground-light text-sm py-2;
|
|
width: 33%;
|
|
align-self: top;
|
|
}
|
|
|
|
.Form .checkbox .form-check-label {
|
|
@apply flex items-center;
|
|
}
|
|
|
|
.Form .checkbox .form-check-label input[type='checkbox'] {
|
|
@apply mr-4;
|
|
width: auto;
|
|
}
|
|
|
|
.Form input[type='checkbox'] {
|
|
min-width: inherit;
|
|
width: inherit;
|
|
}
|
|
|
|
.Form .form-text,
|
|
.Form .form-error {
|
|
@apply block text-sm text-foreground-lighter my-1;
|
|
display: block;
|
|
margin-left: calc(33% + 0.5rem);
|
|
width: 100%;
|
|
}
|
|
|
|
.Form .form-error {
|
|
@apply text-red-400;
|
|
}
|
|
|
|
.Form .text-danger {
|
|
@apply text-red-900;
|
|
}
|
|
|
|
.Form .form-help {
|
|
@apply text-border-muted;
|
|
}
|
|
|
|
.Form hr {
|
|
@apply mt-4 mb-4;
|
|
}
|
|
|
|
.section-block {
|
|
@apply p-0 rounded-sm bg-surface-100 border border-overlay;
|
|
}
|
|
|
|
.section-block--header {
|
|
@apply border-b border-overlay;
|
|
}
|
|
|
|
.section-block--header h1,
|
|
.section-block--header h2,
|
|
.section-block--header h3,
|
|
.section-block--header h4 {
|
|
@apply m-0;
|
|
}
|
|
|
|
.section-block--header p {
|
|
@apply text-gray-300;
|
|
}
|
|
|
|
.section-block--footer {
|
|
@apply border-overlay bg-surface-100;
|
|
}
|
|
|
|
.section-block--footer button:not(.mr-0) {
|
|
@apply mr-2;
|
|
}
|
|
|
|
/*
|
|
Table
|
|
*/
|
|
|
|
.table-container table {
|
|
@apply w-full;
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.table-container table span {
|
|
@apply truncate;
|
|
}
|
|
|
|
.table-container thead th {
|
|
@apply text-foreground-light font-normal text-sm;
|
|
@apply bg-surface-200;
|
|
@apply border-t border-b border-default;
|
|
}
|
|
|
|
.table-container thead th:first-child {
|
|
@apply rounded-sm rounded-r-none rounded-b-none;
|
|
@apply border-l;
|
|
}
|
|
|
|
.table-container thead th:last-child {
|
|
@apply pr-6 rounded-sm rounded-l-none rounded-b-none;
|
|
@apply border-r;
|
|
}
|
|
|
|
.table-container tbody tr {
|
|
@apply bg-surface-100;
|
|
}
|
|
|
|
.table-container tbody .tr--link {
|
|
@apply cursor-pointer transition-colors;
|
|
}
|
|
|
|
.table-container tbody .tr--link:hover {
|
|
@apply bg-surface-200;
|
|
}
|
|
|
|
.table-container tbody td {
|
|
@apply border-b p-3 px-4 text-sm text-gray-1100 border-default;
|
|
}
|
|
|
|
.table-container tbody td:first-child {
|
|
@apply pl-4 border-b border-l border-default;
|
|
}
|
|
|
|
.table-container tbody td:last-child {
|
|
@apply pr-4 border-b border-r border-default;
|
|
}
|
|
|
|
.table-container tbody tr:last-child td:first-child {
|
|
@apply rounded-sm rounded-r-none rounded-t-none;
|
|
}
|
|
|
|
.table-container tbody tr:last-child td:last-child {
|
|
@apply rounded-sm rounded-l-none rounded-t-none;
|
|
}
|
|
|
|
.table-container--borderless thead th {
|
|
border-top: none;
|
|
}
|
|
|
|
.table-container--borderless thead th:first-child {
|
|
border-left: none;
|
|
}
|
|
|
|
.table-container--borderless thead th:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.table-container--borderless tbody td:first-child {
|
|
border-left: none;
|
|
}
|
|
|
|
.table-container--borderless tbody td:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.table-container--borderless tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Docs */
|
|
.Docs {
|
|
&--inner-wrapper {
|
|
background: linear-gradient(
|
|
90deg,
|
|
var(--background-alternative-default) 50%,
|
|
var(--background-surface-100) 50%
|
|
);
|
|
width: 100%;
|
|
}
|
|
|
|
.dark &--inner-wrapper {
|
|
background: linear-gradient(
|
|
90deg,
|
|
var(--background-surface-100) 50%,
|
|
var(--background-default) 50%
|
|
);
|
|
}
|
|
|
|
/* h1, */
|
|
/* h2, */
|
|
/* h3 { */
|
|
/* @apply p-4 m-0; */
|
|
/* } */
|
|
|
|
.doc-heading {
|
|
@apply text-foreground capitalize mt-4 px-6 w-1/2;
|
|
hyphens: auto;
|
|
max-width: 50%;
|
|
}
|
|
|
|
.doc-section {
|
|
@apply border-b flex border-default;
|
|
}
|
|
|
|
&.Docs--table-editor .doc-section--introduction {
|
|
.text {
|
|
width: 85%;
|
|
}
|
|
}
|
|
|
|
&.Docs--table-editor .doc-section--introduction {
|
|
.text {
|
|
width: 85%;
|
|
}
|
|
}
|
|
|
|
&.Docs--table-editor .doc-section--client-libraries {
|
|
flex-direction: column;
|
|
margin-bottom: 40px;
|
|
|
|
.text,
|
|
.code {
|
|
width: 100%;
|
|
max-width: none;
|
|
}
|
|
.code {
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
.doc-section article:first-child {
|
|
@apply prose prose-docs prose-sm max-w-none;
|
|
}
|
|
|
|
&.Docs--table-editor .doc-section__table-name {
|
|
@apply mt-4;
|
|
}
|
|
|
|
.code-column {
|
|
@apply p-4 px-6 w-1/2;
|
|
max-width: 50%;
|
|
|
|
/* a:not(.btn-primary):not(.btn-secondary) { */
|
|
/* @apply text-green-500; */
|
|
/* } */
|
|
|
|
a {
|
|
@apply transition;
|
|
}
|
|
|
|
a:hover {
|
|
@apply text-primary;
|
|
}
|
|
|
|
p:last-child {
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.code {
|
|
@apply flex-1 p-2 px-6 w-1/2 pb-4;
|
|
max-width: 50%;
|
|
|
|
h4 {
|
|
@apply uppercase font-normal m-1 p-0 text-sm text-foreground-light;
|
|
}
|
|
|
|
h4:not(:first-child) {
|
|
@apply mt-6;
|
|
}
|
|
|
|
code {
|
|
@apply m-1 p-0;
|
|
background-color: none;
|
|
}
|
|
|
|
.is-highlighted {
|
|
@apply text-primary;
|
|
}
|
|
}
|
|
.codeblock-container + .codeblock-container {
|
|
@apply mt-12;
|
|
}
|
|
}
|
|
|
|
::selection {
|
|
background-color: oklch(from var(--primary-bright) l c h / 40%);
|
|
color: var(--foreground) !important;
|
|
}
|
|
|
|
::-moz-selection {
|
|
background-color: oklch(from var(--primary-bright) l c h / 40%);
|
|
color: var(--foreground) !important;
|
|
}
|
|
|
|
.has-hidden-children {
|
|
.visible-child {
|
|
transition: opacity 0.2s ease;
|
|
opacity: 100;
|
|
}
|
|
.hidden-child {
|
|
transition: opacity 0.2s ease;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.has-hidden-children:hover {
|
|
.visible-child {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
.hidden-child {
|
|
opacity: 100;
|
|
}
|
|
}
|
|
|
|
.SQLTabNav {
|
|
overflow-x: auto;
|
|
overflow-y: hidden !important;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none !important;
|
|
}
|
|
|
|
/* for Firefox */
|
|
scrollbar-width: none; /* auto | thin | none | <length>; */
|
|
}
|
|
|
|
.radix-tooltip-arrow {
|
|
polygon {
|
|
@apply fill-background-alternative [[data-theme*=dark]_&]:fill-background-alternative;
|
|
/* fill: #eeeeee; */
|
|
}
|
|
}
|
|
|
|
.pitr-listbox {
|
|
@apply md:gap-x-2;
|
|
}
|
|
|
|
.roles-toggle {
|
|
label {
|
|
@apply mt-1;
|
|
}
|
|
}
|
|
|
|
.thin-scrollbars {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--foreground-muted) var(--background-alternative-default);
|
|
|
|
.dark & {
|
|
scrollbar-color: var(--foreground-lighter) var(--background-surface-100);
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
background: var(--background-default);
|
|
height: 3px;
|
|
width: 0px;
|
|
border-radius: 0;
|
|
|
|
.dark & {
|
|
background: var(--border-control);
|
|
}
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
-webkit-box-shadow: inset 0 0 6px var(--border-control);
|
|
-webkit-border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
|
.dark & {
|
|
-webkit-box-shadow: inset 0 0 6px var(--border-stronger);
|
|
}
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
-webkit-border-radius: 5px;
|
|
border-radius: 5px;
|
|
background: var(--foreground-muted);
|
|
|
|
.dark & {
|
|
-webkit-box-shadow: inset 0 0 6px var(--color-slate-1200);
|
|
}
|
|
}
|
|
}
|
|
|
|
.form-field-markdown {
|
|
a {
|
|
@apply text-primary transition opacity-75 hover:opacity-100 underline;
|
|
}
|
|
}
|
|
|
|
.view-icon {
|
|
rect {
|
|
@apply fill-blue-500 stroke-blue-500;
|
|
}
|
|
path,
|
|
circle {
|
|
@apply stroke-blue-900 fill-blue-500;
|
|
}
|
|
}
|
|
|
|
.table-icon {
|
|
rect {
|
|
@apply fill-green-1000 stroke-green-500;
|
|
}
|
|
line {
|
|
@apply stroke-green-500;
|
|
}
|
|
}
|
|
|
|
.recharts-cartesian-axis-tick {
|
|
text {
|
|
@apply text-xs;
|
|
}
|
|
}
|
|
.recharts-reference-line {
|
|
line {
|
|
@apply stroke-foreground-lighter;
|
|
}
|
|
}
|