This is a sample extension that generates a typographic scale for font-sizes based on Tim Brown's popular article on the subject of typography and modular scale.
The extension also generates line-heights associated with each of the font-sizes that follow a vertical rhythm. This creates a consistent vertical spacing between elements on page with text that's aligned on a repeating baseline grid.
The output is a collection of CSS custom properties for all headings (h1–h6), and the default and small body copy.
commands.registerCommandwindow.showInputBoxwindow.showQuickPickwindow.showTextDocumentworkspace.openTextDocument
git clonethis directorycd rhythm-and-scalenpm installto install dependencies- Open
entension.jsand hitF5ro run and debug extension - In the debug window that opens, hit
Cmd + Shift + Pand typeRhythm and Scaleto select the extension - Follow prompts and enter the necessary values (integer vs decimals)
- Get a file with the font-size and line-height properties!
