Where should globals.css go?
Anywhere your build can import it, usually src/styles/globals.css. Next.js keeps it at app/globals.css and imports it from the root layout. Import it once, after tokens.css if you use one.
Write the base stylesheet every page loads: a modern reset, readable type, keyboard focus, reduced motion and dark mode, in plain CSS or Tailwind CSS v4. Start from one of 14 templates or set each option yourself.
/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 75rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Import globals.css once, in your root layout or main entry. If you turned on tokens.css variables, import tokens.css first.
Fourteen base stylesheets for common kinds of site. Each card writes a complete globals.css: load it to adjust the options, or copy or download it as it is.
The small reset most projects need: border-box sizing, no default margins, responsive media, inherited form fonts, balanced headings and a keyboard focus ring.
Preconfigured for: Any new site or app that does not use Tailwind.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Global styles for a Next.js App Router project on Tailwind v4: theme variables, a class-based dark variant, base styles in @layer base and a skip link.
Preconfigured for: Next.js 15+ projects created with Tailwind v4.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Tailwind CSS v4: Preflight already resets margins, box-sizing and media, so no reset is repeated here. */
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));
/* Theme variables: Tailwind turns these into utilities (bg-primary, text-text-muted, font-sans). */
@theme {
--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@layer base {
:root.dark {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
@layer base {
:root {
color-scheme: light;
}
:root.dark {
color-scheme: dark;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
::selection {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
}
@layer components {
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Tailwind v4 wired to a 2prompt tokens.css: no duplicated colors, every base style reads a token, and dark mode follows the data-theme attribute.
Preconfigured for: Teams with a design-token file who also use Tailwind utilities.
globals.css/* globals.css (generated by 2prompt)
Uses the variables from tokens.css: load tokens.css before this file.
Tailwind CSS v4: Preflight already resets margins, box-sizing and media, so no reset is repeated here. */
@import "tailwindcss";
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
/* Tokens come from tokens.css. Use them in utilities with the variable shorthand, e.g. bg-(--color-surface). */
@layer base {
:root {
color-scheme: light;
}
:root[data-theme="dark"] {
color-scheme: dark;
}
html {
scrollbar-gutter: stable;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: var(--font-sans);
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: var(--font-mono);
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
}
@layer components {
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: var(--space-2) var(--space-4);
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: var(--radius-md);
}
.skip-link:focus {
top: 0.5rem;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
A full reset and OS-following dark mode for a Vite single-page app, with a stable scrollbar gutter so route changes do not shift the layout.
Preconfigured for: Vite apps in React, Vue, Svelte or vanilla JavaScript.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: full reset (lists, tables, buttons too). */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
ul[role="list"], ol[role="list"] {
list-style: none;
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button {
background: none;
border: 0;
padding: 0;
cursor: pointer;
}
textarea:not([rows]) {
min-height: 10em;
}
[hidden] {
display: none !important;
}
/* Base */
html {
scrollbar-gutter: stable;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
::selection {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
/* Utilities */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 80rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Readable long-form documentation: 17px type, generous line height, a 70ch measure, styled code blocks, tables and blockquotes, and a skip link.
Preconfigured for: Documentation sites, handbooks and knowledge bases.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
font-size: 106.25%;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.65;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 60rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
main {
max-width: 70ch;
line-height: 1.65;
}
main h2, main h3, main h4 {
margin-top: 2rem;
margin-bottom: 0.75rem;
}
main p, main ul, main ol, main pre, main table, main blockquote, main figure {
margin-block: 0 1rem;
}
main ul, main ol {
padding-left: 1.5em;
}
main li + li {
margin-top: 0.25em;
}
main :not(pre) > code {
padding: 0.1em 0.35em;
border-radius: 0.25rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
}
main pre {
padding: 1rem;
overflow-x: auto;
border-radius: 0.375rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
line-height: 1.5;
}
main table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
main th, main td {
padding: 0.5em 0.75em;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
main blockquote {
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-text-muted);
}
main hr {
border: 0;
border-top: 1px solid var(--color-border);
margin-block: 2rem;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Dense, stable UI for data-heavy screens: 14px base size, tight line height, full reset, a stable scrollbar gutter and class-based dark mode.
Preconfigured for: Admin panels, internal tools and analytics dashboards.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: full reset (lists, tables, buttons too). */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
:root.dark {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
:root {
color-scheme: light;
}
:root.dark {
color-scheme: dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
ul[role="list"], ol[role="list"] {
list-style: none;
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button {
background: none;
border: 0;
padding: 0;
cursor: pointer;
}
textarea:not([rows]) {
min-height: 10em;
}
[hidden] {
display: none !important;
}
/* Base */
html {
font-size: 87.5%;
scrollbar-gutter: stable;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.4;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Utilities */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 100rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Fluid headings that scale with the viewport through clamp(), smooth anchor scrolling that respects reduced motion, and brand-colored selection.
Preconfigured for: Landing pages, product launches and campaign sites.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
font-size: 112.5%;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
h1 {
font-size: clamp(2rem, 1.25rem + 3.2vw, 3.75rem);
}
h2 {
font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
}
h3 {
font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
::selection {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.container {
width: 100%;
max-width: 75rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Accessibility first: skip link, visible focus ring, reduced motion, screen-reader utility, 44px touch targets and underlined links at a comfortable 18px.
Preconfigured for: Public-sector, education and any site with a WCAG 2.2 AA target.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
font-size: 112.5%;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
html {
-webkit-tap-highlight-color: transparent;
}
body {
overscroll-behavior-y: none;
}
button, [role="button"], a, input, select, textarea {
touch-action: manipulation;
}
button, [role="button"] {
min-height: 44px;
min-width: 44px;
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 75rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Dark by default with a light theme on request through a data-theme attribute, native dark scrollbars and form controls, and brand selection color.
Preconfigured for: Developer tools, media apps and anything used at night.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
:root[data-theme="light"] {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
:root {
color-scheme: dark;
}
:root[data-theme="light"] {
color-scheme: light;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
scrollbar-gutter: stable;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
::selection {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
/* Utilities */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.container {
width: 100%;
max-width: 75rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Good-looking pages from plain semantic HTML with no classes at all: prose styles apply to the main element, so headings, lists, tables and code just work.
Preconfigured for: Prototypes, internal pages and Markdown-rendered HTML.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
font-size: 106.25%;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Long-form text, motion and print */
main {
max-width: 70ch;
line-height: 1.6;
}
main h2, main h3, main h4 {
margin-top: 2rem;
margin-bottom: 0.75rem;
}
main p, main ul, main ol, main pre, main table, main blockquote, main figure {
margin-block: 0 1rem;
}
main ul, main ol {
padding-left: 1.5em;
}
main li + li {
margin-top: 0.25em;
}
main :not(pre) > code {
padding: 0.1em 0.35em;
border-radius: 0.25rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
}
main pre {
padding: 1rem;
overflow-x: auto;
border-radius: 0.375rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
line-height: 1.5;
}
main table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
main th, main td {
padding: 0.5em 0.75em;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
main blockquote {
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-text-muted);
}
main hr {
border: 0;
border-top: 1px solid var(--color-border);
margin-block: 2rem;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Screen styles plus a print stylesheet: black on white, navigation hidden, link URLs printed after the text, and no tables or figures split across pages.
Preconfigured for: Invoices, reports, contracts and anything people print or save as PDF.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
:root {
color-scheme: light;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
body {
min-height: 100vh;
min-height: 100dvh;
font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
/* Long-form text, motion and print */
article {
max-width: 70ch;
line-height: 1.6;
}
article h2, article h3, article h4 {
margin-top: 2rem;
margin-bottom: 0.75rem;
}
article p, article ul, article ol, article pre, article table, article blockquote, article figure {
margin-block: 0 1rem;
}
article ul, article ol {
padding-left: 1.5em;
}
article li + li {
margin-top: 0.25em;
}
article :not(pre) > code {
padding: 0.1em 0.35em;
border-radius: 0.25rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
}
article pre {
padding: 1rem;
overflow-x: auto;
border-radius: 0.375rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
line-height: 1.5;
}
article table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
article th, article td {
padding: 0.5em 0.75em;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
article blockquote {
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-text-muted);
}
article hr {
border: 0;
border-top: 1px solid var(--color-border);
margin-block: 2rem;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
@media print {
body {
color: #000;
background: #fff;
}
nav, aside, footer, .skip-link, button {
display: none;
}
a[href^="http"]::after {
content: " (" attr(href) ")";
font-size: 0.85em;
}
pre, blockquote, table, img, figure {
break-inside: avoid;
}
h1, h2, h3 {
break-after: avoid;
}
}
Full-screen mobile polish: safe-area insets for notches, no tap highlight flash, no pull-to-refresh bounce, 44px touch targets and OS dark mode.
Preconfigured for: Installable web apps and mobile-first single-page apps.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: full reset (lists, tables, buttons too). */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
ul[role="list"], ol[role="list"] {
list-style: none;
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button {
background: none;
border: 0;
padding: 0;
cursor: pointer;
}
textarea:not([rows]) {
min-height: 10em;
}
[hidden] {
display: none !important;
}
/* Base */
body {
min-height: 100vh;
min-height: 100dvh;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
html {
-webkit-tap-highlight-color: transparent;
}
body {
overscroll-behavior-y: none;
}
button, [role="button"], a, input, select, textarea {
touch-action: manipulation;
}
button, [role="button"] {
min-height: 44px;
min-width: 44px;
}
body {
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* Utilities */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Long-form text, motion and print */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
A reading-first blog: book serif body text at 18px, prose styles on the article element, balanced headings and a print stylesheet for readers who print.
Preconfigured for: Personal blogs, newsletters and company engineering blogs.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Reset: modern minimal reset. */
/* Theme */
:root {
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
:root {
color-scheme: light dark;
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
margin: 0;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Base */
html {
font-size: 112.5%;
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
line-height: 1.7;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
::selection {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
/* Utilities */
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
.container {
width: 100%;
max-width: 45rem;
margin-inline: auto;
padding-inline: 1rem;
}
/* Long-form text, motion and print */
article {
max-width: 70ch;
line-height: 1.7;
}
article h2, article h3, article h4 {
margin-top: 2rem;
margin-bottom: 0.75rem;
}
article p, article ul, article ol, article pre, article table, article blockquote, article figure {
margin-block: 0 1rem;
}
article ul, article ol {
padding-left: 1.5em;
}
article li + li {
margin-top: 0.25em;
}
article :not(pre) > code {
padding: 0.1em 0.35em;
border-radius: 0.25rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
}
article pre {
padding: 1rem;
overflow-x: auto;
border-radius: 0.375rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
line-height: 1.5;
}
article table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
article th, article td {
padding: 0.5em 0.75em;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
article blockquote {
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-text-muted);
}
article hr {
border: 0;
border-top: 1px solid var(--color-border);
margin-block: 2rem;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
@media print {
body {
color: #000;
background: #fff;
}
nav, aside, footer, .skip-link, button {
display: none;
}
a[href^="http"]::after {
content: " (" attr(href) ")";
font-size: 0.85em;
}
pre, blockquote, table, img, figure {
break-inside: avoid;
}
h1, h2, h3 {
break-after: avoid;
}
}
Tailwind v4 for an Astro content site: OS-following dark mode, Markdown content styled through a .prose class and a skip link in the layout.
Preconfigured for: Astro sites with Markdown or MDX content collections.
globals.css/* globals.css (generated by 2prompt)
Self-contained: declares the color roles it uses (same names as a 2prompt tokens.css).
Tailwind CSS v4: Preflight already resets margins, box-sizing and media, so no reset is repeated here. */
@import "tailwindcss";
/* Theme variables: Tailwind turns these into utilities (bg-primary, text-text-muted, font-sans). */
@theme {
--font-sans: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
--color-bg: #ffffff;
--color-surface: #f8fafc;
--color-text: #111827;
--color-text-muted: #4b5563;
--color-border: #e5e7eb;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-on-primary: #ffffff;
--color-focus: #2563eb;
}
@layer base {
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0b1120;
--color-surface: #111827;
--color-text: #f3f4f6;
--color-text-muted: #9ca3af;
--color-border: #1f2937;
--color-primary: #60a5fa;
--color-primary-hover: #93c5fd;
--color-on-primary: #0b1120;
--color-focus: #93c5fd;
}
}
}
@layer base {
:root {
color-scheme: light dark;
}
html {
font-size: 106.25%;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
body {
min-height: 100vh;
min-height: 100dvh;
font-family: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-bg);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
line-height: 1.2;
text-wrap: balance;
}
p, li, figcaption {
text-wrap: pretty;
}
code, kbd, samp, pre {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: 0.9em;
}
a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-primary-hover);
text-decoration-thickness: 2px;
}
:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
:focus:not(:focus-visible) {
outline: none;
}
}
@layer components {
.skip-link {
position: absolute;
left: 0.5rem;
top: -3rem;
z-index: 100;
padding: 0.5rem 1rem;
color: var(--color-on-primary);
background-color: var(--color-primary);
border-radius: 0.375rem;
}
.skip-link:focus {
top: 0.5rem;
}
}
.prose {
max-width: 70ch;
line-height: 1.6;
}
.prose h2, .prose h3, .prose h4 {
margin-top: 2rem;
margin-bottom: 0.75rem;
}
.prose p, .prose ul, .prose ol, .prose pre, .prose table, .prose blockquote, .prose figure {
margin-block: 0 1rem;
}
.prose ul, .prose ol {
padding-left: 1.5em;
}
.prose li + li {
margin-top: 0.25em;
}
.prose :not(pre) > code {
padding: 0.1em 0.35em;
border-radius: 0.25rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
}
.prose pre {
padding: 1rem;
overflow-x: auto;
border-radius: 0.375rem;
background-color: var(--color-surface);
border: 1px solid var(--color-border);
line-height: 1.5;
}
.prose table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
padding: 0.5em 0.75em;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
.prose blockquote {
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-text-muted);
}
.prose hr {
border: 0;
border-top: 1px solid var(--color-border);
margin-block: 2rem;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
A globals.css holds the styles every page shares and nothing else: a reset that removes browser inconsistencies, the body font and colors, how links, headings and code look by default, the keyboard focus ring, and the few utilities every project ends up writing, such as a screen-reader-only class and a centered container. Component styles do not belong here. Neither do design decisions like brand colors, which live in tokens.
Keeping the file small and predictable matters more with coding agents in the loop. An agent that finds a clear base layer extends it. An agent that finds a 2,000-line global file adds another override at the bottom, and the file grows forever. A generated globals.css, with the design values in tokens.css and the reasons in DESIGN.md, gives the agent a structure it can follow.
box-sizing: border-box everywhere, so padding and borders never make an element wider than its width.role="list", collapses table borders, strips button chrome, and makes the hidden attribute always win.The reset is written for 2prompt rather than copied from a published one, and every template is checked by a real CSS parser in the test suite. With the Tailwind flavor no reset is written, because Tailwind's Preflight already does this job.
Tailwind CSS v4 is configured in CSS rather than in a JavaScript file. The generated file follows the shape of the Tailwind docs:
@import "tailwindcss"; first, which brings in Preflight and the utilities.@custom-variant dark line when dark mode follows a class or a data-theme attribute instead of the operating system, exactly as the dark mode docs show.@theme block with the font stacks and color roles, so utilities such as bg-primary and text-text-muted exist. With tokens.css on, this block is left out and you use the token variables directly, for example bg-(--color-surface).@layer base and the skip link inside @layer components, so utilities can still override them.Tailwind already ships sr-only and container utilities, so the Tailwind flavor does not redefine them.
Turn on "Use tokens.css variables" and globals.css stops declaring any values of its own. Every color, font, space and radius becomes a variable from the shared token names the tokens.css generator writes: --color-bg, --color-text, --color-primary, --font-sans, --space-4 and the rest. Change a token and every base style follows, in light and dark mode.
With the option off, the file is self-contained. It declares the nine color roles it uses, with the same names, in a light set and a dark set, so you can adopt tokens.css later without touching the rest of the stylesheet.
These cost a few lines and are hard to add later, because other styles grow around their absence. The accessibility audit skill checks the rest of the UI.
Yes. The form, the stylesheet and the template downloads are built in this page. Nothing you type is uploaded, stored or added to the address bar, and the same choices always produce the same bytes.
Anywhere your build can import it, usually src/styles/globals.css. Next.js keeps it at app/globals.css and imports it from the root layout. Import it once, after tokens.css if you use one.
No. Tailwind v4 includes Preflight, its own reset, through @import "tailwindcss". The generated file adds base styles in @layer base on top of it.
Yes. With the tokens option off, globals.css declares the color roles it needs, with light and dark values, and works on its own.
Follow the operating system if you have no theme switch. Pick a class or a data-theme attribute if your app lets people choose, and store their choice yourself.
Every template is parsed by a standards-compliant CSS parser in the test suite. Tailwind-only at-rules such as @theme are reported by the parser as unknown, which is expected; Tailwind compiles them.
You do not have to take our word for it. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing you type is sent. The check takes under a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Only the feedback form can add a line to that log, and it sends only the vote and comment you type into it. 2prompt has no server code at all: no API, no model and no database of your files. The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site, the fonts and the anonymous analytics endpoint.