Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bourbon

thoughtbot640.7kMIT7.3.0

A lightweight Sass tool set.

css, eyeglass-module, mixins, sass, scss

readme

Bourbon logo

Reviewed by Hound

A Lightweight Sass Tool Set

Bourbon is a library of Sass mixins and functions that are designed to make you a more efficient style sheet author.

It is…

  • Dependency-free: Bourbon is pure Sass.
  • Human-readable: We aim for clarity over brevity.
  • Lightweight: Zero output post-install and has no visual opinion.

Table of Contents

Requirements

Installation

  1. Install the Bourbon gem using the RubyGems package manager:

     gem install bourbon
  2. Install the Bourbon library into the current directory:

     bourbon install

    Pro Tip: You can target installation into a specific directory using the path flag:

     bourbon install --path my/custom/path/
  3. Import Bourbon at the beginning of your stylesheet:

     @import "bourbon/bourbon";

    It’s not recommended that you modify Bourbon’s files directly as it will make updating to future versions difficult, by overwriting your custom changes or causing merge conflicts.

Installation for Ruby on Rails 4.2+

  1. Add Bourbon to your Gemfile:

     gem "bourbon"
  2. Then run:

     bundle install
  3. Restart your server and rename application.css to application.scss:

     mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
  4. Delete all Sprockets directives in application.scss (require, require_tree and require_self) and use Sass’s native @import instead (why?).

  5. Import Bourbon at the beginning of application.scss. Any project styles that utilize Bourbon’s features must be imported after Bourbon.

     @import "bourbon";
     @import "home";
     @import "users";

Installing with npm and using a Node-based asset pipeline

  1. Add Bourbon as a dependency:

     npm install --save bourbon
  2. If you’re using eyeglass, skip to Step 3. Otherwise, you’ll need to add Bourbon to your node-sass includePaths option. require("bourbon").includePaths is an array of directories that you should pass to node-sass. How you do this depends on how node-sass is integrated into your project.

  3. Import Bourbon into your Sass files:

     @import "bourbon";

Installing older versions of Bourbon

  1. Uninstall any Bourbon gem versions you already have:

     gem uninstall bourbon
  2. Reinstall the Bourbon gem, using the -v flag to specify the version you need:

     gem install bourbon -v 4.2.7
  3. Follow the instructions above to install Bourbon into your project.

Command Line Interface

bourbon [options]

Options

Option Description
-h, --help Show help
-v, --version Show the version number
--path Specify a custom path
--force Force install (overwrite)

Commands

Command Description
bourbon install Install Bourbon into the current directory
bourbon update Overwrite and update Bourbon in the current directory
bourbon help Show help

Browser Support

Bourbon supports Internet Explorer 11+ and the latest versions of Chrome, Firefox, Safari, and Edge.

Contributing

See the contributing document. Thank you, contributors!

License

Bourbon is copyright © 2011-2020 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the license.

About

Bourbon is maintained by the thoughtbot design team. It is funded by thoughtbot, inc. and the names and logos for thoughtbot are trademarks of thoughtbot, inc.

thoughtbot

We love open-source software! See our other projects or hire us to design, develop, and grow your product.

changelog

