Modern Tools for Front-End Development
Front-end developers have been at a disadvantage
Browser inconsistencies were a major pain
CSS is "Easy"
- Bidding against "the nephew"
Properties rather than programming
- Lack of variables, functions, objects
Proliferation of devices
New Tools for New Challenges
CSS Pre-processors
Polyfill/compatibility libraries
Responsive Development Tools
Installing Sass
There are a number of 3rd party apps to support CSS preprocessors
We're going to use Ruby
Using Ruby Gems
$ gem install bundler
Gemfile:
source "https://rubygems.org"
gem 'guard-sass'
gem 'compass'
gem 'guard-livereload'
$ bundle install
- Includes Sass, Compass and LiveReload
- Leverages Guard
# More info at https://github.com/guard/guard#readme
guard 'sass',
:input => 'docroot/sites/all/themes/wscu_theme/scss',
:output => 'docroot/sites/all/themes/wscu_theme/css',
:compass => true,
:style => :compressed
Sass Features
Partials
Variables
Nested inheritance
Extending Classes
Functions/Mixins
Operations
Simplify Responsive Designwith LiveReload