discourse/app/assets/stylesheets/common/float-kit/d-tooltip.scss
Kris 6169ac2683
UX: make the notification panel consistent with new search panel styles (#32753)
This eliminates menu panel container padding, which gets us a closer
match to the recent search panel adjustments. I've also eliminated the
menu-panel box-shadow variant — if we're not going to use it on the
search panel we should consolidate and eliminate the variance.




Before:

![image](https://github.com/user-attachments/assets/07122788-61a4-4767-a697-47cc3118d84e)


After:

![image](https://github.com/user-attachments/assets/a6f66c6f-37cd-4144-930d-d05546bba801)
2025-05-16 12:50:12 -04:00

103 lines
1.7 KiB
SCSS
Vendored

@keyframes d-tooltip-opening {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fk-d-tooltip {
&__trigger {
display: inline-flex;
cursor: pointer;
.touch & {
@include unselectable;
}
&-container {
display: flex;
}
}
&__inner-content {
display: flex;
overflow: hidden;
overflow-wrap: break-word;
padding: 0.5rem;
align-items: center;
}
&__content {
background-color: var(--secondary);
border-radius: var(--d-border-radius);
border: 1px solid var(--primary-low);
box-shadow: var(--shadow-dropdown);
z-index: z("max");
width: max-content;
position: absolute;
top: 0;
display: flex !important;
padding: 0;
&.-animated {
animation: d-tooltip-opening 0.15s ease-in;
&[data-placement^="bottom"] {
transform-origin: top center;
}
&[data-placement^="top"] {
transform-origin: bottom center;
}
&[data-placement^="right"] {
transform-origin: center left;
}
&[data-placement^="left"] {
transform-origin: center right;
}
}
.arrow {
z-index: z("max");
position: absolute;
}
&[data-placement^="top"] {
.arrow {
bottom: -10px;
rotate: 180deg;
}
}
&[data-placement^="top-start"] {
.arrow {
margin-left: 10px;
}
}
&[data-placement^="bottom"] {
.arrow {
top: -10px;
}
}
&[data-placement^="right"] {
.arrow {
rotate: -90deg;
left: -10px;
}
}
&[data-placement^="left"] {
.arrow {
rotate: 90deg;
right: -10px;
}
}
}
}