Skip to content

Instantly share code, notes, and snippets.

@trevorparscal
Forked from catrope/gist:b6391d7b87013bbb8353
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorparscal/0cf898f169ed3ec4a8fb to your computer and use it in GitHub Desktop.
Save trevorparscal/0cf898f169ed3ec4a8fb to your computer and use it in GitHub Desktop.
// Override mixins
@useInvertedIcons() {
&:extend(.oo-ui-icon-foo-inverted);
&:extend(.oo-ui-icon-bar-inverted);
// ...and more for each icon...
}
// ...and more for each version (normal, inverted, constructive, destructive, progressive)...
// Icon definitions
.oo-ui-icon-foo { foo.png; }
.oo-ui-icon-foo-inverted { foo-white.png; }
.oo-ui-flagged-constructive .oo-ui-icon-foo { foo-green.png; }
.oo-ui-flagged-destructive .oo-ui-icon-foo { foo-red.png; }
.oo-ui-flagged-progressive .oo-ui-icon-foo { foo-blue.png; }
// ...and more for each icon...
/* Overrides in theme for special cases */
// Example special case
.oo-ui-button-framed {
&.oo-ui-flagged-constructive,
&.oo-ui-flagged-destructive,
&.oo-ui-flagged-progressive {
// Use of override mixin
@useInvertedIcons();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment