Skip to content

Instantly share code, notes, and snippets.

@travhimself
Created July 8, 2014 22:13
Show Gist options
  • Select an option

  • Save travhimself/223be503c7ee3539c4fc to your computer and use it in GitHub Desktop.

Select an option

Save travhimself/223be503c7ee3539c4fc to your computer and use it in GitHub Desktop.
granular css shadows with multiple rules
/*
use x-shadow and y-shadow to apply style on a specific side
blur == width of x or y value
spread == negative of x or y value
the below rule would apply style to all four sides of an element (in order: top, right, bottom, left)
combine as desired to apply only to certain sides
works best for inset shadows
*/
box-shadow: inset 0px 1px 1px -1px black, inset -1px 0px 1px -1px black, inset 0px -1px 1px -1px black, inset 1px 0px 1px -1px black;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment