Instantly share code, notes, and snippets.

Embed
What would you like to do?
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