I\'m trying to add color to different element with a data attribute in my css but doensn\'t work ...
I follow this instructions :
The attr() Function: Proper
You can pass css values from html:
Button
to css:
button::after { content: var(--tooltip-string); color: var(--tooltip-color); font-size: var(--tooltip-font-size); }
source: https://css-tricks.com/css-attr-function-got-nothin-custom-properties/ codepen: https://codepen.io/chriscoyier/pen/EbxVME