Last active
August 8, 2019 16:07
-
-
Save Jagathishrex/d911a701e8662efe3c0f42598052094d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.two { | |
--textcolor: red; | |
} | |
.three { | |
--textcolor: blue; | |
} | |
.two { | |
color : var(--textcolor); | |
} | |
.three { | |
color : var(--textcolor); | |
} | |
</style> | |
<div class="one"> | |
<div class="two"> | |
this is red | |
<div class="three">this is blue</div> | |
<div class="four"> this is red color , the color is inherited from parent</div> | |
</div> | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="red-container"> | |
<span> hello(green) </span> | |
<span > 👋 </span> | |
<span> Javascript Jeep </span> | |
I am red | |
</div> | |
// css | |
<style > | |
div { | |
--txtColor : red; | |
} | |
span { | |
--txtColor : blue; | |
} | |
div { | |
color : var(--txtColor) | |
} | |
span { | |
color : var(--txtColor) | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment