Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thoughtbot/bourbon
base: master
...
head fork: ddemaree/bourbon
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
View
3  TODO.md
@@ -0,0 +1,3 @@
+* Rename gem (and scold Thoughtbot for using up such a wonderful generic name as "bourbon").
+* Remove poorly structured English.
+* Figure out how to use gem as a vanilla Sass extension, i.e. how to append to Sass's load path in non-Rails environments
View
5 app/assets/stylesheets/functions/_grid-width.css.scss
@@ -1,3 +1,8 @@
+// TODO: Convert from pixels to raw numbers
+// @function grid-span($n) {
+// @return ($n * 60) + (($n - 1) * 20);
+// }
+
@function grid-width($n) {
@return $n * $gw-column + ($n - 1) * $gw-gutter;
}
View
7 app/assets/stylesheets/utils/_clearfix.scss
@@ -0,0 +1,7 @@
+@mixin clearfix {
+ &:before, &:after {
+ content: "\0020"; display: block; height: 0; visibility: hidden;
+ }
+ &:after { clear: both; }
+ & { zoom: 1; }
+}
View
16 bourbon.gemspec
@@ -7,16 +7,14 @@ Gem::Specification.new do |s|
s.version = Bourbon::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Phil LaPier", "Chad Mazzola", "Mike Burns"]
- s.email = ["support@thoughtbot.com"]
- s.homepage = "https://github.com/thoughtbot/bourbon"
- s.summary = "Bourbon Sass Mixins using SCSS syntax."
+ s.email = ["david@typekit.com"]
+ s.homepage = "https://github.com/ddemaree/bourbon"
+ s.summary = "A standard library of SCSS mixins for CSS3 and more"
s.description = <<-DESC
-The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of
-sass mixins that are designed to be as vanilla as possible. Meaning they
-should not deter from the original CSS syntax. The mixins contain vendor
-specific prefixes for all CSS3 properties for support amongst modern
-browsers. The prefixes also ensure graceful degradation for older browsers
-that support only CSS3 prefixed properties.
+Bourbon provides a simple yet robust set of Sass mixins (in SCSS syntax) for adding
+CSS3 features to web pages while ensuring graceful degradation via browser prefixes.
+It also includes some useful functions to aid in developing advanced styles, such as
+modular scales based on the golden ratio, and a grid-width calculator.
DESC
s.rubyforge_project = "bourbon"
View
16 lib/bourbon.rb
@@ -1,13 +1,13 @@
module Bourbon
- class Engine < ::Rails::Engine
- require 'bourbon/engine'
- end
+ class << self
+ def root
+ Pathname.new( File.expand_path("../../", __FILE__) )
+ end
- module Rails
- class Railtie < ::Rails::Railtie
- rake_tasks do
- load "tasks/install.rake"
- end
+ def stylesheets_path
+ Bourbon.root.join("app", "assets", "stylesheets")
end
end
end
+
+require 'bourbon/railtie' if defined?(Rails)
View
26 lib/bourbon/railtie.rb
@@ -0,0 +1,26 @@
+module Bourbon
+ # Here's a thinker: aren't rails engines dependent on Railties or something?
+ class Engine < ::Rails::Engine
+ require 'bourbon/engine'
+ end
+
+ module Rails
+ class Railtie < ::Rails::Railtie
+ initializer "bourbon.append_load_paths" do
+ begin
+ require 'sass'
+ require 'sass/plugin'
+ rescue LoadError => e
+ puts "Sass is not available. Bourbon must be enjoyed with Sass 3.1 or later."
+ end
+
+ Sass::Plugin.options[:load_paths] ||= []
+ Sass::Plugin.options[:load_paths] << Bourbon.stylesheets_path
+ end
+
+ rake_tasks do
+ load "tasks/install.rake"
+ end
+ end
+ end
+end
View
83 readme.md
@@ -1,54 +1,59 @@
-#Bourbon Sass Mixins
-The purpose of Bourbon Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.
+# Bourbon: A standard library for Sass
+
+Bourbon is delicious. It is also a standard library of Sass mixins (in SCSS syntax) providing robust, cross-browser CSS3 effects, preserving graceful degradation through browser prefixes where possible, but also not straying too far from the vanilla CSS syntax. CSS3 properties are specified as a stack in the order recommended by Dan Cederholm in [_CSS3 For Web Designers_](http://www.abookapart.com/products/css3-for-web-designers) (2009, A Book Apart).
+
+Here's an example:
+
+ // Instead of doing this:
+ a.tab-button {
+ -webkit-border-radius: 2px 2px 0 0;
+ -moz-border-radius: 2px 2px 0 0;
+ -ms-border-radius: 2px 2px 0 0;
+ -o-border-radius: 2px 2px 0 0;
+ border-radius: 2px 2px 0 0;
+ }
+
+ // Do this, it's equivalent:
+ @import 'bourbon';
+
+ a.tab-button {
+ @include border-radius(2px 2px 0 0);
+ }
-#Requirements
-Sass 3.1+
+It also provides some useful functions for calculating modular scales based on the golden ratio (based in part on [the excellent work of Tim Brown](http://modularscale.com)), and grid widths (with support for fluid grid calculation coming soon).
+This version of Bourbon is forked from the one at <http://github.com/thoughtbot/bourbon>, by Phil LaPier and Chad Mazzola. Mad props to those guys for releasing this.
+
+These mixins/functions require Sass 3.1.1 or later. While Thoughtbot's core Bourbon library has a lot of twiddly knobs enabling support for non-Rails (or older Rails) projects, _this_ Bourbon is strictly to be used as a Rails engine in Rails 3.1 or later. A method for adding Bourbon mixins to the Sass load path in Sinatra or other Rack apps is on the todo list, but not here yet. The "copy into your project" approach Phil, Chad, et al have taken is okay, but is less okay than being able to simply include this CSS into one's app using Bundler, git, Sass, and the asset pipeline.
#Install for Rails
Update your Gemfile
- gem 'bourbon'
-
+ gem 'bourbon', :git => 'https://github.com/ddemaree/bourbon.git'
+
bundle install
##Rails 3.1.x
-Comment-out the following sprocket directive in /application.css.scss (Remove the =)
- * require_tree .
-
-Import the mixins at the beginning of your stylesheet
+Import the mixins at the beginning of any stylesheet that uses them.
@import 'bourbon';
+
+Note that because [Sprockets](http://github.com/sstephenson/sprockets), Rails's asset-serving framework, compiles SCSS files *before* requiring them into the main stylesheet, if you're using multiple `.scss` files in your project you'll need to require Bourbon (or any other mixins, for that matter) into each one individually.
-##Rails 3.0.9 and below
-For Rails < 3.1 you must run the installation rake task.
-This will copy the Sass files into your project's public/stylesheets/sass directory.
-
- rake bourbon:install
-
-Import the mixins at the beginning of your stylesheet
-
- @import 'bourbon/bourbon';
+To use the reset or normalize stylesheets, just include them via Sprockets (this will _only_ work in Rails 3.1):
+
+ /*
+ * This will load: Bourbon's reset stylesheet, the current sheet,
+ * then everything else
+ *= require reset
+ *= require_self
+ *= require_tree .
+ */
+# Using Bourbon mixins
-#Install without Rails
-The following script will generate a sass directory and convert all .css.scss to .scss extensions. The sass directory is for 'sass --watch' use outside of rails.
-Preliminary step: clone the repo and cd into the directory.
-
-**Step 1:** Make script executable by changing file permission
-
- chmod a+x generate-sass.sh
-
-**Step 2:** Generate files
-
- ./generate-sass.sh
-
-**Step 3:** Move the new *sass* directory to your project's stylesheets directory.
-
-
-#Using Bourbon Vanilla Mixins
Below are a few examples of mixin usage. Note that these are just a few, explore the repo to find out more.
###Animation
@@ -309,13 +314,9 @@ Currently the project is a work in progress. Feel free to help out.
Credits
-------
-![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
-
-Bourbon is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community)
-
-The names and logos for thoughtbot are trademarks of thoughtbot, inc.
+This fork of Bourbon is maintained by [David Demaree](http://log.demaree.me). It's based on work originally funded and released as open source by [thoughtbot, inc](http://thoughtbot.com/community) in 2011.
License
-------
-Bourbon is Copyright © 2011 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
+Bourbon is free software, and may be redistributed under the terms specified in the LICENSE file.
View
413 vendor/assets/stylesheets/normalize.css
@@ -0,0 +1,413 @@
+/*! normalize.css 2011-06-27T20:08 UTC · http://github.com/necolas/normalize.css */
+
+/* =============================================================================
+ HTML5 element display
+ ========================================================================== */
+
+/*
+ * Corrects block display not defined in IE6/7/8/9 & FF3
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+ display: block;
+}
+
+/*
+ * Corrects inline-block display not defined in IE6/7/8/9 & FF3
+ * Known limitation: IE6 will not apply style for 'audio[controls]'
+ */
+
+audio[controls],
+canvas,
+video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+
+/* =============================================================================
+ Base
+ ========================================================================== */
+
+/*
+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
+ * http://clagnut.com/blog/348/#c790
+ * 2. Keeps page centred in all browsers regardless of content height
+ * 3. Removes Android and iOS tap highlight color to prevent entire container being highlighted
+ * www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
+ * 4. Prevents iOS text size adjust after orientation change, without disabling user zoom
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
+ */
+
+html {
+ font-size: 100%; /* 1 */
+ overflow-y: scroll; /* 2 */
+ -webkit-tap-highlight-color: rgba(0,0,0,0); /* 3 */
+ -webkit-text-size-adjust: 100%; /* 4 */
+ -ms-text-size-adjust: 100%; /* 4 */
+}
+
+/*
+ * Addresses margins handled incorrectly in IE6/7
+ */
+
+body {
+ margin: 0;
+}
+
+/*
+ * Addresses font-family inconsistency between 'textarea' and other form elements.
+ */
+
+body,
+button,
+input,
+select,
+textarea {
+ font-family: sans-serif;
+}
+
+
+/* =============================================================================
+ Links
+ ========================================================================== */
+
+a {
+ color: #00e;
+}
+
+a:visited {
+ color: #551a8b;
+}
+
+/*
+ * Addresses outline displayed oddly in Chrome
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/*
+ * Improves readability when focused and also mouse hovered in all browsers
+ * people.opera.com/patrickl/experiments/keyboard/test
+ */
+
+a:hover,
+a:active {
+ outline: 0;
+}
+
+
+/* =============================================================================
+ Typography
+ ========================================================================== */
+
+/*
+ * Addresses styling not present in IE7/8/9, S5, Chrome
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/*
+ * Addresses style set to 'bolder' in FF3/4, S4/5, Chrome
+*/
+
+b,
+strong {
+ font-weight: bold;
+}
+
+blockquote {
+ margin: 1em 40px;
+}
+
+/*
+ * Addresses styling not present in S5, Chrome
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/*
+ * Addresses styling not present in IE6/7/8/9
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/*
+ * Corrects font family set oddly in IE6, S5, Chrome
+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
+ */
+
+pre,
+code,
+kbd,
+samp {
+ font-family: monospace, monospace;
+ _font-family: 'courier new', monospace;
+ font-size: 1em;
+}
+
+/*
+ * Improves readability of pre-formatted text in all browsers
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/*
+ * 1. Addresses CSS quotes not supported in IE6/7
+ * 2. Addresses quote property not supported in S4
+ */
+
+/* 1 */
+
+q {
+ quotes: none;
+}
+
+/* 2 */
+
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+small {
+ font-size: 75%;
+}
+
+/*
+ * Prevents sub and sup affecting line-height in all browsers
+ * gist.github.com/413930
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+
+/* =============================================================================
+ Lists
+ ========================================================================== */
+
+ul,
+ol {
+ margin: 1em 0;
+ padding: 0 0 0 40px;
+}
+
+dd {
+ margin: 0 0 0 40px;
+}
+
+nav ul,
+nav ol {
+ list-style: none;
+}
+
+
+/* =============================================================================
+ Embedded content
+ ========================================================================== */
+
+/*
+ * 1. Removes border when inside 'a' element in IE6/7/8/9
+ * 2. Improves image quality when scaled in IE7
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
+ */
+
+img {
+ border: 0; /* 1 */
+ -ms-interpolation-mode: bicubic; /* 2 */
+}
+
+/*
+ * Corrects overflow displayed oddly in IE9
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+
+/* =============================================================================
+ Figures
+ ========================================================================== */
+
+/*
+ * Addresses margin not present in IE6/7/8/9, S5, O11
+ */
+
+figure {
+ margin: 0;
+}
+
+
+/* =============================================================================
+ Forms
+ ========================================================================== */
+
+/*
+ * Corrects margin displayed oddly in IE6/7
+ */
+
+form {
+ margin: 0;
+}
+
+/*
+ * Define consistent margin and padding
+ */
+
+fieldset {
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/*
+ * 1. Corrects color not being inherited in IE6/7/8/9
+ * 2. Corrects alignment displayed oddly in IE6/7
+ */
+
+legend {
+ border: 0; /* 1 */
+ *margin-left: -7px; /* 2 */
+}
+
+/*
+ * 1. Corrects font size not being inherited in all browsers
+ * 2. Addresses margins set differently in IE6/7, F3/4, S5, Chrome
+ * 3. Improves appearance and consistency in all browsers
+ */
+
+button,
+input,
+select,
+textarea {
+ font-size: 100%; /* 1 */
+ margin: 0; /* 2 */
+ vertical-align: baseline; /* 3 */
+ *vertical-align: middle; /* 3 */
+}
+
+/*
+ * 1. Addresses FF3/4 setting line-height using !important in the UA stylesheet
+ * 2. Corrects inner spacing displayed oddly in IE6/7
+ */
+
+button,
+input {
+ line-height: normal; /* 1 */
+ *overflow: visible; /* 2 */
+}
+
+/*
+ * 1. Improves usability and consistency of cursor style between image-type 'input' and others
+ * 2. Corrects inability to style clickable 'input' types in iOS
+ */
+
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer; /* 1 */
+ -webkit-appearance: button; /* 2 */
+}
+
+/*
+ * Addresses box sizing set to content-box in IE8/9
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box;
+}
+
+/*
+ * 1. Addresses appearance set to searchfield in S5, Chrome
+ * 2. Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof)
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/*
+ * Corrects inner padding displayed oddly in S5, Chrome on OSX
+ */
+
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/*
+ * Corrects inner padding and border displayed oddly in FF3/4
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/*
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
+ * 2. Improves readability and alignment in all browsers
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+
+/* =============================================================================
+ Tables
+ ========================================================================== */
+
+/*
+ * Remove most spacing between table cells
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
View
45 vendor/assets/stylesheets/reset.css
@@ -0,0 +1,45 @@
+/* HTML5 Boilerplate
+
+ html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
+ v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
+*/
+
+
+html, body, div, span, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+abbr, address, cite, code,
+del, dfn, em, img, ins, kbd, q, samp,
+small, strong, sub, sup, var,
+b, i,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section, summary,
+time, mark, audio, video {
+ margin:0;
+ padding:0;
+ border:0;
+ outline:0;
+ font-size:100%;
+ vertical-align:baseline;
+ background:transparent;
+}
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display:block;
+}
+nav ul { list-style:none; }
+blockquote, q { quotes:none; }
+blockquote:before, blockquote:after,
+q:before, q:after { content:''; content:none; }
+a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
+ins { background-color:#ff9; color:#000; text-decoration:none; }
+mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
+del { text-decoration: line-through; }
+abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
+table { border-collapse:collapse; border-spacing:0; }
+hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
+input, select { vertical-align:middle; }
+
+/* End of Reset CSS */

No commit comments for this range

Something went wrong with that request. Please try again.