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 8050613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:07:27+00:00 2026-06-05T07:07:27+00:00

Just ran a decent amount of css through csslint, mainly to check for errors.

  • 0

Just ran a decent amount of css through csslint, mainly to check for errors. 80% of the warnings I get are from defining the same header element more than once. So I was wondering what the best way to clean up these kind of styles would be…

h4 {
    color: red;
}

.archive h4 {
    color: green;
}

Keeping in mind I’m already using h1 – h6 styles elsewhere in the design.

Would it be better to use classes for this and then inherit the styles with mix-ins (i’m using stylus)?

h4 {
    color: red;
}

.archive-header {
    color: green;
}

While i’m at it, why does csslint warn against this? Are there performance hits?

  • 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-05T07:07:28+00:00Added an answer on June 5, 2026 at 7:07 am
    1. To get around it, sure… you’re solution should work just fine.
    2. CSS Lint warns against it because you shouldn’t style the same headers differently. Here’s a little excerpt from an article talking more about the subject:

    When styling headings (or really anything) we want three big goals to be met:

    1. DRY – Do not repeat yourself. We want to set headings once and never (ok, rarely!) repeat those font styles or selectors. This will make our site easier to maintain.
    2. Predictable – The heading should look the same no matter where on the page it is placed. This will make creating new pages and content easier.
    3. Keep specificity low and selectors as simple as possible. This will help with performance and keep the site from growing more and more tangled over time.
  2. No performance hits. If anything, it might even be better to use a class name instead of a tag. The solution you proposed is almost a textbook recommendation of how to make your website faster by Google.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing the CSS for our website and I just ran it through
I just ran an update edition to update from SQL Server 2008 R2 Express
Just ran into an issue with a has_many :through association and after/before-destroy callbacks not
I just ran into the user-defined conversions to or from an interface are not
I just ran into one of the most mind boggling errors ever. false ==
I just ran into a problem I already know from other programming languages/frameworks ....
I just ran a search for PHP.ini file in my C:\WAMP server and gosh!
I just ran into to strange problem, I have a custom tableview cell with
I just ran this jsPerf test in Chrome 18 and found that .class performs
I just ran this simple code snippet provided by the wiki, because I couldn't

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.