Skip to content

Stroke and Masks issue with Svgs

hernan edited this page Mar 14, 2021 · 1 revision

Sometimes strokes are cut when combined with masks. This is related to the way svgs calculate the masked surface of paths.

When this happens a workaround is adding a group with a rectangle and a transparent fill on the masked layer.

Here is an example of the layer in after states. stroke_mask_problem

This is how it usually looks on the browser
stroke_mask_browser

And this is an example of how it can be fixed. stroke_mask_fix Notice:

  • the opacity set to 0% on the fill applied to the rectangle.
  • the rectangle surface covers the full surface of the stroke.
Clone this wiki locally