Working Around A Chrome Bug (And Other CSS Limitations)
blog.duvallj.pw·96w
Preview
Report Post

In my previous post1, I covered how Chrome’s mask-image support doesn’t do any antialiasing for radial-gradient, and what that meant for making notification badge cutouts. In this post, I’ll go over a different way of providing a mask-image that does have antialiasing (in all browsers!), namely SVGs.


Recall that we left off with a mask that looked something like this:

<style>
.take3 .pfp {
border-radius: 50%;
mask-image:
radial-gradient(
ellipse 20% 20% at 80% 20%,
transparent 100%,
white 100%
),
linear-gradient(
to bottom,
white 40%,
transparent 40%
),
linear-gradient(
to left,
transparent 20%,
white 20%
);
mask-composite: subtract;
}
</style>
<div class="horiz"...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help