Skip to content

Instantly share code, notes, and snippets.

@alienlebarge
Created January 5, 2016 07:49
Show Gist options
  • Save alienlebarge/a9bbe05bcdfa31ab71a0 to your computer and use it in GitHub Desktop.
Save alienlebarge/a9bbe05bcdfa31ab71a0 to your computer and use it in GitHub Desktop.
Hide any typographic block that is empty.
p:empty,
h1:empty,
h2:empty,
h3:empty,
h4:empty,
h5:empty,
h6:empty,
ul:empty,
ol:empty,
dl:empty,
li:empty,
dt:empty,
dd:empty,
blockquote:empty {
/* Hide any typographic block that is empty. This is a bit
contraversial, but helps correct style errors in blocks
of user input where the HTML has ended up being dodgy -
perhaps thanks to a CMS editor, for example. */
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment