The following code produces the error
The value being set with "var(--background-color)" has already been set by "3px" which appears earlier.
Code: Select all
<!DOCTYPE html>
<html lang=en>
<head>
<title>Test</title>
<style>
*:root {
--background-color: #660066;
}
a {
border-bottom: 3px solid var(--background-color);
}
</style>
</head>
<body>
<a href=https://example.com>example</a>
</body>
</html>
Code: Select all
<!DOCTYPE html>
<html lang=en>
<head>
<title>Test</title>
<style>
*:root {
--background-color: #660066;
}
a {
border-bottom-width: 3px;
border-bottom-style: solid;
border-bottom-color: var(--background-color);
}
</style>
</head>
<body>
<a href=https://example.com>example</a>
</body>
</html>
Many thanks!