How do I apply the Font Size / Font Family specified by the user?


I’m writing up a simple key mapping package for Atom (something like the pop up of key mappings that shows up in Spacemacs). I am hitting a problem where I have a panel pop up from the bottom with a selection of keys and actions they correspond to. I would like to style this selection to be the same font size and font family as what is in the editor. The relevant .less:

@import "ui-variables";

.main {
    font-size: @input-font-size;

This imports the UI font size, but that’s not the same thing as what the user has defined in the settings (i.e, the UI font-size is 11, but the font size I have set for the Atom editor in Preferences -> Settings is 18). How can I get at the actual font size (and family) set by the user?


This is how I do it in my atom-build package (in javascript)



This is excellent, thank you.