Newsletter Signup
An email capture section with inline form. Markup only.
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#18181b, #fafafa);
--color-accent: light-dark(#4f46e5, #818cf8);
--color-bg: light-dark(#ffffff, #0b0b0d);
--color-surface: light-dark(#f7f7f8, #161619);
--color-text: light-dark(#0a0a0c, #f5f5f6);
--color-text-muted: light-dark(#52525b, #a1a1aa);
--color-border: light-dark(#e4e4e7, #26262b);
--font-heading: 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.1;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 0.625rem;
--shadow: 0 1px 2px rgb(10 10 12 / 0.05), 0 4px 12px rgb(10 10 12 / 0.06), 0 16px 40px rgb(10 10 12 / 0.06);
--container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#4f46e5, #818cf8);
--color-accent: light-dark(#a855f7, #c084fc);
--color-bg: light-dark(#ffffff, #0c0c18);
--color-surface: light-dark(#f5f5ff, #16162b);
--color-text: light-dark(#111127, #ececf6);
--color-text-muted: light-dark(#5a5a72, #9d9dbd);
--color-border: light-dark(#e4e4f2, #28284a);
--font-heading: 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.1;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 0.75rem;
--shadow: 0 1px 2px rgb(79 70 229 / 0.06), 0 6px 16px rgb(79 70 229 / 0.10), 0 20px 48px rgb(79 70 229 / 0.10);
--container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#0d9488, #2dd4bf);
--color-accent: light-dark(#f97316, #fb923c);
--color-bg: light-dark(#fbfaf8, #171412);
--color-surface: light-dark(#f3f0ea, #221e1a);
--color-text: light-dark(#292524, #ece7e0);
--color-text-muted: light-dark(#6b6560, #a8a099);
--color-border: light-dark(#e5dfd6, #37312a);
--font-heading: Georgia, 'Times New Roman', serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.15;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 1rem;
--shadow: 0 2px 6px rgb(90 75 60 / 0.06), 0 10px 28px rgb(90 75 60 / 0.10);
--container-width: 1120px;
}
HTML
<section class="s-newsletter-boxed">
<div class="nl-inner">
<div class="nl-panel">
<div class="nl-copy">
<span class="nl-eyebrow">Newsletter</span>
<h2>Get the monthly CSS digest</h2>
<p>One email a month with new blocks and platform features. No spam, unsubscribe anytime.</p>
</div>
<form class="nl-form">
<input type="email" name="email" placeholder="[email protected]" aria-label="Email address" />
<button type="submit">Subscribe</button>
</form>
</div>
</div>
</section>CSS block only, works with any theme's tokens
.s-newsletter-boxed {
background: var(--color-bg);
color: var(--color-text);
font-family: var(--font-body);
padding-block: var(--space-2xl);
}
.s-newsletter-boxed .nl-inner {
max-width: var(--container-width);
margin-inline: auto;
padding-inline: var(--space-lg);
}
.s-newsletter-boxed .nl-panel {
display: grid;
grid-template-columns: 1.2fr 1fr;
gap: var(--space-xl);
align-items: center;
padding: var(--space-xl);
background:
radial-gradient(28rem 16rem at 100% -30%, color-mix(in srgb, var(--color-primary) 10%, transparent), transparent 60%),
var(--color-surface);
border: 1px solid color-mix(in srgb, var(--color-primary) 14%, var(--color-border));
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.s-newsletter-boxed .nl-eyebrow {
display: inline-block;
font-size: var(--text-sm);
font-weight: var(--weight-medium);
color: var(--color-primary);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: var(--space-xs);
}
.s-newsletter-boxed .nl-copy h2 {
font-family: var(--font-heading);
text-wrap: balance;
font-size: var(--text-2xl);
font-weight: var(--weight-bold);
line-height: var(--leading-tight);
letter-spacing: -0.015em;
margin: 0 0 var(--space-sm);
}
.s-newsletter-boxed .nl-copy p {
font-size: var(--text-base);
line-height: var(--leading-normal);
text-wrap: pretty;
color: var(--color-text-muted);
margin: 0;
}
.s-newsletter-boxed .nl-form {
display: flex;
gap: var(--space-sm);
}
.s-newsletter-boxed input {
flex: 1;
min-width: 0;
font-family: inherit;
font-size: var(--text-base);
color: var(--color-text);
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: var(--space-sm) var(--space-md);
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.s-newsletter-boxed input:focus {
outline: none;
border-color: var(--color-primary);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.s-newsletter-boxed button {
font-family: inherit;
font-size: var(--text-base);
font-weight: var(--weight-medium);
color: var(--color-bg);
background: var(--color-primary);
border: none;
border-radius: var(--radius);
padding: var(--space-sm) var(--space-lg);
cursor: pointer;
white-space: nowrap;
box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 14%, transparent), 0 8px 20px color-mix(in srgb, var(--color-primary) 25%, transparent);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.s-newsletter-boxed button:hover {
transform: translateY(-2px);
box-shadow: 0 2px 4px color-mix(in srgb, var(--color-text) 14%, transparent), 0 12px 28px color-mix(in srgb, var(--color-primary) 32%, transparent);
}
@media (max-width: 768px) {
.s-newsletter-boxed .nl-panel {
grid-template-columns: 1fr;
gap: var(--space-lg);
}
}
@media (max-width: 480px) {
.s-newsletter-boxed .nl-form {
flex-direction: column;
}
}
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#18181b, #fafafa);
--color-accent: light-dark(#4f46e5, #818cf8);
--color-bg: light-dark(#ffffff, #0b0b0d);
--color-surface: light-dark(#f7f7f8, #161619);
--color-text: light-dark(#0a0a0c, #f5f5f6);
--color-text-muted: light-dark(#52525b, #a1a1aa);
--color-border: light-dark(#e4e4e7, #26262b);
--font-heading: 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.1;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 0.625rem;
--shadow: 0 1px 2px rgb(10 10 12 / 0.05), 0 4px 12px rgb(10 10 12 / 0.06), 0 16px 40px rgb(10 10 12 / 0.06);
--container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#4f46e5, #818cf8);
--color-accent: light-dark(#a855f7, #c084fc);
--color-bg: light-dark(#ffffff, #0c0c18);
--color-surface: light-dark(#f5f5ff, #16162b);
--color-text: light-dark(#111127, #ececf6);
--color-text-muted: light-dark(#5a5a72, #9d9dbd);
--color-border: light-dark(#e4e4f2, #28284a);
--font-heading: 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.1;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 0.75rem;
--shadow: 0 1px 2px rgb(79 70 229 / 0.06), 0 6px 16px rgb(79 70 229 / 0.10), 0 20px 48px rgb(79 70 229 / 0.10);
--container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
color-scheme: light dark;
--color-primary: light-dark(#0d9488, #2dd4bf);
--color-accent: light-dark(#f97316, #fb923c);
--color-bg: light-dark(#fbfaf8, #171412);
--color-surface: light-dark(#f3f0ea, #221e1a);
--color-text: light-dark(#292524, #ece7e0);
--color-text-muted: light-dark(#6b6560, #a8a099);
--color-border: light-dark(#e5dfd6, #37312a);
--font-heading: Georgia, 'Times New Roman', serif;
--font-body: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.375rem;
--text-2xl: 1.75rem;
--text-3xl: 2.375rem;
--text-4xl: 3.5rem;
--weight-normal: 400;
--weight-medium: 500;
--weight-bold: 700;
--leading-tight: 1.15;
--leading-normal: 1.6;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
--space-3xl: 8rem;
--radius: 1rem;
--shadow: 0 2px 6px rgb(90 75 60 / 0.06), 0 10px 28px rgb(90 75 60 / 0.10);
--container-width: 1120px;
}
HTML
<section class="s-newsletter-centered">
<div class="nl-inner">
<h2>Join 800+ developers</h2>
<p>Modern CSS, straight to your inbox. One email a month.</p>
<form class="nl-form">
<input type="email" name="email" placeholder="[email protected]" aria-label="Email address" />
<button type="submit">Subscribe</button>
</form>
<span class="nl-fine">No spam. Unsubscribe anytime.</span>
</div>
</section>CSS block only, works with any theme's tokens
.s-newsletter-centered {
background:
radial-gradient(34rem 18rem at 85% -20%, color-mix(in srgb, var(--color-accent) 30%, transparent), transparent 60%),
linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, var(--color-accent)));
color: var(--color-bg);
font-family: var(--font-body);
padding-block: var(--space-3xl);
text-align: center;
}
.s-newsletter-centered .nl-inner {
max-width: 560px;
margin-inline: auto;
padding-inline: var(--space-lg);
}
.s-newsletter-centered h2 {
font-family: var(--font-heading);
text-wrap: balance;
font-size: var(--text-3xl);
font-weight: var(--weight-bold);
line-height: var(--leading-tight);
letter-spacing: -0.02em;
margin: 0 0 var(--space-sm);
}
.s-newsletter-centered p {
font-size: var(--text-lg);
margin: 0 0 var(--space-lg);
opacity: 0.88;
}
.s-newsletter-centered .nl-form {
display: flex;
gap: var(--space-sm);
max-width: 420px;
margin: 0 auto var(--space-sm);
}
.s-newsletter-centered input {
flex: 1;
min-width: 0;
font-family: inherit;
font-size: var(--text-base);
color: var(--color-text);
background: var(--color-bg);
border: none;
border-radius: var(--radius);
padding: var(--space-sm) var(--space-md);
box-shadow: 0 2px 8px color-mix(in srgb, var(--color-text) 18%, transparent);
}
.s-newsletter-centered input:focus {
outline: 3px solid color-mix(in srgb, var(--color-bg) 45%, transparent);
outline-offset: 1px;
}
.s-newsletter-centered button {
font-family: inherit;
font-size: var(--text-base);
font-weight: var(--weight-bold);
color: var(--color-primary);
background: var(--color-bg);
border: none;
border-radius: var(--radius);
padding: var(--space-sm) var(--space-lg);
cursor: pointer;
white-space: nowrap;
box-shadow: 0 2px 8px color-mix(in srgb, var(--color-text) 20%, transparent);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.s-newsletter-centered button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 14px color-mix(in srgb, var(--color-text) 25%, transparent);
}
.s-newsletter-centered .nl-fine {
font-size: var(--text-sm);
opacity: 0.75;
}
@media (max-width: 480px) {
.s-newsletter-centered .nl-form {
flex-direction: column;
}
}
Modern CSS in this block
Baseline 2024 — works in every up-to-date browser.
- color-mix()Newly availableMixing colors without a preprocessor
- text-wrap: balanceNewly availableBalanced headlines without manual line breaks
- text-wrap: prettyNewly availablePretty paragraph wrapping without orphan words
Plus universally supported features: logical properties, custom properties. Baseline status is pulled from each feature's reference snippet.