JA
jaredhowland/rhythm
Sass files to create a vertical rhythm based on modular scales
About Rhythm
Rhythm is a small set of Sass files built to assist in creating mobile-first, responsive websites with vertical rhythm using modular scales.
Installation
Rhythm is available as a Bower package, a Composer package, and as a manual download.
Bower
- If needed, install Bower
- Run the following command:
bower install jaredhowland/rhythm
Composer
- If needed, install Composer
- Add the following to your
composer.jsonfile:
"require": {
"jaredhowland/rhythm": "~1.0"
}Manual Installation
- Download the latest
.zipfile. - Extract into your project.
Usage
Import Rhythm
@ import "path/to/rhythm";
Basics
Any time you want to change a font-size, line-height, padding, or margin, use Rhythm instead:
p {
@include font-size(18px);
}
h2 {
@include line-height($h2, 2); // Double the computed line height for font-size `h2`
}
h1 {
@include padding(2 0 1); // Double top padding, no side padding, and single line-height bottom padding
}
ul {
@include margin(1); // Single line-height margin size around entire element
}Full details can be found on the documentation site.
On this page
Languages
HTML72.4%SCSS19.8%CSS5.0%JavaScript2.8%
Contributors
MIT License
Created February 13, 2015
Updated May 6, 2025