Skip to content

Commit

Permalink
Merge pull request #60 from oddbird/fixup-css
Browse files Browse the repository at this point in the history
Fixup css
  • Loading branch information
jgerigmeyer authored Jan 16, 2023
2 parents c13cff7 + 195231f commit b45eb36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
29 changes: 11 additions & 18 deletions src/popover.css
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
[popover='' i],
[popover='auto' i],
[popover='manual' i] {
display: none;
[popover] {
position: fixed;
top: 0;
left: 0;
padding: 1em;
z-index: 2147483647;
inset: 0;
padding: 0.25em;
width: fit-content;
height: fit-content;
border: 1px solid;
border: solid;
background: canvas;
color: canvastext;
overflow: auto;
margin: auto;
inset-inline-start: 0;
inset-inline-end: 0;
inset-block-start: 0;
inset-block-end: 0;
}

/* stylelint-disable selector-class-pattern */
[popover='' i].\:open,
[popover='auto' i].\:open,
[popover='manual' i].\:open {
display: block;
position: fixed;
z-index: 2147483647;
[popover]:not(.\:open) {
display: none;
}
/* stylelint-enable selector-class-pattern */

[popover][anchor] {
inset: auto;
}

/* Necessary for compatibility with Chrome */
[popover]:not(:-internal-popover-hidden) {
display: block;
Expand Down
1 change: 0 additions & 1 deletion tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ test('popover as "manual"', async ({ page }) => {

test('popover as "invalid"', async ({ page }) => {
const popover = (await page.locator('#popover6')).nth(0);
await expect(popover).toBeVisible();
await expect(
async () => await popover.evaluate((node) => node.showPopover()),
).rejects.toThrow(
Expand Down

0 comments on commit b45eb36

Please sign in to comment.