page unaffected by application.scss

5 views
Skip to first unread message

fugee ohu

unread,
Dec 6, 2017, 10:07:37 PM12/6/17
to Ruby on Rails: Talk
Css in application.scss successfully styles all of my app except for a page that has it's own stylesheet with only definitions for a couple of blueimp-gallery classes
  Trying to fix it, I added font-size under body just like in application.scss but it doesn't have any effect

Mugurel Chirica

unread,
Dec 7, 2017, 3:25:54 AM12/7/17
to rubyonra...@googlegroups.com
Seems that the css on the specific page takes precedence over your application.scss.

In order to verify this you can add an element with an id in your specific page, something like <a id="page_test">Test</a>, and add css for it in your application.scss, something like #page_test { color: red; }.
If that does not work, something happens and your page does not load application.scss and we need more info to help.
If that works then you are probably not selecting the correct element, or the page selectors are heavier than what you have described.

Also, use your browser's inspecting tool, in Chrome right-click and inspect element, then select your element that you want to style and see what rules are applied and if your rules are there.

There might be other issues but try these first and see what they do.

If you still have that issues please add code for your application.scss and template, and we'll see from there.

Reply all
Reply to author
Forward
0 new messages