0

I am trying to apply css from some other existing css, In my style sheet

I have a css

  .baseColor{
  color: red;
  }

now in my other css , i dont want to assign a hardcoded color , instead i need to use the same color whichever is in baseColor..

 .buttonColor{
 color: (What ever is in baseColor)
  }

 .tabColor{
   color: (What ever is in baseColor)
  }

is this possible

junaidp
  • 10,801
  • 29
  • 89
  • 137
  • You can't do that normally but CSS Custom Properties might be an option - https://developer.mozilla.org/en-US/docs/Web/CSS/--* – Paulie_D Oct 08 '20 at 07:54
  • you may use the SASS instead of using CSS. you can assign in variable and can call from your css class. https://www.w3schools.com/sass/showsass.php?filename=demo_sass_first – Kingston Oct 08 '20 at 07:57

0 Answers0