Skip to content

Instantly share code, notes, and snippets.

@opdavies
Last active December 29, 2015 15:59
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 opdavies/7694579 to your computer and use it in GitHub Desktop.
Save opdavies/7694579 to your computer and use it in GitHub Desktop.
A library of custom classes to include within a SCSS project.
// Include this within your main "_init.scss" file using
// @import "classes";
// The opposite of Drupal's .js-hide class which hides an element when
// JavaScript is enabled (this hides an element when JavaScript is disabled).
// Add this to an element using the @extend directive. For example:
//
// .tabs {
// @extend %no-js-hide.
// }
%no-js-hide {
html.no-js & {
display: none;
}
}
// Make the block title invisible.
.title-invisible {
& > .title,
& > .block-title {
@include element-invisible;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment