3 ms·
Does anyone know if the var() function only work with the variables? For example, can I do something like: background-color: var(color);?
by ihuman 12y ago
Does anyone know if the var() function only work with the variables? For example, can I do something like:
background-color: var(color);?
- ahoge 12y agoDoesn't work. http://jsfiddle.net/QEJw9/ http://jsfiddle.net/QEJw9/
- bouncingsoul 12y agoIn case you didn't know, there's already a special version of the `inherit` keyword for using the color value in other properties: background-color: currentColor; Fully supported in all modern browsers. http://devdocs.io/css/color_value#currentColor_keyword http://devdocs.io/css/color_value#currentColor_keyword