Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save HarwinBorger/d45c0eada404e26f83fdfca1c92ebc04 to your computer and use it in GitHub Desktop.

Select an option

Save HarwinBorger/d45c0eada404e26f83fdfca1c92ebc04 to your computer and use it in GitHub Desktop.
SVG Filter Inner Shadow for Illustrator
<filter id="InnerShadow">
<!-- https://gist.github.com/seanbarclay/8627991 -->
<!-- Shadow Offset, don't make vals lower or you'll break it -->
<feOffset
dx='2'
dy='3'
/>
<!-- Shadow Blur -->
<feGaussianBlur
stdDeviation='1'
result='offset-blur'
/>
<!-- Invert the drop shadow to create an inner shadow -->
<feComposite
operator='out'
in='SourceGraphic'
in2='offset-blur'
result='inverse'
/>
<!-- Color & Opacity -->
<feFlood
flood-color='black'
flood-opacity='0.40'
result='color'
/>
<!-- Clip color inside shadow -->
<feComposite
operator='in'
in='color'
in2='inverse'
result='shadow'
/>
<!-- Put shadow over original object -->
<feComposite
operator='over'
in='shadow'
in2='SourceGraphic'
/>
</filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment