I have an element with the following style:
p {
color: 'red';
}
When I'm trying to get the element color by running the following code:
const styles = window.getComputedStyle(pElem);
const value = styles.getPropertyValue('color');
I'm getting the color in RGB format. How I can get the real value - 'red'
?
I need this functionality for testing purposes, for example:
expect(p).toHaveStyle({color: 'red'});