Skip to content

Instantly share code, notes, and snippets.

@vicainelli
Last active August 18, 2023 12:18
Show Gist options
  • Save vicainelli/f00c6b842258842dc58631822658eb77 to your computer and use it in GitHub Desktop.
Save vicainelli/f00c6b842258842dc58631822658eb77 to your computer and use it in GitHub Desktop.

CSS Snippets

Highlight an element on page

Blur the rest of the page and highligh some element, good to show new features/changes

css-highlight

body {
  backdrop-filter: brightness(80%);
}

article > *:not(article > header) {
  filter: blur(2px) grayscale(.5);
}

article > header {
  background: white;
  box-shadow: 0px 8px 8px 4px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 8px 16px;
  margin: -8px -16px;
}

*,:after,:before {
    box-sizing: border-box
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment