Typography
Typography system designed for scientific content, data readability, and educational clarity in Virtual Labs.
Typography Principles
Typography prioritizes readability of scientific data, formulas, and technical content.
Clear information hierarchy supports learning objectives and content comprehension.
Font choices and sizing ensure readability for users with diverse visual needs.
Font Families
font-family: Inter, system-ui, sans-serif;font-family: 'JetBrains Mono', 'Fira Code', monospace;Type Scale
text-xstext-smtext-basetext-lgtext-xltext-2xltext-3xltext-4xltext-5xlFont Weights
text-lg font-lighttext-lg font-normaltext-lg font-mediumtext-lg font-semiboldtext-lg font-boldScientific Typography
<sup>2</sup> for superscript
<sub>2</sub> for subscriptUse monospace for precise measurementsUsage Guidelines
Control Labels
Use medium weight, small to base size
Data Values
Always use monospace for measurements
Status Messages
Clear, scannable text for system feedback
Instructions
Clear, step-by-step guidance
Explanations
Readable body text for concepts
Formulas
Mathematical expressions
Implementation
/* Font Sizes */
text-xs /* 12px */
text-sm /* 14px */
text-base /* 16px */
text-lg /* 18px */
text-xl /* 20px */
text-2xl /* 24px */
text-3xl /* 30px */
text-4xl /* 36px */
/* Font Weights */
font-light /* 300 */
font-normal /* 400 */
font-medium /* 500 */
font-semibold /* 600 */
font-bold /* 700 */
/* Font Families */
font-sans /* Inter */
font-mono /* JetBrains Mono */
/* Line Heights */
leading-tight /* 1.25 */
leading-normal /* 1.5 */
leading-relaxed /* 1.625 */:root {
/* Font Families */
--vl-font-sans: Inter, system-ui, sans-serif;
--vl-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
/* Font Sizes */
--vl-text-xs: 0.75rem; /* 12px */
--vl-text-sm: 0.875rem; /* 14px */
--vl-text-base: 1rem; /* 16px */
--vl-text-lg: 1.125rem; /* 18px */
--vl-text-xl: 1.25rem; /* 20px */
--vl-text-2xl: 1.5rem; /* 24px */
--vl-text-3xl: 1.875rem; /* 30px */
--vl-text-4xl: 2.25rem; /* 36px */
/* Line Heights */
--vl-leading-tight: 1.25;
--vl-leading-normal: 1.5;
--vl-leading-relaxed: 1.625;
/* Component-specific typography */
--vl-heading-font: var(--vl-font-sans);
--vl-body-font: var(--vl-font-sans);
--vl-data-font: var(--vl-font-mono);
--vl-code-font: var(--vl-font-mono);
}Minimum Font Sizes
Never use text smaller than 12px (text-xs) for body content. Use 14px (text-sm) minimum for important information.
Color Contrast
Ensure sufficient contrast ratios: 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold).
Line Length
Optimal line length is 45-75 characters for body text. Use max-width utilities to control line length.
Responsive Typography
Use responsive text sizes (sm:text-lg, md:text-xl) to ensure readability across devices.