Skip to content

Instantly share code, notes, and snippets.

@lucasdidthis
Created October 25, 2022 19:54
Show Gist options
  • Save lucasdidthis/021a91f7cc34326766ee35eb84d53e55 to your computer and use it in GitHub Desktop.
Save lucasdidthis/021a91f7cc34326766ee35eb84d53e55 to your computer and use it in GitHub Desktop.
simulate textmarker with pure css
mark {
margin: 0 -0.4em;
padding: 0.1em 0.4em;
border-radius: 0.8em 0.3em;
background: transparent;
background-image: linear-gradient(
to right,
rgba(255, 225, 0, 0.1),
rgba(255, 225, 0, 0.7) 4%,
rgba(255, 225, 0, 0.3)
);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
// from https://max.hn/thoughts/how-to-create-a-highlighter-marker-effect-in-css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment