Beispiel:CSS-custom-props-1a.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css">
<title>Custom Properties und Vererbung </title>
<style>
body {
--farbe: red;
}
ul {
color: var(--farbe);
}
li {
--farbe: blue;
}
</style>
</head>
<body>
<h1>Custom Properties und Vererbung </h1>
Hallo
<ul>
<li>Welt</li>
<li>Selfhtml</li>
</ul>
</body>
</html>