Bulma with Rails

  • By Joshua Jansen
  • Last update: Dec 26, 2022
  • Comments: 16

bulma-rails

Integrates Bulma with the rails asset pipeline.

A modern CSS framework based on Flexbox.

Installation

Add this line to your application's Gemfile:

gem "bulma-rails", "~> 0.9.2"

And then execute:

$ bundle

Usage

To import all assets in your Rails project, add the following line to your application.scss:

@import "bulma";

For information about customizing Bulma, see: http://bulma.io/documentation/overview/start/

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Github

https://github.com/joshuajansen/bulma-rails

Comments(16)

  • 1

    Update to Bulma 0.9.3

    Description

    This PR upgrades the gem to use the newest version of Bulma. The diff between the two versions can be seen here, and the release notes are available here. I used the official download from the Bulma releases page for these file changes.

  • 2

    Github is showing incorrect details regarding the most recent commit

    The first screens hot shows that the latest commit was four months ago:

    screenshot_20181101-224923

    But on closer inspection the latest commit was far more recent:

    screenshot_20181101-224949

    Is there something wrong with github? Or is it me?

  • 3

    Importing Initial Variables Before Importing the rest

  • 4

    Update to 4.2?

    Any thoughts on updating to the latest build of Bulma? If there aren't any immediate plans I may start working on the update on my off-time to contribute.

  • 5

    Update bulma to 0.9.4

    This PR upgrades the gem to use the newest version of Bulma. The diff between the two versions can be seen here, and the release notes are available here. I used the official download from the Bulma releases page for these file changes.

  • 6

    Update Bulma to v0.9.2

    Description

    This PR upgrades the gem to use the newest version of Bulma. The diff between the two versions can be seen here, and the release notes are available here. I used the official download from the Bulma releases page for these file changes.

  • 7

    Update to 0.9 (and release)

    There is a new Bulma version out - 0.9:

    https://github.com/jgthms/bulma/releases/tag/0.9.0

    Interesting especially for the spacing helpers, I believe. Would be great to have an update on that. Thanks for all your efforts.

  • 8

    Fix README.md

    The instructions to import the library were wrong. In a clean machine, using your gem as described, I would get a lot of errors because it couldn't be found. Importing libraries with @import "library-name"; works for libraries installed with npm/yarn, so I'm guessing you have the library installed that way in your machine, otherwise you would have noticed. After changing that one line, everything started working as expected.

  • 9

    Data.today in gemspec gives bundler errors

    I think this line is giving me errors:

     gem.date = Date.today
    

    It results in:

    There was an error while loading bulma-rails.gemspec: uninitialized constant Date

    I think this should be the release day of the gem version.

  • 10

    Upgrade Bulma to 0.9.0

    Description

    This PR upgrades the gem to use the current version of Bulma which just released a minor version update. The diff between the two versions can be seen here, and the release notes are available here.

    As I am looking over the CHANGELOG and code diff, I haven't seen anything particularly frightening that might merit delaying an update. I'm happy to discuss anything that catches your eye that I may have missed, though!

    Note: I downloaded these SASS files directly from the bulma repo.

  • 11

    Upgrade to Bulma 0.8.2

    Description

    This PR upgrades the gem to use the current version of bulma which is two patch versions behind. Check the diff between the two versions here, the 0.8.2 notes here, and the 0.8.1 notes here.

    There aren't any huge performance or behavior differences to be observed with this change (as shown in the CHANGELOG), but I am putting in the PR now to help keep the library up to date so that future updates don't have to be as large 👍

    Note: I downloaded the SASS files in this PR directly from the bulma repo.

  • 12

    installation instructions don't work..

    I followed instructions : modify Gemfile and then run bundle..

    But bulma-rails get installed in my ~/.rbenv/versions/... folder and my app/assets/stylesheets/ folder stay as it was before installation.

    So what am I missing ?

    Thanks for helping me

  • 13

    Sass gem deprecated

    Ruby Sass is deprecated! See https://sass-lang.com/ruby-sass for details.

    I'm not familiar with ruby gems, but maybe replacing sass with sassc in gemspec is enough to fix this.

  • 14

    How to import modules

    Thanks for this gem. What is the correct way to import individual modules rather than the whole of bulma? Would it be possible to add a note to this effect into the README.rb?

  • 15

    Precompiling assets failed

    I am trying to deploy an app using Bulma to Heroku, but I get this error:

    Precompiling assets failed.
    Sass::SyntaxError: File to import not found or unreadable: bulma
    
  • 16

    :not(input[type="submit"]) wrong selector

    :not(input[type="submit"]) fails to find the selector, i suggest to change all the occurrences into :not([type="submit"])

    otherwise it wont apply it's css

    as per in:

    /* line 27, /usr/local/bundle/gems/bulma-rails-0.6.1/app/assets/stylesheets/sass/layout/hero.sass */
    .hero.is-primary .subtitle a:not(.button):not(imput[type="submit"]),
    .hero.is-primary .subtitle strong {
      color: #fff;
    }