Skip to content

Instantly share code, notes, and snippets.

@zachleat
Last active August 28, 2017 17:47
Show Gist options
  • Save zachleat/c135c079f802934006978e2257086cc3 to your computer and use it in GitHub Desktop.
Save zachleat/c135c079f802934006978e2257086cc3 to your computer and use it in GitHub Desktop.
Typinator Automations for CSS em and rem values
Ems
---
Abbreviation: ;ems
Formula: {{size=?Size}}{{parentsize=?Parent Size<16>}}{{#size/parentsize}}em; /* {{#size}}px /{{#parentsize}} */
Sample output: 0.75em; /* 12px /16 */
Rems
----
Abbreviation: ;rems
Formula: {{size=?Size}}{{parentsize=?Parent Size<16>}}{{#size/parentsize}}rem; /* {{#size}}px /{{#parentsize}} */
Sample output: 0.75rem; /* 12px /16 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment