No commit activity in last 3 years
No release in over 3 years
Use Tachyons in the Rails Asset Pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

tachyonscss-rails - Use Tachyons in a Rails App without NPM Modules

Rails 7 has brought the Asset Pipeline back into the spotlight, which means that bundling CSS without NPM requires gems. This gem allows you to use Tachyons without having to set up a JS bundler in your Rails 7 app.

Install

Add to your Gemfile:

gem "tachyonscss-rails"

then bundle install

Use

The most common way to use this is:

  1. Ensure you have sassc-rails in your Gemfile

  2. Ensure your app/assets/stylesheets/application.scss file is, in fact, a .scss file and not .css. If you haven't put anything in it, you can rename it safely.

  3. Add to app/assets/stylesheets/applicationscss:

    @import "tachyons";
  4. If you want to customize Tachyons, the variables partial is a guide to what you can modify. To do that, create the file app/assets/stylesheets/tachyons-overrides.scss (or whatever name you like). For example, you could change the green skin like so:

    $green: 00ff00;

    Then add it before the tachyons @import in `app/assets/stylesheets/application.scss:

    @import "tachyons-overrides";
    @import "tachyons";

Basically, this gem makes it so you can @import "tachyons"; and it will build the CSS file from the contents of the tachyons-sass module that this gem wraps.

Versions

The version of this gem matches the version of tachyons it bundles, except that it's possible for this gem to bundle an unreleased version of Tachyons. In that case, the gem will use a fourth number, for example 4.9.0.1 would indicate that this is the first release beyond 4.9.0 to include Tachyons code added to its main branch since 4.9.0 was released.