Wrap a font size value in a mixin so it scales smoothly across phone, tablet, and desktop widths.
Scale padding, margin, or border radius the same way without writing extra breakpoints.
Set a custom breakpoint or minimum size if the default scaling behavior doesn't fit your design.
Turn scaling on or off for specific parts of a page using a CSS class.
| twbs/rfs | anmoljagetia/flatabulous | cli-guidelines/cli-guidelines | |
|---|---|---|---|
| Stars | 3,364 | 3,614 | 3,621 |
| Language | CSS | CSS | CSS |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 1/5 | 1/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Works out of the box with default settings, configuration is optional.
RFS is a small CSS tool that automatically adjusts font sizes and spacing values to fit different screen sizes. Instead of writing separate rules for phones, tablets, and desktops, you write a single value and RFS generates the CSS needed to make that value scale fluidly as the browser window grows or shrinks. Above a certain screen width (1200 pixels by default), values stay fixed at the size you specified. Below that, they shrink proportionally so text and layout elements do not become too large or too cramped on smaller screens. The tool works with four popular stylesheet languages: Sass, Less, Stylus, and PostCSS. In each case, you wrap the value you want to scale in a mixin or function call, and RFS handles the rest. It originally focused on font sizes, but it now works on padding, margin, border radius, box shadow, and any other CSS property that uses units. The output it produces is standard CSS using a combination of calculated values and media queries, so no special browser support is required. Any browser that handles media queries and viewport units will work. Configuration is optional. The defaults work without any adjustments, but you can change the breakpoint at which scaling kicks in, the minimum size below which values stop shrinking, how aggressively values scale, and whether to output pixels or rem units. There is also an option to control scaling with a CSS class, letting you turn it on or off for specific parts of a page. RFS is maintained under the Bootstrap organization and is licensed under MIT. It is available as an npm package and can be pulled into any project that already uses one of the supported stylesheet preprocessors.
A CSS tool that automatically scales font sizes and spacing to fit different screen sizes, so you write one value instead of separate rules per device.
Mainly CSS. The stack also includes Sass, Less, Stylus.
Licensed under MIT, so you can use it freely, including commercially, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.