Skip to content

Instantly share code, notes, and snippets.

@sagar-gavhane
Created June 24, 2020 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar-gavhane/fe7a14c28fbcedc4d7317b0d6fe46f5f to your computer and use it in GitHub Desktop.
Save sagar-gavhane/fe7a14c28fbcedc4d7317b0d6fe46f5f to your computer and use it in GitHub Desktop.
selector hunts for forbidden nesting
:not(figure) > figcaption,
:not(fieldset) > legend,
:not(dl) > :is(dt, dd),
:not(tr) > :is(td, th),
:not(select) > :is(option, optgroup),
:not(table) > :is(thead, tfoot, tbody, tr, colgroup, caption) {
outline: 2px dotted red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment