Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


pixelsToEm.alfredworkflow (Alfred >3.4)

type em#* and the workflow asks for your desired font-size in pixels and the parent size the em-values are calculated with. If you do not set a parent Size, it'll use 16px. The output will result in em-Values. The cursor is then placed right before "em" so you can easily modify the output to "rem".

Example output: .625em; /* 10px / 16px */



The snippet keyword is stripped when a workflow is exported. So make sure, you set your own keyword in the first element of the workflow. I'm using:

  • keyword: em
  • suffix: #


Make sure you are using Alfred 3.4 or above


Zach Leat came up with a typinator-snippet for instant calculation of em/rem-Values. https://gist.github.com/zachleat/c135c079f802934006978e2257086cc3

This is workflow is based on Zach's idea