Skip to content

Commit

Permalink
Merge pull request #156 from oddbird/prepend-popover-stylesheet
Browse files Browse the repository at this point in the history
prepend popover stylesheet
  • Loading branch information
jgerigmeyer authored Nov 29, 2023
2 parents 079f724 + 7106a79 commit 5edeff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ export function injectStyles(root: Document | ShadowRoot) {
const sheet = document.createElement('style');
sheet.textContent = styles;
if (root instanceof Document) {
root.head.append(sheet);
root.head.prepend(sheet);
} else {
root.append(sheet);
root.prepend(sheet);
}
} else {
root.adoptedStyleSheets = [...root.adoptedStyleSheets, popoverStyleSheet];
root.adoptedStyleSheets = [popoverStyleSheet, ...root.adoptedStyleSheets];
}
}

Expand Down

0 comments on commit 5edeff3

Please sign in to comment.