Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typographic

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typographic - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

2

bower.json
{
"name": "typographic",
"version": "2.3.1",
"version": "2.3.2",
"homepage": "https://github.com/corysimmons/typographic",

@@ -5,0 +5,0 @@ "authors": [

@@ -7,3 +7,3 @@ {

"main": "stylus/typographic.js",
"version": "2.3.1",
"version": "2.3.2",
"description": "Responsive typography with modular scale, font stacks, and more.",

@@ -10,0 +10,0 @@ "keywords": [

@@ -33,4 +33,4 @@ <p align="center">

$header-color = #111
$min-font = 10px
$max-font = 16px
$min-font = 13px
$max-font = 20px
$min-width = 600px

@@ -104,2 +104,22 @@ $max-width = 1000px

## Helpers
Typographic comes equipped with 2 extremely handy helpers. One for previewing your vertical rhythm grid, and another for sizing and spacing elements so they adhere to your vertical rhythm.
The preview grid mixin is easy. It accepts a color and a positive or negative pixel offset parameter (for nudging your lines up to the bottom of text).
```stylus
grid-overlay(blue, 2)
```
The other helper is the `vr-block()` function, which returns sizes of your vertical rhythm. For instance, if you want to include an image that takes up 6 vertical units `height` and has a `margin-bottom` of 1 vertical unit (as in [our demo](http://corysimmons.github.io/typographic/)), you could create it like this:
```stylus
img
height: vr-block(6)
margin-bottom: vr-block()
```
`vr-block()` accepts a second parameter for pixel offsetting to help nudge your elements back onto the vertical rhythm in case they are off by a pixel or two.
## Usage with Node

@@ -111,3 +131,3 @@ ```javascript

stylus(fs.readFileSync('./foo.styl', 'utf8'))
stylus(fs.readFileSync('./css/style.styl', 'utf8'))
.use(typographic())

@@ -144,1 +164,8 @@ .render(function(err, css){

- [David Khourshid](https://twitter.com/davidkpiano) for calculating [decimal exponents](https://gist.github.com/davidkpiano/ad6e6771df050ff3727f) in Sass.
### Other Projects
If you like this project then I encourage you to check out a few of my other projects that go well with Typographic.
- [Lost Grid](https://github.com/corysimmons/lost) - Quite simply the best grid out there in every comparison available. Simple yet incredibly powerful.
- [Boy](https://github.com/corysimmons/boy) - A super lightweight, old-browser-friendly, HTML5 boilerplate with tons of features that make it a great start to any project.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc