3

Below is an icon comprised of two images. The top image has a 1px transparent stroke "knocking out" the layer below. This is fine as an .ai file. enter image description here

However when I save as .svg the stroke has disappeared. enter image description here

Is there any way of saving an .svg file and keeping the transparent stroke masking the layer below?

Thanks.

2
  • 1
    you might want to actually 'expand' this knocking out effect by taking the flag shape, Object>Path>Offset Path and subtract the resulting shape from the house. That way, you actually change the shape and the effect will show up in all possible file formats. – Vincent May 7 '14 at 11:18
  • I'll turn it into an answer, then. Glad to help! – Vincent May 7 '14 at 11:34
4

It is a better idea to actually change your shapes—cut out the enlarged flag shap from the house shape:

  1. Select your green flag shape;
  2. Remove all strokes;
  3. Choose Object > Path > Offset Path... and choose an offset value;
  4. This creates a copy of your flag shape, enlarged as if it had an incorporated border of the thickness you specified. Select that shape (it's selected by default if you exit the Offset Path dialog box);
  5. Also select your house shape (Shift+click on it with the Black Arrow tool (V));
  6. In the Pathfinder palette, click on subtract.

This way, the house shape is actually changed, and the knockout effect will show up in any kind of file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.