Addressable 2.8.1

  • refactor Addressable::URI.normalize_path to address linter offenses (#430)
  • remove redundant colon in Addressable::URI::CharacterClasses::AUTHORITY regex (#438)
  • update gemspec to reflect supported Ruby versions (#466, #464, #463)
  • compatibility w/ public_suffix 5.x (#466, #465, #460)
  • fixes "invalid byte sequence in UTF-8" exception when unencoding URLs containing non UTF-8 characters (#459)
  • Ractor compatibility (#449)
  • use the whole string instead of a single line for template match (#431)
  • force UTF-8 encoding only if needed (#341)

Addressable 2.8.0

  • fixes ReDoS vulnerability in Addressable::Template#match
  • no longer replaces + with spaces in queries for non-http(s) schemes
  • fixed encoding ipv6 literals
  • the :compacted flag for normalized_query now dedupes parameters
  • fix broken escape_component alias
  • dropping support for Ruby 2.0 and 2.1
  • adding Ruby 3.0 compatibility for development tasks
  • drop support for rack-mount and remove Addressable::Template#generate
  • performance improvements
  • switch CI/CD to GitHub Actions

Addressable 2.7.0

  • added :compacted flag to normalized_query
  • heuristic_parse handles mailto: more intuitively
  • dropped explicit support for JRuby 9.0.5.0
  • compatibility w/ public_suffix 4.x
  • performance improvements

Addressable 2.6.0

  • added tld= method to allow assignment to the public suffix
  • most heuristic_parse patterns are now case-insensitive
  • heuristic_parse handles more file:// URI variations
  • fixes bug in heuristic_parse when uri starts with digit
  • fixes bug in request_uri= with query strings
  • fixes template issues with nil and ? operator
  • frozen_string_literal pragmas added
  • minor performance improvements in regexps
  • fixes to eliminate warnings

Addressable 2.5.2

  • better support for frozen string literals
  • fixed bug w/ uppercase characters in scheme
  • IDNA errors w/ emoji URLs
  • compatibility w/ public_suffix 3.x

Addressable 2.5.1

  • allow unicode normalization to be disabled for URI Template expansion
  • removed duplicate test

Addressable 2.5.0

  • dropping support for Ruby 1.9
  • adding support for Ruby 2.4 preview
  • add support for public suffixes and tld; first runtime dependency
  • hostname escaping should match RFC; underscores in hostnames no longer escaped
  • paths beginning with // and missing an authority are now considered invalid
  • validation now also takes place after setting a path
  • handle backslashes in authority more like a browser for heuristic_parse
  • unescaped backslashes in host now raise an InvalidURIError
  • merge!, join!, omit! and normalize! don't disable deferred validation
  • heuristic_parse now trims whitespace before parsing
  • host parts longer than 63 bytes will be ignored and not passed to libidn
  • normalized values always encoded as UTF-8

Addressable 2.4.0

  • support for 1.8.x dropped
  • double quotes in a host now raises an error
  • newlines in host will no longer get unescaped during normalization
  • stricter handling of bogus scheme values
  • stricter handling of encoded port values
  • calling require 'addressable' will now load both the URI and Template files
  • assigning to the hostname component with an IPAddr object is now supported
  • assigning to the origin component is now supported
  • fixed minor bug where an exception would be thrown for a missing ACE suffix
  • better partial expansion of URI templates

Addressable 2.3.8

  • fix warnings
  • update dependency gems
  • support for 1.8.x officially deprecated

Addressable 2.3.7

  • fix scenario in which invalid URIs don't get an exception until inspected
  • handle hostnames with two adjacent periods correctly
  • upgrade of RSpec

Addressable 2.3.6

  • normalization drops empty query string
  • better handling in template extract for missing values
  • template modifier for '?' now treated as optional
  • fixed issue where character class parameters were modified
  • templates can now be tested for equality
  • added :sorted option to normalization of query strings
  • fixed issue with normalization of hosts given in 'example.com.' form

Addressable 2.3.5

  • added Addressable::URI#empty? method
  • Addressable::URI#hostname methods now strip square brackets from IPv6 hosts
  • compatibility with Net::HTTP in Ruby 2.0.0
  • Addressable::URI#route_from should always give relative URIs

Addressable 2.3.4

  • fixed issue with encoding altering its inputs
  • query string normalization now leaves ';' characters alone
  • FakeFS is detected before attempting to load unicode tables
  • additional testing to ensure frozen objects don't cause problems

Addressable 2.3.3

  • fixed issue with converting common primitives during template expansion
  • fixed port encoding issue
  • removed a few warnings
  • normalize should now ignore %2B in query strings
  • the IDNA logic should now be handled by libidn in Ruby 1.9
  • no template match should now result in nil instead of an empty MatchData
  • added license information to gemspec

Addressable 2.3.2

  • added Addressable::URI#default_port method
  • fixed issue with Marshalling Unicode data on Windows
  • improved heuristic parsing to better handle IPv4 addresses

Addressable 2.3.1

  • fixed missing unicode data file

Addressable 2.3.0

  • updated Addressable::Template to use RFC 6570, level 4
  • fixed compatibility problems with some versions of Ruby
  • moved unicode tables into a data file for performance reasons
  • removing support for multiple query value notations

Addressable 2.2.8

  • fixed issues with dot segment removal code
  • form encoding can now handle multiple values per key
  • updated development environment

Addressable 2.2.7

  • fixed issues related to Addressable::URI#query_values=
  • the Addressable::URI.parse method is now polymorphic

Addressable 2.2.6

  • changed the way ambiguous paths are handled
  • fixed bug with frozen URIs
  • https supported in heuristic parsing

Addressable 2.2.5

  • 'parsing' a pre-parsed URI object is now a dup operation
  • introduced conditional support for libidn
  • fixed normalization issue on ampersands in query strings
  • added additional tests around handling of query strings

Addressable 2.2.4

  • added origin support from draft-ietf-websec-origin-00
  • resolved issue with attempting to navigate below root
  • fixed bug with string splitting in query strings

Addressable 2.2.3

  • added :flat_array notation for query strings

Addressable 2.2.2

  • fixed issue with percent escaping of '+' character in query strings

Addressable 2.2.1

  • added support for application/x-www-form-urlencoded.

Addressable 2.2.0

  • added site methods
  • improved documentation

Addressable 2.1.2

  • added HTTP request URI methods
  • better handling of Windows file paths
  • validation_deferred boolean replaced with defer_validation block
  • normalization of percent-encoded paths should now be correct
  • fixed issue with constructing URIs with relative paths
  • fixed warnings

Addressable 2.1.1

  • more type checking changes
  • fixed issue with unicode normalization
  • added method to find template defaults
  • symbolic keys are now allowed in template mappings
  • numeric values and symbolic values are now allowed in template mappings

Addressable 2.1.0

  • refactored URI template support out into its own class
  • removed extract method due to being useless and unreliable
  • removed Addressable::URI.expand_template
  • removed Addressable::URI#extract_mapping
  • added partial template expansion
  • fixed minor bugs in the parse and heuristic_parse methods
  • fixed incompatibility with Ruby 1.9.1
  • fixed bottleneck in Addressable::URI#hash and Addressable::URI#to_s
  • fixed unicode normalization exception
  • updated query_values methods to better handle subscript notation
  • worked around issue with freezing URIs
  • improved specs

Addressable 2.0.2

  • fixed issue with URI template expansion
  • fixed issue with percent escaping characters 0-15

Addressable 2.0.1

  • fixed issue with query string assignment
  • fixed issue with improperly encoded components

Addressable 2.0.0

  • the initialize method now takes an options hash as its only parameter
  • added query_values method to URI class
  • completely replaced IDNA implementation with pure Ruby
  • renamed Addressable::ADDRESSABLE_VERSION to Addressable::VERSION
  • completely reworked the Rakefile
  • changed the behavior of the port method significantly
  • Addressable::URI.encode_segment, Addressable::URI.unencode_segment renamed
  • documentation is now in YARD format
  • more rigorous type checking
  • to_str method implemented, implicit conversion to Strings now allowed
  • Addressable::URI#omit method added, Addressable::URI#merge method replaced
  • updated URI Template code to match v 03 of the draft spec
  • added a bunch of new specifications

Addressable 1.0.4

  • switched to using RSpec's pending system for specs that rely on IDN
  • fixed issue with creating URIs with paths that are not prefixed with '/'

Addressable 1.0.3

  • implemented a hash method

Addressable 1.0.2

  • fixed minor bug with the extract_mapping method

Addressable 1.0.1

  • fixed minor bug with the extract_mapping method

Addressable 1.0.0

  • heuristic parse method added
  • parsing is slightly more strict
  • replaced to_h with to_hash
  • fixed routing methods
  • improved specifications
  • improved heckle rake task
  • no surviving heckle mutations

Addressable 0.1.2

  • improved normalization
  • fixed bug in joining algorithm
  • updated specifications

Addressable 0.1.1

  • updated documentation
  • added URI Template variable extraction

Addressable 0.1.0

  • initial release
  • implementation based on RFC 3986, 3987
  • support for IRIs via libidn
  • support for the URI Template draft spec