Skip to content

Instantly share code, notes, and snippets.

@indy
Created November 21, 2019 11:36
Show Gist options
  • Save indy/90158eca63a1be0113f02628a1780dae to your computer and use it in GitHub Desktop.
Save indy/90158eca63a1be0113f02628a1780dae to your computer and use it in GitHub Desktop.
CSS that breaks if the whitespace after closing brackets is removed
<head>
<style type = text/css>
#main[data-behavior = "1"] .styledheader {
background: yellow;
}
#main[data-behavior = "1"] ul.styledlist {
background: red;
}
</style>
</head>
<body>
<div id="main" data-behavior="1">
<h1 class="styledheader">This header should have a yellow background</h1>
<ul class="styledlist">
<li>these list items should have a red background</li>
<li>but this breaks if the space after the closing brackets in the css is removed</li>
</ul>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment