Skip to content

Instantly share code, notes, and snippets.

@webaware
Last active April 17, 2023 23:23
Show Gist options
  • Save webaware/a5a5de0a0b71958beaf34c1199a6bd12 to your computer and use it in GitHub Desktop.
Save webaware/a5a5de0a0b71958beaf34c1199a6bd12 to your computer and use it in GitHub Desktop.
Give something a grey / white chequerboard background, in two lines of CSS. Stolen from somewhere on Stack Overflow IIRC.
.my-element {
background-image: conic-gradient(#ddd 25%, #fff 25%, #fff 50%, #ddd 50%, #ddd 75%, #fff 75%);
background-size: 40px 40px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment