Files
supabase/apps/docs/styles/globals.css
T
Anthony Lio 9eaae4cd2c feat(www): brand page (#52295)
## Problem

- a person or an agent cannot link one logo file or pick the file for a
light or a dark background as the brand assets page has one preview
image and two zip downloads only
- `apps/www/lib/json-ld.ts` sets `Organization.logo` to the open graph
banner instead of a logo file

## Solution

- [proposal] Brand Assets -> Brand Guidelines
- [proposal] `/brand-assets` -> `/brand`
- adds the official logos as separate svg and png files in
`/brand-assets/`, with a catalog that tells the background that each
file is for
- show each file on its background, with copy and download actions
- adds `/brand.md` and a "Copy agent prompt" button, so an agent can
read which file to use for each background
- adds a "Copy wordmark" item to the nav logo menu, which copies the
wordmark file for the site theme
- changes `Organization.logo` from the open graph banner to the wordmark
png

`brand assets page`
| before | after |
| -------|------|
| <img width="1637" height="901" alt="image"
src="https://github.com/user-attachments/assets/6b5361c8-0995-4e61-bc29-b5a7ccab7d69"
/> | <img width="1637" height="901" alt="image"
src="https://github.com/user-attachments/assets/0f65ab36-d6f2-427e-8973-eb559139cf8e"
/> |

`logo right click`
| before | after |
| -------|------|
| <img width="676" height="362" alt="image"
src="https://github.com/user-attachments/assets/5abde373-8a37-4ab8-8193-fb7112b97104"
/> | <img width="676" height="362" alt="image"
src="https://github.com/user-attachments/assets/ef5d0724-6a91-4af7-8e9d-59025a9eba87"
/> |

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. run `pnpm dev:www` and open `http://localhost:3000/brand-assets`
2. in the gallery, copy and download one file of each group, and make
sure that each file opens
3. click "Copy agent prompt", and make sure that the copied text names
`https://supabase.com/brand-assets.md`
4. open `http://localhost:3000/brand-assets.md`, and make sure that it
links each svg and png file
5. right-click the nav logo, hover "Copy logo" and "Copy wordmark", and
make sure that the frame moves to the part that each item copies
6. click "Copy wordmark" in the light theme and in the dark theme, and
make sure that the pasted svg has black and then white lettering
7. run `pnpm --filter www exec vitest run data/brand-assets.test.ts`,
and make sure that the tests pass

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-10-29 09:57:35 +11:00

369 lines
7.6 KiB
CSS

@import 'config/tailwind.config.css';
@import 'config/inline-code.css';
@import 'ui-patterns/CodeBlock/code-block.css';
@import 'ui-patterns/Toc/toc-menu.css';
@import 'ui-patterns/Notch/notch.css';
@import './code-block.css';
@import './reference.css';
@import 'docs-search/styles.css';
@source '../app/**/*.{ts,tsx,mdx}';
@source '../components/**/*.tsx';
@source '../content/**/*.{ts,tsx,mdx}';
@source '../docs/**/*.{tsx,mdx}';
@source '../features/**/*.{ts,tsx,mdx}';
@source '../layouts/**/*.tsx';
@source '../pages/**/*.{tsx,mdx}';
@source './../../../packages/ui/src/**/*.{tsx,ts,js}';
@source './../../../packages/ui-patterns/src/**/*.{tsx,ts,js}';
@source './../../../packages/docs-search/src/**/*.{tsx,ts}';
@theme inline {
--font-sans:
var(--font-inter), Inter, Helvetica Neue, Helvetica, ui-sans-serif, system-ui, sans-serif;
--font-heading: var(--font-manrope, var(--font-sans));
--font-mono: 'Source Code Pro', ui-monospace, Menlo, monospace;
}
@theme {
--text-sm: 0.8125rem;
--text-base: 0.9375rem;
--text-lg: 1rem;
--text-xl: 1.125rem;
--text-2xl: 1.375rem;
--text-3xl: 1.75rem;
--text-4xl: 2.125rem;
--text-5xl: 2.875rem;
--text-6xl: 3.625rem;
--text-7xl: 4.375rem;
--text-8xl: 5.875rem;
--text-9xl: 7.875rem;
--font-weight-normal: 450;
}
@layer utilities {
.prose--remove-p-margin p {
margin: 0;
}
}
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--border-default, currentColor);
}
code,
.code-content,
pre,
kbd,
samp,
.font-mono {
--text-xs: 0.75rem;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.25rem;
--text-2xl: 1.5rem;
--text-3xl: 1.875rem;
--text-4xl: 2.25rem;
--text-5xl: 3rem;
--text-6xl: 3.75rem;
--text-7xl: 4.5rem;
--text-8xl: 6rem;
--text-9xl: 8rem;
--font-weight-normal: 400;
}
}
:root {
--sidebar-width: 300px;
--header-height: 50px;
}
html {
scroll-behavior: smooth;
font-weight: 500;
}
html[data-theme*='dark'] {
font-weight: 450;
}
body {
@apply bg-background text-foreground;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
::selection {
background-color: #6ee7b7 !important;
color: #333 !important;
}
h1:not(.font-mono),
h2:not(.font-mono),
h3:not(.font-mono),
h4:not(.font-mono),
h5:not(.font-mono),
h6:not(.font-mono),
.h1:not(.font-mono),
.h2:not(.font-mono),
.h3:not(.font-mono),
.h4:not(.font-mono),
.h5:not(.font-mono),
.h6:not(.font-mono) {
@apply font-heading font-semibold;
}
.thin-scrollbar {
scrollbar-width: thin;
}
.sidebar-width {
width: var(--sidebar-width);
}
.docs-width {
max-width: calc(100% - var(--sidebar-width));
@media screen and (max-width: 1024px) {
max-width: none;
}
}
.width-full {
width: 100% !important;
}
.p:not(.prose *):not(.overwrite) {
@apply text-foreground-light;
margin-bottom: 16px;
}
.small:not(.prose *):not(.overwrite) {
@apply text-foreground-muted text-xs;
}
.prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
white-space: pre-line;
}
.prose :where(p, a, pre):not(:where([class~='not-prose'], [class~='not-prose'] *)),
.prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker {
font-weight: inherit;
}
/* Body text inherits a heavier base weight, so override the shared `strong: 500`
* to keep bold text visually distinct. */
.prose :where(strong, b):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
font-weight: 700;
}
.prose :where(h1, h2, h3, h4, h5, h6):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
@apply font-heading font-semibold;
}
/* Alert set its own type scale to prevent drift in docs */
.prose
:where(p, li, a, figcaption):not(:where([class~='not-prose'], [class~='not-prose'] *)):not(
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) *
):not(:where([data-slot='alert'] *)) {
@apply text-base leading-7;
}
.prose :where([data-slot='alert'] ol > li)::before {
top: 0;
}
.prose :where(h1, .h1):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
@apply text-4xl;
}
.prose :where(h2, .h2):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
@apply text-2xl;
}
.prose :where(h3, .h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
@apply text-xl leading-7;
}
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none !important;
}
/* Spec doc specifics ported from docusaurus */
/* @TODO these should be converted to Tailwind classes */
.method-list-item {
@apply border-t border-gray-400;
.method-list-item-label {
@apply flex items-center gap-1;
}
.method-list-item-label-name {
@apply font-mono font-bold text-sm py-2;
}
.method-list-item-label-badge {
@apply font-mono text-xs px-1;
overflow-wrap: anywhere;
}
.method-list-item-validation {
@apply flex flex-wrap gap-2 items-center;
}
.method-list-item-description {
@apply text-sm space-y-2;
}
}
.method-list-title-isChild {
font-family: var(--font-mono);
& h5 {
font-weight: 200;
}
}
.method-list-group {
@apply p-0 m-0 list-none border-b;
}
.method-list-group .method-list-group {
@apply border border-overlay rounded-md;
margin-bottom: 20px;
max-width: 600px;
}
.method-list-group .method-list-group li {
margin-top: 0;
padding: 12px;
border-bottom: none;
}
.method-list-title {
margin: 0;
padding: 6px 12px;
}
.method-list-group .method-list-group li div,
.method-list-group .method-list-group li h4,
.method-list-group .method-list-group li p {
padding: 0;
margin: 0;
}
.method-list-group .method-list-group li h4 {
margin-bottom: 4px;
}
/* These should move to their own components */
/* wasn't able to get an import path working */
.parent-menu-toggle.active {
svg {
transform: rotate(90deg);
}
}
/* ToC styles */
/* .toc__menu-item--active { */
/* color: hsl(var(--brand-default)) !important; */
/* } */
.video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
}
h2 code,
h3 code,
h4 code {
word-break: keep-all !important;
white-space: nowrap !important;
}
article p strong {
color: inherit !important;
}
/* fix box shadow when <code> is inside <a> */
a:has(code) {
box-shadow: none !important;
}
.short-inline-codeblock {
word-wrap: break-word;
@media screen and (min-width: 769px) {
white-space: pre !important;
}
}
/* fix firefox issue with li wrapping */
.doc-content-container ul li div.relative {
display: inline-block;
}
/* fix ToC links when they have <code> inside */
.toc-menu li a code {
background: none;
border: none;
}
/*
* sets the image in @Next/Image components to respect the height of the content
*/
.next-image--dynamic-fill {
width: 100%;
grid-column: 1 / -1;
}
.next-image--dynamic-fill > span {
position: relative !important;
}
.next-image--dynamic-fill img {
object-fit: contain;
width: 100% !important;
position: relative !important;
height: unset !important;
}
#docs-content-container #introduction {
@apply scroll-mt-60;
}
/* dat.GUI */
.dg.ac {
z-index: 9999 !important;
}
/* tables */
th code {
@apply text-nowrap;
}
/* Zoomable image */
[data-rmiz-modal]:focus,
[data-rmiz-modal-overlay]:focus {
outline: none !important;
}
[data-rmiz-modal-overlay],
[data-rmiz-modal-img] {
transition-timing-function: cubic-bezier(0.24, 0.25, 0.05, 1) !important;
}
[data-rmiz-modal-overlay='visible'] {
background-color: var(--background-default) !important;
opacity: 0.8;
}
[data-rmiz-modal-img] {
image-rendering: high-quality;
}