Skip to content

Instantly share code, notes, and snippets.

@jdlehman
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save jdlehman/993c871e0d9fcc1ed1cd to your computer and use it in GitHub Desktop.

Select an option

Save jdlehman/993c871e0d9fcc1ed1cd to your computer and use it in GitHub Desktop.
Breakpoint-Sass without Compass

Using Breakpoint-Sass without Compass

Setup

  • Create Gemfile and input.scss files with specified content.
  • Install gems with `bundle install --path vendor

Usage

  • Run bundle exec sass input.scss output.css to compile Sass to CSS (or use bundle exec sass --watch input.scss:output.css to have Sass watch and recompile on new changes)

Caveats

  • Notice the gross @import path in our Sass file. If you are using Rails, it will set up the Sass path for you and you can just use @import breakpoint. If you are not using Rails, you can set up the SASS_PATH environment variable yourself. In this case, you need to add vendor/ruby/1.9.1/gems/breakpoint-2.5.0/stylesheets to the SASS_PATH.
source 'https://rubygems.org'
gem 'sass', '~> 3.3'
gem 'breakpoint', '~> 2.4'
@import 'breakpoint';
// if you do not set up the SASS_PATH environment variable you will need the more explicit:
// @import 'vendor/ruby/1.9.1/gems/breakpoint-2.5.0/stylesheets/breakpoint';
.test {
@include breakpoint(500px) {
font-size: 20px;
}
}
@media (min-width: 500px) {
.test {
font-size: 20px; } }
/*# sourceMappingURL=test.css.map */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment