Skip to content

Commit

Permalink
Bug 1786626 [wpt PR 35586] - Incorporate updates to pop-up UA stylesh…
Browse files Browse the repository at this point in the history
…eet, a=testonly

Automatic update from web-platform-tests
Incorporate updates to pop-up UA stylesheet

There's been pushback [1] to the !important rule on display:none,
and more conversation about padding. This CL updates the behavior
to keep up with the conversation. It also un-breaks several demos
that were relying on the non-!important display:none rule.

[1] openui/open-ui#561 (comment)

Bug: 1307772
Change-Id: Ia267bf54546e433436963ae4a89d7828181c7015
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3851364
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1038529}

--

wpt-commits: b1b8cdddc3fe9cbb5fe13fc05cbe25f6d574b6dd
wpt-pr: 35586
  • Loading branch information
mfreed7 authored and moz-wptsync-bot committed Sep 4, 2022
1 parent 9860fba commit 4a3c5aa
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@
<meta charset="utf-8">
<link rel=author href="mailto:masonf@chromium.org">
<link rel="stylesheet" href="resources/popup-styles.css">


<div class=fake-pop-up>This content should be visible and green</div>
<div class=fake-pop-up style="top:100px;">This content should be visible and green</div>
<div class=fake-pop-up style="top:200px;">This content should be visible and green</div>

<style>
.fake-pop-up {
top: 0;
margin:10px;
width: 300px;
height: 50px;
background: green;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,34 @@
<link rel=help href="https://open-ui.org/components/popup.research.explainer">
<link rel=match href="popup-hidden-display-ref.tentative.html">

<div popup>This content should *not* be visible</div>
<div popup=invalid>This content should *not* be visible</div>
<div class=nottoplayer popup >This content should be visible and green</div>
<div class=nottoplayer popup=invalid style="top:100px;">This content should be visible and green</div>
<div class=toplayer popup style="top:200px;">This content should be visible and green</div>

<style>
[popup] {
display: block !important; /* This should *not* make the popup visible */
display: block; /* This should make the popup visible */
top: 0;
margin:10px;
width: 300px;
height: 200px;
height: 50px;
}
[popup].nottoplayer {
background: green;
}
[popup].toplayer {
background: red;
}
[popup].toplayer:top-layer {
background: green;
}
[popup].nottoplayer:top-layer {
background: red;
}
</style>
<script>
const toplayer = document.querySelectorAll('[popup].toplayer');
if (toplayer.length !== 1)
document.write('FAIL');
toplayer[0].showPopUp();
</script>
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
.fake-pop-up {
position: fixed;
inset-inline-start: 0;
inset-inline-end: 0;
inset-block-start: 0;
inset-block-end: 0;
inset: 0;
width: fit-content;
height: fit-content;
margin: auto;
border: solid;
padding: 0.25em;
overflow: auto;
color: CanvasText;
background-color: Canvas;
}
.fake-pop-up-backdrop {
position: fixed;
top:0; right:0; bottom:0; left:0;
inset:0;
pointer-events: none !important;
}

0 comments on commit 4a3c5aa

Please sign in to comment.