Classless CSS Framework with Georgia & Verdana Typography System – MCSS
It’s built as a tribute to the work of type designer Matthew Carter, using his iconic Georgia and Verdana typefaces to create a clean, readable experience for content-heavy websites.
The framework automatically detects dark mode preferences and includes two distinct typographic themes that you can switch with a single HTML attribute.
It’s perfect for developers who want accessible, readable layouts for blogs and articles without writing custom CSS or learning a new class naming system.
1. Link the MCSS stylesheet in your HTML head.
<link rel="stylesheet" href="mcss.css">
2. MCSS provides two themes controlled by the data-theme attribute on your HTML element. Each theme uses different typography and spacing calibrations:
Georgia Theme: Set data-theme="georgia" for serif typography with generous vertical spacing. Georgia’s large x-height and wide characters work well for body text at standard sizes. The framework applies looser line height (1.475) and larger spacing multipliers to accommodate the typeface’s proportions.
<html data-theme="georgia">...</html>
Verdana Theme: Set data-theme="verdana" for sans-serif typography with compact spacing. Verdana’s wider letterforms and larger counters remain legible at smaller sizes, so the theme reduces base font size and tightens vertical rhythm (1.45 line height). Horizontal rules render as solid 2px lines instead of decorative gradients.
<html data-theme="verdana">...</html>
3. MCSS styles these elements without requiring classes:
h1 through h6, p, blockquote, q, strong, em, small, abbr, code, kbd, pre, sup, subul, ol, li, dlform, fieldset, label, input, textarea, select, buttontable, captionheader, footer, nav, section, article, figure, figcaption, details, summarya, hr4. Override MCSS defaults by declaring CSS custom properties in a layer that loads after the framework. The @layer directive keeps your overrides organized:
@layer config {
:root {
--gutter: clamp(1rem, 2.5vmax, 1.5rem);
--stack: clamp(1.25ex, 2.5vmax, 1.75ex);
--paragraph-indent: calc(var(--gutter) / 1.25);
--line-length: 66ch;
--page-padding-inline: calc((100vi - min(var(--line-length), 80vi)) / 2);
--page-padding-block: calc(var(--stack) * 8);
--landmark-hr-size: 1ex;
--landmark-hr-margin-block: var(--page-padding-block);
--hr-size: 0.5ex;
--hr-margin-block: calc(var(--stack) * 4);
--border-image-source: gray, color-mix(in oklch, gray 40%, transparent),
color-mix(in oklch, gray 40%, transparent), gray;
--underline: solid;
--focus-outline: 2px solid crimson;
--focus-outline-offset: 2px;
--font: "Georgia", serif;
--font-variant: "Verdana", system-ui, sans-serif;
--font-mono: ui-monospace, sfmono-regular, sf mono, menlo, consolas,
liberation mono, monospace;
--font-size: clamp(95%, 80% + 0.5vi, 130%);
--leading: 1.475;
--pt-double-canon: clamp(3em, 2.5179em + 2.4107vi, 4.666em);
--pt-canon: clamp(2.5em, 2.2321em + 1.9643vi, 3.999em);
--pt-double-great-primer: clamp(2em, 1.7143em + 1.4286vi, 2.999em);
--pt-double-pica: clamp(1.65em, 1.3571em + 0.7143vi, 2em);
--pt-paragon: clamp(1.35em, 1.2054em + 0.5357vi, 1.666em);
--pt-english: 1.166em;
--pt-pica: 1em;
--pt-small-pica: 0.916em;
--pt-long-primer: 0.833em;
--pt-bourgeois: 0.75em;
font-family: var(--font);
font-size: var(--font-size);
line-height: var(--leading);
color-scheme: dark light;
accent-color: crimson;
}
[data-theme="verdana"] {
--landmark-hr-size: 2px;
--hr-size: 2px;
--landmark-hr-margin-block: calc(var(--stack) * 2);
--hr-margin-block: calc(var(--stack) * 1.5);
--font: "Verdana", system-ui, sans-serif;
--font-variant: var(--font);
--font-size: clamp(75%, 65% + 0.5vi, 100%);
--leading: 1.45;
}
} Key Variables:
--gutter: Horizontal spacing unit used for paragraph indents and inline padding. Defaults to a fluid value between 1rem and 1.5rem.--stack: Vertical spacing unit that controls rhythm between elements. Measured in ex units to scale with font size.--line-length: Maximum content width measured in characters. Defaults to 66ch for optimal readability.--page-padding-inline: Calculated horizontal page margins that center content and maintain line length constraints.--page-padding-block: Vertical padding around landmark sections, calculated as eight stack units.--font: Primary font stack. Georgia theme uses Georgia with serif fallback; Verdana theme uses Verdana with system-ui fallback.--font-size: Fluid base font size using clamp() to scale between minimum and maximum values based on viewport width.--leading: Line height ratio applied to body text. Georgia theme uses 1.475; Verdana uses 1.45.--pt-*: Typography scale variables named after traditional typesetting point sizes (double-canon, canon, pica, etc.). Each heading level maps to a specific scale value.Q: Georgia and Verdana aren’t loading on Android devices. How do I fix this?
A: These fonts aren’t included in most Android system font sets. You have two options: accept that Android devices will render with system serif and sans-serif fallbacks, or add web font declarations with @font-face rules that load Georgia and Verdana from a CDN or self-hosted files. Note that web font licensing may restrict how you distribute these typefaces.
Q: How do I customize spacing without breaking the vertical rhythm system?
A: Override the --stack variable rather than adding custom margins. If you need more space between specific elements, use multiples of the stack unit: margin-block: calc(var(--stack) * 6). This keeps spacing proportional to the baseline grid. For horizontal spacing, multiply --gutter similarly. Avoid px or rem values that don’t reference these variables.
Q: My form inputs look different across browsers. Is this expected?
A: Yes. MCSS intentionally uses system color keywords that browsers interpret differently. This creates some visual inconsistency but respects platform conventions. If you need pixel-perfect form styling across browsers, you’ll need to override MCSS’s form styles with hardcoded color values, but this breaks the automatic dark mode behavior.
Q: Can I add utility classes to MCSS without breaking the classless pattern?
A: MCSS doesn’t prevent you from adding classes, but doing so defeats the framework’s purpose. If you need component-specific styling, use element selectors within semantic containers: article > section > .custom-component targets your component without polluting the global class namespace. For layout utilities, CSS Grid and Flexbox work directly on semantic elements without requiring utility classes.
Related R
The post Classless CSS Framework with Georgia & Verdana Typography System – MCSS appeared first on CSS Script.
50 Years Ago The Massachusetts Public Interest Research Group (Mass-PIRG) has criticized the Northampton Small…
WESTHAMPTON — Voters shot down a request for a $500,000 Proposition 2½ override by 59 votes…
NORTHAMPTON — After setting 27 fires between 2007 and 2009 that terrorized Ward 3 neighborhoods…
SUNDERLAND — Investigators have determined that the fire at the Sugarloaf Estates apartment complex on…
Repeating the mantra that “food is medicine,” U.S. Rep. Jim McGovern is leading a bipartisan…
LEVERETT — A two-story home just east of North Leverett center was destroyed in a…
This website uses cookies.