Created
November 21, 2013 20:23
-
-
Save blairanderson/7588932 to your computer and use it in GitHub Desktop.
Fun with SCSS and bootstrap.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use bootstrap sass mixins in your scss instead of litering your view with bootstrap classes. | |
form.stuff{ | |
input[type="submit"]{ | |
// This is where we customize our submit button | |
@extend .btn; | |
@extend .btn-sm; | |
} | |
input[type="text"], input[type="password"] { // include more types if you want. | |
@extend .form-control; | |
} | |
} | |
// SCSS Enumeration is a clean way to dry up styling | |
@each $viewName in browse, capture, search{ | |
&[data-view=#{$viewName}] { | |
div.nav > nav > ul > li { | |
a##{$viewName}{ | |
color: $navLinkColor; | |
background-color: $hoverColor; | |
} | |
} | |
} | |
} | |
[data-view=browse] div.nav > nav > ul > li a#browse { | |
color: white; | |
background-color: #a9bc3f; | |
} | |
[data-view=capture] div.nav > nav > ul > li a#capture { | |
color: white; | |
background-color: #a9bc3f; | |
} | |
[data-view=search] div.nav > nav > ul > li a#search { | |
color: white; | |
background-color: #a9bc3f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment