Creating a unique 'block' element on a webpage named 'test-div' has been quite the challenge.
Adding an additional class to test-div changes the background color, such as:
test-div test-div-bg-bright-gold
test-div test-div-bg-dark-blue
and so forth.
Within my test-div, there is also a pseudo class that cuts the top-left border, with the requirement of matching the color of the applied background class. The CSS for this pseudo class appears as follows -
test-div::before {
content: '';
position: absolute;
top: 0; left: 0;
border-top: 100px solid white;
border-right: 100px solid var(--COLORTOMATCHTHEBGCLASSGOESHERE?);
width: 0;
}
The solution to this challenge has eluded me for some time now, any assistance would be immensely appreciated.
Thank you!