DEV Community

Stefan Judis
Stefan Judis

Posted on • Originally published at stefanjudis.com on

2 1

TIL: SVGs have additional pointer-events properties

Today I came across this example about certain things you can do with pointer-events in CSS.

.foo {
  pointer-events: visiblePainted;
}
Enter fullscreen mode Exit fullscreen mode

visiblePainted is something I haven't seen before and it turns out that SVGs several other values for the pointer-events property:

  • visiblePainted
  • visibleFill
  • visibleStroke
  • visible
  • painted
  • fill
  • stroke
  • all

You can control very granular how elements in an SVG should behave and it's not bound to the typical "web development boxes". If you want to read more MDN has you covered. :)

Top comments (0)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • --last-failed: Zero in on just the tests that failed in your previous run
  • --only-changed: Test only the spec files you've modified in git
  • --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Practical examples included!

Watch Video 📹️

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay