diff --git a/packages/nimble-components/src/theme-provider/design-token-comments.ts b/packages/nimble-components/src/theme-provider/design-token-comments.ts index 5d3c582779..c601c3da79 100644 --- a/packages/nimble-components/src/theme-provider/design-token-comments.ts +++ b/packages/nimble-components/src/theme-provider/design-token-comments.ts @@ -173,7 +173,8 @@ export const comments: { readonly [key in TokenName]: string | null } = { tooltipCaptionFontWeight: null, tooltipCaptionFontLineHeight: null, tooltipCaptionFallbackFontFamily: null, - tooltipBackgroundColor: 'Background color for tooltips- Will need to be updated for light mode- 2 background colors for light mode', + tooltipBackgroundColor: + 'Background color for tooltips- Will need to be updated for light mode- 2 background colors for light mode', errorTextFont: 'Font shorthand for the "Error_LightUi" base token', errorTextFontColor: 'Font color for "Error_LightUi" base token', errorTextDisabledFontColor: diff --git a/packages/nimble-components/src/tooltip/index.ts b/packages/nimble-components/src/tooltip/index.ts index 5b54168591..d00cbb8095 100644 --- a/packages/nimble-components/src/tooltip/index.ts +++ b/packages/nimble-components/src/tooltip/index.ts @@ -23,4 +23,4 @@ const nimbleTooltip = Tooltip.compose({ styles }); -DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip()); \ No newline at end of file +DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip()); diff --git a/packages/nimble-components/src/tooltip/styles.ts b/packages/nimble-components/src/tooltip/styles.ts index 0c0c8a5129..b8b8e0ad14 100644 --- a/packages/nimble-components/src/tooltip/styles.ts +++ b/packages/nimble-components/src/tooltip/styles.ts @@ -6,22 +6,24 @@ import { tooltipCaptionFontColor, borderWidth, tooltipBackgroundColor, + tooltipCaptionFontSize } from '../theme-provider/design-tokens'; // box shadow color may need to be fixed // purple color needs to be fixed export const styles = css` - ${display('inline-flex')} :host { font: ${tooltipCaptionFont}; + font-style: normal; + font-weight: normal; + letter-spacing: 0px; color: ${tooltipCaptionFontColor}; - align-items: left; - cursor: pointer; - outline: none; - user-select: none; + font-size: ${tooltipCaptionFontSize}; + font-height: 14px; + text-align: left; } .tooltip { @@ -29,12 +31,14 @@ export const styles = css` flex-shrink: 0; max-width: 440px; border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3); - box-shadow: 0px 3px 4px #00000029; + box-shadow: 0px 3px 4px #00000029; background-color: ${tooltipBackgroundColor}; - padding: 1px; + padding-bottom: 6px; + padding-left: 8px; + padding-right: 8px; + padding-top: 4px; display: inline-flex; align-items: center; justify-content: center; - } `; diff --git a/packages/nimble-components/src/tooltip/tests/tooltip-matrix.stories.ts b/packages/nimble-components/src/tooltip/tests/tooltip-matrix.stories.ts index 34a4043462..6eb981159d 100644 --- a/packages/nimble-components/src/tooltip/tests/tooltip-matrix.stories.ts +++ b/packages/nimble-components/src/tooltip/tests/tooltip-matrix.stories.ts @@ -12,7 +12,11 @@ import { import { backgroundStates } from '../../utilities/tests/states'; import { hiddenWrapper } from '../../utilities/tests/hidden'; import '../../all-components'; -import { bodyFont, bodyFontColor, borderColor } from '../../theme-provider/design-tokens'; +import { + bodyFont, + bodyFontColor, + borderColor +} from '../../theme-provider/design-tokens'; const metadata: Meta = { title: 'Tests/Tooltip', @@ -41,44 +45,51 @@ const verticalViewportLockStates = [ type VerticalViewportLockState = typeof verticalViewportLockStates[number]; const component = ( - [horizontalViewportLockName, horizontalViewportLock]: HorizontalViewportLockState, - [verticalViewportLockName, verticalViewportLock]: VerticalViewportLockState, + [ + horizontalViewportLockName, + horizontalViewportLock + ]: HorizontalViewportLockState, + [verticalViewportLockName, verticalViewportLock]: VerticalViewportLockState ): ViewTemplate => html` -