Read more about how the Asset Pipeline works here: 
http://guides.rubyonrails.org//asset_pipeline.html

TL;DR: If you add an import statement to your application.scss to bring your 
posts.scss file into that parent (or have an import tree or similar that 
auto-includes it) then the SCSS that you write in posts.scss becomes part of 
the one-and-only compiled/minified/magically available EVERYWHERE 
application.css that it compiles into. There is never any different CSS on any 
page in your entire application. All pages get the same CSS and JS through the 
Asset Pipeline unless you did something very non-standard.

If you aren't seeing the effect you are after, after making sure all of the 
above is accurate, then you may have to also consider that the CSS selector 
isn't correct, and the browser is ignoring it since it does not apply to the 
actual page when it renders to HTML.

Walter

> On May 31, 2018, at 7:45 PM, fugee ohu <fugee...@gmail.com> wrote:
> 
> if i put my styling in application.scss it works but placing it in posts.scss 
> has no effect on app/views/posts/index.html.erb
> 
> -- 
> 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+unsubscr...@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/1560ea4b-4a80-4552-9379-f5349c2c08e2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@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/EFED4BC9-4FD7-4F31-B24E-76B1358F7C87%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to