Skip to content

Instantly share code, notes, and snippets.

@timproDev
Last active August 10, 2017 15:28
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 timproDev/ced9d14413a7fecf932566378915f571 to your computer and use it in GitHub Desktop.
Save timproDev/ced9d14413a7fecf932566378915f571 to your computer and use it in GitHub Desktop.
SCSS Structure Template

SCSS Structure

Template for scss files

//////////////////////
/// BLOCK__ELEMENT ///
//////////////////////

.wrapper {}

//////////////////
/// MODIFIERS ////
//////////////////

.wrapper {
	&.modicifation-class {
		// code here...
	}
}

//////////////
/// THEME ////
//////////////

.wrapper {
	&.theme-class {
		// code here...
	}
}

/////////////////////
/// MEDIA QUERIES ///
/////////////////////

@media #{$medium-only} {}
@media #{$small-only} {}

//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////IE10+ specific styles go here //////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
// NOTES: @extend is not supported within {media} ////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {}

////////////////////////
/// IE MEDIA QUERIES ///
////////////////////////

@media only screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    @media only screen and (max-width: 1024px) and (min-width: 641px) {}
    @media only screen and (max-width: 640px) {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment