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

  • Home
  • SEARCH
  • 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 54785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:16:30+00:00 2026-05-10T17:16:30+00:00

Usually when I build a site, I put all the CSS into one file,

  • 0

Usually when I build a site, I put all the CSS into one file, and all the properties that relate to a set of elements are defined at once. Like this:

#myElement {     color: #fff;     background-color: #000;     padding: 10px;     border: 1px solid #ccc;     font-size: 14pt; }  .myClass {     font-size: 12pt;     padding: 5px;     color: #ee3; } 

I’ve been considering splitting up my definitions into a number of different files (colours.css, layout.css, fonts.css …) as I have seen recommended. Something like this:

/* colours.css */ #myElement {     color: #fff;     background-color: #000;     border-color: #ccc; } .myClass {     color: #ee3; }  /* layout.css */ #myElement {     padding: 10px;     border: 1px solid; } .myClass {     padding: 5px; }  /* fonts.css */ #myElement {     font-size: 14pt; } .myClass {     font-size: 12pt; } 

To reduce HTTP requests, I’d be combining the files and stripping whitespace prior to rollout, so that’s not an issue, but my question is: does having all those selectors repeated over and over cause any performance issues in browsers?

Alternatively, are there any tools which avoid this (potential) issue by merging definitions from different files? ie: take the input given in my second example (3 different files), and combine them into one file, like the first example.

  • 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. 2026-05-10T17:16:31+00:00Added an answer on May 10, 2026 at 5:16 pm

    The browser will have to find all the definitions and then add them up and override the different properties based on the latest definition. So there will be a slight overhead.

    That being said it would be rather minimal and not very noticeable even on hardware 5 years old. The browsers are quite efficient at it these days.

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

Sidebar

Related Questions

Usually JavaPractices.com is a good site with good idea's, but this one troubles me:
So the first app that people usually build with SocketIO and Node is usually
Thanks for all the questions and responses posted on here. This site usually shows
I have build a site based on Ajax navigation. I have build it that
I found out that my javascript-intensive web site doesn't work reliably (or at all)
You usually invoke the following commands to build a ./configure d product: make make
In visual studio or any other IDE, usually there are two build configurations, Debug
usually selenium does not identify elements on a browser toolbar. But this is for
I am in the process of building a site that will contain features comparable
How to make a build in VS 2010 within an ASP.NET MVC application that

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.