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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:46:51+00:00 2026-06-05T18:46:51+00:00

border:3px solid black; In the above example, you can set color by saying the

  • 0
border:3px solid black;

In the above example, you can set color by saying the color’s name. There is also a wide verity of color name out there also.

And so my question is this. Is there a way to define your own custom color name on your site in css, javascript/jquery, or even php.

Why? (I’m partially mad, but) In c# it can be handy to have a global variable to use that you can change and it would effect everything using it, and I would love a similar effect.

You may ask “Couldn’t you just use class=”myColor”?” I COULD, but I don’t always use the color the same way, I sometimes use it for borders, background, or even text. Also, I’d have to give it a class, rather than declare it in css, which for a border can be weird.

Basically, I was wondering if there’s anything even close to what I am looking for, be it css (so doubt it), jquery, or even php. Considering I want to use this color name in css I doubt this is possible, but I would love to be proven wrong.

  • 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-05T18:46:53+00:00Added an answer on June 5, 2026 at 6:46 pm

    You can set variables using a CSS PreProcessor such as SASS or LESS.

    Using SASS it looks like this.

    $lightGrey :#5e5e5el;
    
    a {
        color: $lightGrey;
    }
    

    Output:

    a {
        color: #5e5e5e;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can we shorten : border-top:1px solid black; border-left:2px solid red; border-bottom:3px solid green; border-right:4px
#messageContainer td { cursor: pointer; border-bottom: 1px solid #2A2A2A; padding-bottom: 3px; padding-top: 3px; background-color:
What I want: <div style=overflow:scroll;width:100%;height:50%;> &nbsp; <div style=height:500px;width:400px;border:solid 3px red;> </div> </div> <div style=overflow:scroll;width:100%;HEIGHT:50%;>
I have some CCS defined as following: .FW_Buttons { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
The border displays a default color (that's orange on my Nexus S) while scrolling
In some versions of IE, there is a thin 2px border surrounding the document
I have a border layout whose center panel is defined like the below. {
I tried : .bb { border-bottom:1px; } <tr class=bb> But no effect at all.
I use -moz-border-radius and -webkit-border-radius for making rounded corner. However as we know IE
Curve the border of silverlight listbox control: I just want to curve the ends

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.