Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout
Unorthodox Tailwind
Lesson Plan
  1. Introduction
    1. Introduction
    2. What Tailwind brings to the table
    3. Tailwind: The Good and The Bad
    4. The First and Most Important Step
    5. Simple Unorthodox System
    6. The System I Use
  2. Tailwind Fundamentals
    1. Introduction
    2. Installing Tailwind
    3. Using Tailwind utilities
    4. Understanding Tailwind’s utility system
    5. Understanding Tailwind values
    6. Understanding Tailwind variants
  3. Unorthodox Fundamentals
    1. Introduction
    2. Making Simple Tailwind Utilities
    3. Components vs Utilities
    4. Specificity, Cascade, and CSS Layers
    5. Debugging Tailwind Styles
    6. Composable Utility System
    7. Create lots of components
  4. Layouts System
    1. Tailwind is great for layouts
    2. Four Types of Layouts
    3. Building Shell Layouts
    4. Building Macro Layouts
    5. Better Responsive Variants
    6. A collection of maximum widths
    7. A note on grid wrappers
    8. Working with sections
    9. Building Micro Layouts
    10. Positioning Layouts
  5. Typography System
    1. Introduction
    2. A system for using multiple typefaces
    3. Tailwind's font-size system
    4. Finding your font-size system
    5. My font-size system
    6. A simple responsive typography system
    7. The main body
    8. Vertical rhythm
  6. Theming System
    1. Introduction
    2. Tailwind's colour system
    3. The pigment system
    4. Tailwind's gradient system
    5. A friendlier gradient system
    6. Handling SVG fill and stroke
    7. Improving Tailwind's colour palette
    8. A simple way to theme
  7. Useful Tools
    1. Introduction
    2. Making functional utilities
    3. Custom variants
    4. Scaffolding tools
    5. Extending Tailwind
  8. Effects System
    1. Introduction
    2. Vertical text
    3. Strikethrough text
    4. Text stroke
    5. Highlighting text
    6. Nicer shadows
    7. Transitioning shadows
    8. Drop shadows
    9. Dark mode tricks
    10. Gradient borders
    11. More effects to explore
  9. Putting Everything Together
    1. The Unorthodox Tailwind process
    2. The 4 systems combined
    3. Create components liberally
    4. Advanced tips
    5. My CSS Structure
    6. A Cheatsheet
    7. Consolidating your thoughts
    8. Parting words

My font-size system

2m:23s

You already know I used the typography scale by Robert Bringhurst, but I am so, so, so, so tempted to use the harmonious typographic scale that Spencer recreated.

classic typographic scale
The original typography scale by Robert Bringhurst
typographic scale mathematical values
Harmonious typographic scale, calculated by Spencer

One day I will, because I have found myself reaching for 42 instinctively when I’m designing.

My typography scale

Right now, I use a modified version of Robert Bringhurst’s typography scale that:

  1. Gives me more numbers on the lower end, because I realize that 13px and 15px can be useful depending on the typeface that we are working with.
  2. And I used 10px as the lowest limit because I rarely use anything below that.

Taking these into account, here are the font-sizes that I’ve created for Splendid Layouts.

@theme {
--text-1: 0.625rem; /* 10px */
--text-2: 0.6875rem; /* 11px */
--text-3: 0.75rem; /* 12px */
--text-4: 0.8125rem; /* 13px */
--text-5: 0.875rem; /* 14px */
--text-6: 0.9375rem; /* 15px */
--text-7: 1rem; /* 16px */
--text-8: 1.125rem; /* 18px */
--text-9: 1.3125rem; /* 21px */
--text-10: 1.5rem; /* 24px */
--text-11: 1.75rem; /* 28px */
--text-12: 2rem; /* 32px */
--text-13: 2.25rem; /* 36px */
--text-14: 2.625rem; /* 42px */
--text-15: 3rem; /* 48px */
--text-16: 3.375rem; /* 54px */
--text-17: 3.75rem; /* 60px */
--text-18: 4.5rem; /* 72px */
--text-19: 5.25rem; /* 84px */
--text-20: 6rem; /* 96px */
--text-21: 6.75rem; /* 108px */
--text-22: 7.5rem; /* 120px */
}

It’s included for you if you use Splendid Layouts, so there’s no need to import anything else.

styles.css
/* Includes the above typography scale */
@import 'splendidlabz/styles';

Harmonious scale

I am tempted to use the harmonious typography scale by Spencer as well, so here is another version using the harmonious scale. (I did not adjust this to include 11px, 13px and 15px yet.)

@theme {
--text-1: 0.625rem; /* 10px */
--text-2: 0.75rem; /* 12px */
--text-3: 0.875rem; /* 14px */
--text-4: 1rem; /* 16px */
--text-5: 1.125rem; /* 18px */
--text-6: 1.3125rem; /* 21px */
--text-7: 1.5rem; /* 24px */
--text-8: 1.75rem; /* 28px */
--text-9: 2rem; /* 32px */
--text-10: 2.25rem; /* 36px */
--text-11: 2.625rem; /* 42px */
--text-12: 3rem; /* 48px */
--text-13: 3.4375rem; /* 55px */
--text-14: 3.9375rem; /* 63px */
--text-15: 4.5625rem; /* 73px */
--text-16: 5.25rem; /* 84px */
--text-17: 6rem; /* 96px */
--text-18: 6.875rem; /* 110px */
--text-19: 7.9375rem; /* 127px */
}

Using these scales

To start using these scales, you can copy and paste the values from above into your code. Once you do that, you can use Tailwind’s text-* utilities like normal.

Except, you know that these text-* utilities only output font-size and not line-height.