Skip to content

Instantly share code, notes, and snippets.

@harrynewsome
Created May 25, 2016 21:20
Show Gist options
  • Save harrynewsome/bf0afb56ecad6e6ef026551f616777f6 to your computer and use it in GitHub Desktop.
Save harrynewsome/bf0afb56ecad6e6ef026551f616777f6 to your computer and use it in GitHub Desktop.
/*
|--------------------------------------------------------------------------
| Importing Stylsheets / Partials
|--------------------------------------------------------------------------
*/
@import 'core';
@import 'theme';
/*
|--------------------------------------------------------------------------
| Variables
|--------------------------------------------------------------------------
*/
$color-primary: #444;
$color-secondary: darken($color-primary, 10%);
$container-width: 1200px;
$font-primary: 'Montserrat';
$font-secondary: 'Open Sans';
/*
|--------------------------------------------------------------------------
| Nested Selectors
|--------------------------------------------------------------------------
*/
.header-nav {
width: 100%;
height: 70px;
background-color: #FFF;
.header-nav--item {
display: block;
padding: 4px 10px;
}
}
.submit-button {
background-color: $color-primary;
&:hover {
background-color: darken($color-primary, 5%);
}
&.disabled {
cursor: not-allowed;
background-color: #444;
text-decoration: line-through;
}
}
/*
|--------------------------------------------------------------------------
| Extending Classes
|--------------------------------------------------------------------------
*/
.button {
display: block;
padding: 6px 12px;
font-weight: 700;
}
.button-primary {
@extend .button;
background-color: $color-primary;
}
.button-disabled {
@extend .button;
background-color: #444;
}
/*
|--------------------------------------------------------------------------
| Operators
|--------------------------------------------------------------------------
*/
.listing-left {
float: left;
width: 400px / 1200px * 100%;
}
.listing-right {
float: right;
width: 760px / 1200px * 100%;
}
/*
|--------------------------------------------------------------------------
| Mixins
|--------------------------------------------------------------------------
*/
// Mixins would be extracted from primary scss files and grouped in mixins.scss
@mixin transition($args...) {
-webkit-transition: $args;
-moz-transition: $args;
-ms-transition: $args;
-o-transition: $args;
transition: $args;
}
.element {
opacity: 0;
&:hover {
@include transition('opacity 300ms ease');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment