override or add stylesheet to mounted engine pages

21 views
Skip to first unread message

fugee ohu

unread,
Feb 26, 2018, 10:32:52 PM2/26/18
to Ruby on Rails: Talk
I mounted an engine and it has it's own assets pipeline How do I override or add to it? It's in a subdirectory under the gem root path /app/assets/stylesheets/blogit There's no application.css file in the folder, only other css files I created an application.html.erb file for the blog portion of the site so the file i need to add to the assets pipleline is application.css

Jim Ruther Nill

unread,
Feb 26, 2018, 10:45:08 PM2/26/18
to rubyonra...@googlegroups.com
On Tue, Feb 27, 2018 at 1:32 PM, fugee ohu <fuge...@gmail.com> wrote:
I mounted an engine and it has it's own assets pipeline How do I override or add to it? It's in a subdirectory under the gem root path /app/assets/stylesheets/blogit There's no application.css file in the folder, only other css files I created an application.html.erb file for the blog portion of the site so the file i need to add to the assets pipleline is application.css

CSS is loaded by order.  A more recently loaded stylesheet will override a stylesheet loaded earlier.

= stylesheet_link_tag 'application'
= stylesheet_link_tag 'custom' 

so in the code above, anything inside custom.css will take precedence over those in application

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a5aea9c5-f84c-469e-a6cc-cd287bce4e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-------------------------------------------------------------
visit my blog at http://jimlabs.herokuapp.com
Reply all
Reply to author
Forward
0 new messages