I want to ask a question, I write all the CSS code in the app \ assets \ stylesheets \ application.css.scss file . But only the first controller can use that file when I link to another controller, then I can not use any CSS code.
Can I use only one application.css.scss for all the controllers in my application? Such as background color
, margin
, padding
It should already be configured in the new Rail application that you created.
You want to use CSS files in all the controllers, then start them
/app/views/layout/application.html.erb
given below Like the example:
<% = stylesheet_link_tag "css1", "css2"%>
Otherwise with a single line
<% = stylesheet_link_tag "application" ,: media = & gt; "All"% & gt;
Comments
Post a Comment