
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
bootstrap-sass-rails-rtl
Advanced tools
Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more.
Twitter Bootstrap has been converted to Sass which makes it possible to use the default Rails Asset Pipeline
This version is a fork of the original bootstrap-sass-rails gem with added support for RTL css
Add these lines to your application's Gemfile:
group :assets do
gem 'bootstrap-sass-rails-rtl'
end
And then execute:
$ bundle install
Or install it yourself as:
$ gem install bootstrap-sass-rails-rtl
The easiest way to use Twitter Bootstrap is to require it in your application.css
file.
/*
*= require twitter/bootstrap # LTR version
*= require twitter/bootstrap_rtl # RTL version
*/
#example {
/* Your styles... */
}
If you need access to the variables within the Twitter Bootstrap framework or want to use the mixins you
will need to import it within an .css.scss
file. This will still include the complete framework.
@import "twitter/bootstrap"; # LTR version
@import "twitter/bootstrap_rtl"; # RTL version
#foo {
@include border-radius(4px);
}
Using only parts of the framework like variables and mixin you can import all of these individually from
within .css.scss
files.
@import "twitter/bootstrap/variables";
@import "twitter/bootstrap/rtl/mixins";
@mixin myButton($radius: 5px) {
@include border-radius($radius);
}
#foo {
@include myButton(10px);
}
Adding the responsive styles included with Twitter Bootstrap to your project is just as easy. Depending on the way you chose to include the base bootstrap styles you need to do one of the following:
Importing the responsive partial using the Sass @import
directive in a .scss
file:
@import 'twitter/bootstrap';
@import 'twitter/bootstrap/responsive';
Using =require
to include the responsive partial in a .css
file (watch the underscore in the partial name!):
/*
*= require twitter/bootstrap
*= require twitter/bootstrap/_responsive
*/
Using =require
to include the responsive partial in a .scss
file (watch the underscore in the partial name!):
#= require twitter/bootstrap
#= require twitter/bootstrap/_responsive
To ease the common use case of extending Twitter Bootstrap with a icon font like Font Awesome a css file is included which leaves out the original sprites.
You can use it like this
/*
*= require twitter/bootstrap-no-sprites
*/
or
@import "twitter/bootstrap-no-sprites";
Please note that Font Awesome is not included in this gem - you will need to vendorize the font assets by yourself!
Using the JavaScript works the same way. You can include them all with a
single require directive from your application.js
.
//= require twitter/bootstrap
$(document).ready(function(){
});
If you only want a part of the javascripts require the individual files
from your .js
file.
//= require twitter/bootstrap/modal
$(document).ready(function(){
});
This gem will directly track the semantic versioning releases of the Twitter Bootstrap project. If it should be necessary a build number will be added to the version to mark releases specific to this gem.
This work incorporates Twitter Bootstrap by Twitter, Inc.
This gem has been inspired by less-rails-bootstrap by Ken Collins
Apache License, Version 2.0
Copyright 2011-2012 Morton Jonuschat
Copyright 2011-2012 Zohar Arad
Twitter Bootstrap copyright 2011-2012 Twitter, Inc
FAQs
Unknown package
We found that bootstrap-sass-rails-rtl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.