mkhairi / bootswatch-sass Goto Github PK
View Code? Open in Web Editor NEWbootswatch ruby gems for assets pipeline
Home Page: https://github.com/thomaspark/bootswatch
License: MIT License
bootswatch ruby gems for assets pipeline
Home Page: https://github.com/thomaspark/bootswatch
License: MIT License
When using the v4 bootstrap gem and the bootstrap-sass gem, I have to manually create an assets/stylesheets/custom.min.css copied from the official bootswatch source in order for any bootswatch stylesheet to appear correctly. Is this a flaw in the boostrap-sass gem, or is the flaw mine?
With the Gemfile:
gem 'bootstrap'
gem 'bootswatch'
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '>= 1.3.3'
end
and the assets/stylesheets/application.css.sass:
@import "bootswatch/cosmo/variables"
@import "bootstrap"
@import "bootswatch/cosmo/bootswatch"
and the assets/javascripts/application.js:
//= require jquery
//= require tether
//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
and the layout app/views/layouts/application.html.haml (excuse the haml):
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
Not all the necessary styles seems to exist such that the example matches the app. Here is the difference:
Left: official example. Right: the Rails app in question
If I manually create assets/stylesheets/custom.min.css, add a stylesheet_link_tag
for custom.min.css
and the necessary Rails.application.config.assets.precompile
directive, the application matches the example.
Left: official example. Right: the Rails app in question
Neither the bootswatch documentation nor the bootstrap-sass documentation mention anything about this magic custom.min.css file. All of the bootswatch examples use a link to this stylesheet. Is this a flaw in the documentation for bootswatch, a flaw in the bootswatch-sass gem, or a flaw in my understanding of how all these moving parts should be made to work?
Hi thanks for writing and sharing this usefull gem I just ave a small question I was able to follow your steps to install bootswatch scss but now I'm wondering if I require bootsrap js in my application ? it's not specified in you readme. thanks ahead. David.
Well, as sass
and sass-rails
are deprecated in favor of sassc
& sassc-rails
, you might want to remove them from the gemspec.
The best approach to me would be to explicitly mention (in the README) that one would need a SASS/SCSS compiler and not directly depend to one.
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.