csstools / csstools/normalize.css

Dialogs cannot be shown with the Popover API

未关闭 适合新手
#34 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
HTML
星标
656
派生
66
PR 合并指标
30 天内没有已合并 PR

描述

The following rule prevents `` elements from being shown with the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API):

```css
:where(dialog:not([open])) {
display: none;
}
```

This codepen demonstrates the issue: https://codepen.io/pokeplun/pen/GgjdgQx

The methods of showing the `` that treat it as a popover don't result in a state that matches `dialog[open]` (they only match [:popover-open](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:popover-open)), which results in the element never being shown by default.

`` is perfectly reasonable semantically, so this seems like a bug

贡献指南

打开贡献指南

调研方向

Start by reproducing the dialog/popover behavior in the linked CodePen, then locate the shown `dialog:not([open])` rule in the stylesheet. Update the normalization so a `` can be displayed, and verify that both ordinary dialogs and popover dialogs remain correctly visible or hidden.

由索引模型根据 Issue 内容生成。

评估

技术栈
css
领域
frontend
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
冷清
描述清晰度
描述清楚
新手友好度
72/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。