2021-07-10 00:45:44 +00:00
|
|
|
import { css } from 'lit';
|
2023-06-22 14:56:24 +00:00
|
|
|
import componentStyles from '../../styles/component.styles.js';
|
2021-07-10 00:45:44 +00:00
|
|
|
|
|
|
|
export default css`
|
|
|
|
${componentStyles}
|
|
|
|
|
|
|
|
:host {
|
|
|
|
--max-width: 20rem;
|
|
|
|
--hide-delay: 0ms;
|
|
|
|
--show-delay: 150ms;
|
|
|
|
|
|
|
|
display: contents;
|
|
|
|
}
|
|
|
|
|
2022-08-08 19:41:19 +00:00
|
|
|
.tooltip {
|
|
|
|
--arrow-size: var(--sl-tooltip-arrow-size);
|
|
|
|
--arrow-color: var(--sl-tooltip-background-color);
|
2021-12-30 17:14:39 +00:00
|
|
|
}
|
|
|
|
|
2022-08-15 16:16:21 +00:00
|
|
|
.tooltip::part(popup) {
|
2023-12-01 15:02:46 +00:00
|
|
|
user-select: none;
|
2022-08-15 16:16:21 +00:00
|
|
|
z-index: var(--sl-z-index-tooltip);
|
|
|
|
}
|
|
|
|
|
2022-08-09 19:27:08 +00:00
|
|
|
.tooltip[placement^='top']::part(popup) {
|
|
|
|
transform-origin: bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip[placement^='bottom']::part(popup) {
|
|
|
|
transform-origin: top;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip[placement^='left']::part(popup) {
|
|
|
|
transform-origin: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip[placement^='right']::part(popup) {
|
|
|
|
transform-origin: left;
|
|
|
|
}
|
|
|
|
|
2022-08-08 19:41:19 +00:00
|
|
|
.tooltip__body {
|
2022-12-02 22:03:59 +00:00
|
|
|
display: block;
|
2022-08-25 21:22:18 +00:00
|
|
|
width: max-content;
|
2022-08-08 19:41:19 +00:00
|
|
|
max-width: var(--max-width);
|
|
|
|
border-radius: var(--sl-tooltip-border-radius);
|
|
|
|
background-color: var(--sl-tooltip-background-color);
|
|
|
|
font-family: var(--sl-tooltip-font-family);
|
|
|
|
font-size: var(--sl-tooltip-font-size);
|
|
|
|
font-weight: var(--sl-tooltip-font-weight);
|
|
|
|
line-height: var(--sl-tooltip-line-height);
|
|
|
|
color: var(--sl-tooltip-color);
|
|
|
|
padding: var(--sl-tooltip-padding);
|
2021-07-10 00:45:44 +00:00
|
|
|
pointer-events: none;
|
2023-08-11 14:27:34 +00:00
|
|
|
user-select: none;
|
2023-10-16 16:55:20 +00:00
|
|
|
-webkit-user-select: none;
|
2021-07-10 00:45:44 +00:00
|
|
|
}
|
|
|
|
`;
|