Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@github/paste-markdown": "^1.4.0",
"@github/relative-time-element": "^4.1.2",
"@lit-labs/react": "^1.1.1",
"@oddbird/popover-polyfill": "^0.3.1",
"@oddbird/popover-polyfill": "^0.2.3",
"@primer/behaviors": "^1.3.4",
"@primer/octicons-react": "^19.8.0",
"@primer/primitives": "^7.11.11",
Expand Down
14 changes: 4 additions & 10 deletions src/drafts/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {isSupported, apply} from '@oddbird/popover-polyfill/fn'

// Reusable styles to use for :popover-open (Chrome, Edge) and \:popover-open (Safari, Firefox) classes
const popoverStyles = `
display: block;
padding: 0.5em 0.75em;
width: max-content;
height: fit-content;
Expand All @@ -32,22 +33,16 @@ const animationStyles = `
`

const StyledTooltip = styled.div`
/* tooltip element should be rendered visually hidden when it is not opened. */
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
/* tooltip element shouldn't be in the DOM when it is not open */
display: none;
white-space: nowrap;
position: fixed;
font: normal normal 11px/1.5 ${get('fonts.normal')};
-webkit-font-smoothing: subpixel-antialiased;
color: ${get('colors.fg.onEmphasis')};
text-align: center;

word-wrap: break-word;
background: ${get('colors.neutral.emphasisPlus')}; //bg--emphasis-color
background: ${get('colors.neutral.emphasisPlus')};
border-radius: ${get('radii.2')};
border: 0;
opacity: 0;
Expand All @@ -59,7 +54,6 @@ const StyledTooltip = styled.div`
}
/* pollyfil */
z-index: 2147483647;
display: block;

/* class name in chrome is :popover-open */
&:popover-open {
Expand Down