How do I make an object fill transparent without showing objects below in Illustrator?
I am trying to copy and paste this icon I designed into an infographic in Illustrator.
The black shadow is a copy of the original icon set behind, so if I set the white of the front element to transparent that black shows.
Is there an easy way to simply select only the white elements and make them transparent?
If I make the white of the icon transparent then this happens.
There are 3 parts to this graphic.
The black shadow, the calendar object and the calendar outline.
For your design, copy the white object with the stroke and paste infront. Make 1 version have no stroke and a fill and the other version have no fill and a stroke. Hide or lock the object with the stroke for now.
Select the top parts both the calendar object and the black shadow (Ungroup from the bottom part of the calendar icon if needed).
Open pathfinder options, Window -> Pathfinder. Select the "Minus Front" option.
Do the same for the bottom half of the calendar icon.
Reveal the stroke.
Using pathfinder is a destructive process so it isn't ideal.
A better option is to define a transparency knockout group. In a transparency knockout group, the elements of a group don't show through each other.
Group your icon (cmd + G)
From the transparency panel check Knockout Group.
Select all the white shapes in your group.
From the appearance panel set the opacity of the fill (not the whole shape) to 0%.
You now have a transparent icon that you can still edit as before. No need for destructive pathfinder operations.