Skip to content

Instantly share code, notes, and snippets.

@ktzanev
Last active March 12, 2017 11:22
Show Gist options
  • Save ktzanev/0a77f12ac1843732679d8d49e8938b35 to your computer and use it in GitHub Desktop.
Save ktzanev/0a77f12ac1843732679d8d49e8938b35 to your computer and use it in GitHub Desktop.
hérédité en CSS ? (GistRun)
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>hérédité en CSS ?</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div> Un div avec
<span id="un">un span</span>
</div>
<div> Un autre div avec
<span id="deux">un autre span</span>
</div>
</body>
</html>
div {
border: 1px solid red;
margin: 1em;
padding: 1em;
font-size: 2em;
}
#un {
border: inherit;
}
#deux {
font-size: initial;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment