explaingit

thoughtbot/bourbon

9,019RubyAudience · developerComplexity · 1/5Setup · easy

TLDR

A now-deprecated library of Sass mixins and helpers that made writing CSS easier, officially deprecated in September 2024 because modern CSS now handles most of the problems it once solved.

Mindmap

mindmap
  root((Bourbon))
    Status
      Deprecated 2024
      No new updates
    Features
      Sass mixins
      CSS helpers
      No visual style
    Integration
      Ruby gem
      npm package
      Rails projects
    Migration
      Native CSS
      Modern browsers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Understand why a legacy Rails or Sass codebase imports Bourbon and plan a migration away from it.

USE CASE 2

Follow the official migration guide to replace Bourbon helpers with native CSS equivalents.

USE CASE 3

Use existing Bourbon mixins in an older Ruby on Rails project that has not yet been updated.

Tech stack

RubySassCSS

Getting it running

Difficulty · easy Time to first run · 5min

Deprecated, the team recommends migrating to native CSS instead of using Bourbon in new or existing projects.

Not specified in the explanation.

In plain English

Bourbon was a library of tools for Sass, a language that extends CSS to make writing styles for websites easier. Sass lets you use variables, functions, and reusable chunks of code called mixins. Bourbon provided a curated set of those mixins and functions to handle common styling tasks without adding bloat or imposing a visual style on your project. The key thing to know upfront is that this project was deprecated in September 2024 and is no longer maintained. The team behind it posted a blog post explaining how to replace each of Bourbon's helpers with modern CSS features that browsers now support natively, since many of the problems Bourbon originally solved no longer require a library. When it was active, Bourbon was designed to be dependency-free (pure Sass with no other requirements), focused on readable code rather than terseness, and lightweight in that it added no extra output to your compiled CSS on its own. It worked with Ruby on Rails projects, as a standalone Ruby gem, and also through npm for JavaScript-based build pipelines. Installing it involved either a Ruby gem command or an npm package, then a single import line at the top of your Sass files. Once imported, all of Bourbon's mixins and functions were available throughout your stylesheets. It also included a small command-line tool with install and update commands. If you are looking at this project because it appears in an existing codebase, the README recommends migrating away from it toward native CSS. If you are considering using it in a new project, it is no longer a suitable choice given that it receives no further updates.

Copy-paste prompts

Prompt 1
My Rails app uses Bourbon in its Sass files and I want to migrate to native CSS. Walk me through which Bourbon mixins have modern CSS equivalents and how to replace them one by one.
Prompt 2
I found Bourbon imported in an old codebase. Which features was it providing and are any of them still actually needed in modern browsers today?
Prompt 3
Help me audit my Sass files for Bourbon usage so I can create a migration plan to remove the dependency and replace it with standard CSS.
Prompt 4
I need to upgrade an old Rails project that uses Bourbon. What is the recommended migration path and what resources does the Bourbon team provide for this?
Open on GitHub → Explain another repo

← thoughtbot on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.