Day 57 - Popover API is now Baseline Newly Available

Day 57 - Popover API is now Baseline Newly Available

?? An Awesome CSS Link a Day – Day 57 ??

The Magic of Native popover

Have you ever wished for a native way to create modals, popovers, tooltips, dropdowns on in general overlaying stuff without relying on JavaScript? The HTML Popover API is here to change the game, giving us an elegant, accessible, and declarative solution!

Introduction

The popover attribute in HTML introduces a built-in solution for pop-ups, eliminating the need for extra JavaScript. Unlike traditional overlaying elements that require event listeners, popover integrates seamlessly with CSS and offers automatic dismissal behavior, making it both accessible and lightweight.

?? Theory: How popover Works

  1. Declarative & Simple
  2. Automatic Dismissal
  3. Flexible Styling with CSS

?? Today’s Links

Explore the HTML Popover API in depth with these great resources:

?? HTML Popover API: A Game Changer for UI

?? Popover API: Baseline Support and Best Practices

There's also a full JS API as well with specific methods, extensions and events. Read the docs in the related MDN page.

?? Giveaways

  • Learn how popover replaces JS-heavy overlaying elements
  • Discover how to style popovers purely with CSS.
  • See examples of accessibility best practices for pop-ups.
  • Get insights into baseline browser support and how to use popover effectively.

? Why This Rocks

  • No JavaScript required for most use cases, including ESC key dismissal binding.
  • Extremely more accessible than traditional modal patterns.
  • Easier styling with :popover-open pseudo-class and ::backdrop pseudo-element.
  • Native browser support is expanding fast!

??? Join the Conversation

  • Have you experimented with the popover API yet?
  • Do you see it replacing modals and tooltips in your projects?
  • What’s the first use case you’d apply popover to?
  • How do you think popover impacts web accessibility and UX?

Let’s talk about how this modern HTML feature can simplify UI development! ??

要查看或添加评论,请登录

Emiliano Pisu的更多文章

  • Day 77 - Making sense of border-image

    Day 77 - Making sense of border-image

    ?? An Awesome CSS Link a Day – Day 77 ?? Finally Making Sense of border-image #AnAwesomeCSSLinkADay #YouDontMessWithCSS…

  • Day 76 - Text Underline Offset

    Day 76 - Text Underline Offset

    ?? An Awesome CSS Link a Day – Day 76 ?? Chilled-Out Text Underlines with text-underline-offset #AnAwesomeCSSLinkADay…

  • Day 75 - Custom Property Fallbacks

    Day 75 - Custom Property Fallbacks

    ?? An Awesome CSS Link a Day – Day 75 ?? The Power of Fallbacks in Custom Properties #AnAwesomeCSSLinkADay…

  • Day 74 - Infinite Logos Animation

    Day 74 - Infinite Logos Animation

    ?? An Awesome CSS Link a Day – Day 74 ?? Infinite Logo Animations with CSS #AnAwesomeCSSLinkADay #YouDontMessWithCSS…

  • Day 73 - CSS-Only Range Slider Value Display

    Day 73 - CSS-Only Range Slider Value Display

    ?? An Awesome CSS Link a Day – Day 73 ?? CSS-Only Range Slider Value Display #AnAwesomeCSSLinkADay #YouDontMessWithCSS…

  • Day 72 - The :has() Selector on the Battlefield

    Day 72 - The :has() Selector on the Battlefield

    ?? An Awesome CSS Link a Day – Day 72 ?? The :has() Selector on the Battlefield #AnAwesomeCSSLinkADay…

  • Day 71 - The :is() Selector on the Battlefield

    Day 71 - The :is() Selector on the Battlefield

    ?? An Awesome CSS Link a Day – Day 71 ?? The :is() Selector on the Battlefield #AnAwesomeCSSLinkADay…

  • Day 70 - Celebrating CSS with Pure CSS Games

    Day 70 - Celebrating CSS with Pure CSS Games

    ?? An Awesome CSS Link a Day – Day 70 ?? Games in Pure CSS: No JavaScript, No Problem! #AnAwesomeCSSLinkADay…

    2 条评论
  • Day 69 - Cutting Borders from the Inside with mask and Gradients

    Day 69 - Cutting Borders from the Inside with mask and Gradients

    ?? An Awesome CSS Link a Day – Day 69 ?? Cutting Borders from the Inside with mask and Gradients #AnAwesomeCSSLinkADay…

  • Day 68 - Introducing sibling-index() & sibling-count()

    Day 68 - Introducing sibling-index() & sibling-count()

    ?? An Awesome CSS Link a Day – Day 68 ?? Introducing sibling-index() & sibling-count() #AnAwesomeCSSLinkADay…

社区洞察

其他会员也浏览了