Can I access foundation sass variables in a plugin?

(Eric Berry) #1

I would like to be able to access the foundation sass variables to support themes in the plugin I am working on. Is this possible?

For example, if I choose the ‘dark’ theme, I want my content to follow the same color scheme.

Right now, the only way I’m writing css is in the register_css method.

(Joe Buhlig) #2

You certainly can:

@import "common/foundation/variables";

Example use:

a {
    color: $primary;

    &:hover, &:focus {
      color: $secondary;

    &:visited {
      color: $primary;

(Eric Berry) #3

So register_css accepts sass? That’s awesome!

(Joe Buhlig) #4

I usually put this at the top of my .scss file and run with it from there. If that’s what you mean.