docs: fixed mobile usability of tooltips (#3124)
This commit is contained in:
@@ -98,6 +98,10 @@ html[data-theme="dark"] .docusaurus-highlight-code-line {
|
||||
border-radius: var(--ifm-code-border-radius);
|
||||
}
|
||||
|
||||
.code-action-copy {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.code-action {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
|
||||
@@ -1,45 +1,19 @@
|
||||
.tooltip-container {
|
||||
position: relative;
|
||||
.react-tooltip {
|
||||
border: 1px solid var(--ifm-tooltip-border-color) !important;
|
||||
border-radius: 8px !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: 500 !important;
|
||||
line-height: 20px !important;
|
||||
box-shadow: 0px 2px 16px var(--ifm-tooltip-box-shadow-color) !important;
|
||||
padding: 8px 16px !important;
|
||||
}
|
||||
|
||||
.tooltip-box {
|
||||
position: absolute;
|
||||
top: calc(-100% - 17px);
|
||||
z-index: 100000;
|
||||
padding: 8px 16px;
|
||||
max-width: 170px;
|
||||
width: max-content;
|
||||
text-align: center;
|
||||
|
||||
background-color: var(--ifm-tooltip-background-color);
|
||||
border: 1px solid var(--ifm-tooltip-border-color);
|
||||
border-radius: 8px;
|
||||
color: var(--ifm-color-content);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 20px;
|
||||
box-shadow: 0px 2px 16px var(--ifm-tooltip-box-shadow-color);
|
||||
|
||||
opacity: 0;
|
||||
transition: all .1s;
|
||||
}
|
||||
|
||||
.tooltip-box:not(.visible) {
|
||||
.react-tooltip-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tooltip-box.visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.inline-tooltip {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tooltip-container:not(.inline-tooltip) .tooltip-box {
|
||||
left: calc(-50% - 30px);
|
||||
}
|
||||
|
||||
.inline-tooltip .tooltip-box {
|
||||
left: 0;
|
||||
@media screen and (max-width: 875px) {
|
||||
.react-tooltip {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,9 @@
|
||||
--ifm-tooltip-background-color: #fff;
|
||||
--ifm-tooltip-border-color: #E5E7EB;
|
||||
--ifm-tooltip-box-shadow-color: rgba(17, 24, 39, 0.08);
|
||||
--rt-opacity: 1 !important;
|
||||
--rt-color-dark: var(--ifm-tooltip-background-color) !important;
|
||||
--rt-color-white: var(--ifm-color-content) !important;
|
||||
|
||||
/* Buttons */
|
||||
--ifm-primary-btn-background-color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user