Sha256: 5b484001686c0c1feff9682c69431c8c7870519c69c93732c7a0ee4bb56c2184

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

Unit Conversion
===============

By default, Squib thinks in pixels. This decision was made so that we can have pixel-perfect layouts without automatically scaling everything, even though working in units is sometimes easier. We provide some conversion methods, including looking for strings that end in "in", "cm", or "mm" and computing based on the current DPI. The dpi is set on `Squib::Deck.new` (not `config.yml`).

Here are some examples, which `lives here <https://github.com/andymeneely/squib/tree/master/samples/units.rb>`_

.. literalinclude:: ../samples/units/_units.rb
  :language: ruby
  :linenos:

.. raw:: html

  <img src="units/units_00_expected.png" class="figure">

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
squib-0.12.0 docs/units.rst