Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8522447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:07:14+00:00 2026-06-11T07:07:14+00:00

At this time I build a new website with Ruby on Rails. As the

  • 0

At this time I build a new website with Ruby on Rails. As the site becomes bigger and bigger, my css rules are getting messy. So I thought a way to improve my css code readability and avoid mistakes:

I have one global css.scss (SASS, something like LESS) file for all the pages that resets and handles global elements such as header and footer.
For every other page I have a dedicated css file. For instance, for the about page I have an about.css.scss file. In the about_page.css.scss file the code looks like:

.about_page {
  .othersubclass {
    .
    .
  }
}

while in the ‘about.erb’ page I have the following:

<div class="about_page">
  <div class="othersubclass">
    .
    .
    .
  </div>
</div>

Is this a good or a bad technique? Is there any known technique that faces this problem?

(btw RoR concatenates all css files into 1 file thus there is no problem with extra http requests)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:07:16+00:00Added an answer on June 11, 2026 at 7:07 am

    As per: http://betterfrontend.com/guides/stylesheets/

    It’s generally recommended to have a stylesheet per a major section of the site.

    You can then compile it all within application.css.scss (all the @import’s in here).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this time it's about Ruby On Rails. I have a form in the view
I'm trying to build this layout: I have this at this time: http://jsfiddle.net/Gh6mB/12/ The
I am trying to build a free web application using ruby/rails It should be
this is my first time using any StackExchange website, so let's see how it
When I upload a new version of CSS files for my website, there is
i build a new website.but the host is in USA.i am not in USA.
So I've build this website in MVC3 in which I am using the default
I'm new to coding in general, and I'm wanting to build a website that
i'm trying to build a website using a jquery horizontal accordion following this handy
i'm currently building a new private website and now it's time for building the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.