Skip to content

Instantly share code, notes, and snippets.

@glipitch
Created March 8, 2023 13:25
Show Gist options
  • Save glipitch/93096b565fd9801425604618cf643ca3 to your computer and use it in GitHub Desktop.
Save glipitch/93096b565fd9801425604618cf643ca3 to your computer and use it in GitHub Desktop.
Display outlines on nested elements
:root /*or select specific element(s)*/ {
--outline-width: .01px;
}
* {
outline: var(--outline-width) solid red;
}
* * {
outline: var(--outline-width) solid green
}
* * * {
outline: var(--outline-width) solid orange
}
* * * * {
outline: var(--outline-width) solid blue
}
* * * * * {
outline: var(--outline-width) solid red
}
* * * * * * {
outline: var(--outline-width) solid green
}
* * * * * * * {
outline: var(--outline-width) solid orange
}
* * * * * * * * {
outline: var(--outline-width) solid blue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment