Sha256: eee6fa86307017d9998b1a61006dcf3c76bac1e32c23a46fc8d2d61a77ca17d7

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

<section id="golden-ratio">
  <h2>Golden Ratio <a class="view-source" href="https://github.com/thoughtbot/bourbon/blob/master/app/assets/stylesheets/functions/_modular-scale.scss">View Source</a></h2>
  <p>Returns the golden ratio of a given number. Must provide a pixel or em value for the first argument. Also takes a required integer for an increment value: ...-3, -2, -1, 0, 1, 2, 3...</p>
  <p>Note: The golden-ratio function can be wrapped in sass's <code>abs()</code>, <code>floor()</code>, or <code>ceil()</code> functions to get the absolute value, round down, or round up respectively.</p>

{% highlight scss %}
// Positive number will increment up the golden-ratio
font-size: golden-ratio(14px,  1);
// returns: 22.652px

// Negative number will increment down the golden-ratio
font-size: golden-ratio(14px, -1);
// returns: 8.653px
{% endhighlight %}
  <p>Resources: <a href="http://modularscale.com/">modularscale.com</a> & <a href="http://goldenratiocalculator.com/">goldenrationcalculator.com</a></p>
</section>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bourbon-2.1.0 _includes/golden-ratio.html