Currently, you can only apply inline styles to variables, but you cannot assign proper CSS classes. The workaround as for snippets/articles to switch to code view and add the class attribute manually is not available in the variable editor.
Since variables are somehow intended to be used as inline snippets, this is a bit of a drawback.