mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 14:09:21 -05:00
style: Tooltip style
This commit is contained in:
parent
e4593a2bf3
commit
d0713434d7
2 changed files with 52 additions and 50 deletions
|
@ -1,3 +1,5 @@
|
|||
tabWidth = 4
|
||||
|
||||
[[overrides]]
|
||||
files = "*.md"
|
||||
options = { proseWrap = "never", printWidth = 120 }
|
||||
|
|
|
@ -1,130 +1,130 @@
|
|||
div.thaw-tooltip-content {
|
||||
position: relative;
|
||||
transform-origin: inherit;
|
||||
position: relative;
|
||||
transform-origin: inherit;
|
||||
|
||||
padding: 4px 11px 6px;
|
||||
border-radius: var(--borderRadiusMedium);
|
||||
border: 1px solid var(--colorTransparentStroke);
|
||||
line-height: var(--lineHeightBase200);
|
||||
font-size: var(--fontSizeBase200);
|
||||
font-family: var(--fontFamilyBase);
|
||||
max-width: 240px;
|
||||
overflow-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
filter: drop-shadow(0 0 2px var(--colorNeutralShadowAmbient))
|
||||
drop-shadow(0 4px 8px var(--colorNeutralShadowKey));
|
||||
padding: 4px 11px 6px;
|
||||
border-radius: var(--borderRadiusMedium);
|
||||
border: 1px solid var(--colorTransparentStroke);
|
||||
line-height: var(--lineHeightBase200);
|
||||
font-size: var(--fontSizeBase200);
|
||||
font-family: var(--fontFamilyBase);
|
||||
max-width: 240px;
|
||||
overflow-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
filter: drop-shadow(0 0 2px var(--colorNeutralShadowAmbient))
|
||||
drop-shadow(0 4px 8px var(--colorNeutralShadowKey));
|
||||
}
|
||||
|
||||
div.thaw-tooltip-content--normal {
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
background-color: var(--colorNeutralBackground1);
|
||||
color: var(--colorNeutralForeground1);
|
||||
}
|
||||
|
||||
div.thaw-tooltip-content--inverted {
|
||||
background-color: var(--colorNeutralBackgroundStatic);
|
||||
color: var(--colorNeutralForegroundStaticInverted);
|
||||
background-color: var(--colorNeutralBackgroundStatic);
|
||||
color: var(--colorNeutralForegroundStaticInverted);
|
||||
}
|
||||
|
||||
.thaw-tooltip-content__angle {
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.thaw-tooltip {
|
||||
display: inline-block;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
[data-thaw-placement="top-start"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="top-end"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="top"] > .thaw-tooltip-content {
|
||||
margin-bottom: 7px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="top-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="top-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="top"] .thaw-tooltip-content__angle {
|
||||
transform: rotate(45deg) translateX(-7px);
|
||||
bottom: -10px;
|
||||
left: 50%;
|
||||
transform: rotate(45deg) translateX(-7px);
|
||||
bottom: -10px;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
[data-thaw-placement="bottom-start"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="bottom-end"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="bottom"] > .thaw-tooltip-content {
|
||||
margin-top: 7px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="bottom-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="bottom-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="bottom"] .thaw-tooltip-content__angle {
|
||||
transform: rotate(45deg) translateY(7px);
|
||||
top: -10px;
|
||||
left: 50%;
|
||||
transform: rotate(45deg) translateY(7px);
|
||||
top: -10px;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
[data-thaw-placement="left-start"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="left-end"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="left"] > .thaw-tooltip-content {
|
||||
margin-right: 7px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="left-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="left-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="left"] .thaw-tooltip-content__angle {
|
||||
transform: rotate(45deg) translateX(-7px);
|
||||
top: 50%;
|
||||
right: -10px;
|
||||
transform: rotate(45deg) translateX(-7px);
|
||||
top: 50%;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="right-start"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="right-end"] > .thaw-tooltip-content,
|
||||
[data-thaw-placement="right"] > .thaw-tooltip-content {
|
||||
margin-left: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="right-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="right-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="right"] .thaw-tooltip-content__angle {
|
||||
transform: rotate(45deg) translateY(-7px);
|
||||
top: 50%;
|
||||
left: -10px;
|
||||
transform: rotate(45deg) translateY(-7px);
|
||||
top: 50%;
|
||||
left: -10px;
|
||||
}
|
||||
|
||||
[data-thaw-placement="bottom-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="top-start"] .thaw-tooltip-content__angle {
|
||||
left: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
[data-thaw-placement="bottom-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="top-end"] .thaw-tooltip-content__angle {
|
||||
left: initial;
|
||||
right: 7px;
|
||||
left: initial;
|
||||
right: 7px;
|
||||
}
|
||||
[data-thaw-placement="right-start"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="left-start"] .thaw-tooltip-content__angle {
|
||||
top: 16px;
|
||||
top: 16px;
|
||||
}
|
||||
[data-thaw-placement="right-end"] .thaw-tooltip-content__angle,
|
||||
[data-thaw-placement="left-end"] .thaw-tooltip-content__angle {
|
||||
top: initial;
|
||||
bottom: 7px;
|
||||
top: initial;
|
||||
bottom: 7px;
|
||||
}
|
||||
|
||||
.thaw-tooltip-content.tooltip-transition-enter-from,
|
||||
.thaw-tooltip-content.tooltip-transition-leave-to {
|
||||
opacity: 0;
|
||||
transform: scale(0.85);
|
||||
opacity: 0;
|
||||
transform: scale(0.85);
|
||||
}
|
||||
|
||||
.thaw-tooltip-content.tooltip-transition-enter-to,
|
||||
.thaw-tooltip-content.tooltip-transition-leave-from {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.thaw-tooltip-content.tooltip-transition-leave-active,
|
||||
.thaw-tooltip-content.tooltip-transition-enter-active {
|
||||
transition: opacity var(--durationNormal) var(--curveDecelerateMid),
|
||||
transform var(--durationNormal) var(--curveDecelerateMid);
|
||||
transition: opacity var(--durationNormal) var(--curveDecelerateMid),
|
||||
transform var(--durationNormal) var(--curveDecelerateMid);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue