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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:45:07+00:00 2026-06-04T20:45:07+00:00

Is there a way to import the styling of a single CSS selector into

  • 0

Is there a way to import the styling of a single CSS selector into another CSS selector and add to it or rewrite properties from it.

Let’s say:

.original_class{
background:black;
color:white;
}
.overwrite{
@import(.original_class); /* I know this doesn't work */
color:blue;
border:1px solid green;
}

I can accomplish this by just redeclaring the .original_class and assigning new values (since CSS styles are rewritten from top to bottom), but this will replace the attributes of the original CSS class. What I want is to inherit its properties into another class without having to write them again (duplicate).

  • 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-04T20:45:08+00:00Added an answer on June 4, 2026 at 8:45 pm

    Not directly, no.

    You could do something like this in your HTML:

    <div class="original_class overwrite">...</div>
    

    This will have the same effect, but you will have to do this for every element you want styled that way.

    There is also the option of using a CSS pre-processor, like SASS, which supports inheritance/mixins.

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

Sidebar

Related Questions

Is there a way to import data from a JSON file into R? More
Is there a way to import HTML snippets or HAML snippets into a HAML
In django is there way to import all modules ex: from project.models import *
Is there a way to import FLA files into Flash Builder 4 such as
With SWT Browser, is there any way to import a SSL certificate file into
Is there a way to import Python 3 modules into Python 2 scripts? I
Is there any way to quickly import data from a .csv or tab delineated
Is there a way to #import a class from a string in Objective-C at
Is there any way to import/export the orders from magento. Since we have magento
hello is there a way to import data from excel 2007 file? it is

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.