diff --git a/packages/ui/src/Markdown/styles/editor.css b/packages/ui/src/Markdown/styles/editor.css index 4bd09340..88274444 100644 --- a/packages/ui/src/Markdown/styles/editor.css +++ b/packages/ui/src/Markdown/styles/editor.css @@ -340,10 +340,6 @@ border-radius: 6px; } -.tippy-box[data-theme~='light-border'] > .tippy-backdrop { - background-color: #fff; -} - .tippy-arrow { display: none; } diff --git a/packages/ui/src/ThemeProvider/ThemeProvider.jsx b/packages/ui/src/ThemeProvider/ThemeProvider.jsx index 8afb3221..39c4e7c9 100644 --- a/packages/ui/src/ThemeProvider/ThemeProvider.jsx +++ b/packages/ui/src/ThemeProvider/ThemeProvider.jsx @@ -21,6 +21,8 @@ export function GlobalStyle() { } body { background: ${colors.canvas.default}; + --tooltip-bgColor: ${colors.neutral.emphasisPlus}; + --tooltip-fgColor: ${colors.fg.onEmphasis}; } `} ); diff --git a/packages/ui/src/ThemeProvider/ThemeProvider.test.js b/packages/ui/src/ThemeProvider/ThemeProvider.test.js index 13f88d0c..293f38d3 100644 --- a/packages/ui/src/ThemeProvider/ThemeProvider.test.js +++ b/packages/ui/src/ThemeProvider/ThemeProvider.test.js @@ -17,6 +17,12 @@ describe('ui', () => { canvas: { default: '#654321', }, + neutral: { + emphasisPlus: '#123456', + }, + fg: { + onEmphasis: '#abcdef', + }, }, }, }); @@ -48,6 +54,12 @@ describe('ui', () => { canvas: { default: '#FEDCBA', }, + neutral: { + emphasisPlus: '#112233', + }, + fg: { + onEmphasis: '#334455', + }, }, }, }); @@ -73,7 +85,7 @@ describe('ui', () => { }); describe('GlobalStyle', () => { - it('renders the correct global style', () => { + it('applies the correct global style', () => { vi.spyOn(primerReact, 'useTheme').mockReturnValue({ resolvedColorScheme: 'dark', theme: { @@ -81,6 +93,12 @@ describe('ui', () => { canvas: { default: '#789', }, + neutral: { + emphasisPlus: '#456', + }, + fg: { + onEmphasis: '#123', + }, }, }, }); @@ -97,6 +115,8 @@ describe('ui', () => { } body { background: #789; + --tooltip-bgColor: #456; + --tooltip-fgColor: #123; } `); });