open-consul/ui-v2/app/styles/base/components/tooltip/layout.scss
John Cowen 1b5658d5ac ui: Use base fonts throughout the app (#6881)
We've had a set of %placeholders in our base styles for quite a while
but not butten the bullet to use them. This begins to use them.

We had to make a small amount of tweaks to base whilst doing this, but
its as we'd prefer there to be as few font placeholders as possible. We
might/should be able to reduce these further at somepoint, or
potentially rename them. We currently have six header fonts (or 4 header
fonts/2 strong body fonts) and 3 body fonts.

We also noticed an empty CSS file and deleted that while we were here.
We also noticed that the bottom border of structure tabs was a pixel
larger than ours so we tweaked that here also.
2019-12-18 12:26:45 +00:00

53 lines
993 B
SCSS

%tooltip {
position: relative;
display: inline-flex;
justify-content: center;
align-items: center;
vertical-align: text-top;
}
%tooltip-bubble,
%tooltip-tail {
position: absolute;
z-index: 1;
}
%tooltip-bubble {
padding: 12px;
white-space: nowrap;
content: attr(data-tooltip);
text-indent: 0;
min-width: 192px;
}
%tooltip-bubble {
/* TODO: structure says left aligned, check this is correct */
text-align: center;
}
%tooltip-tail {
content: '';
transform: scale(1, 0.5);
width: 0;
height: 0;
}
/* TODO: positioning */
%tooltip-bubble {
bottom: calc(100% + 5px);
}
%tooltip-tail {
left: 50%;
margin-left: -9px;
bottom: -13px;
}
/* TODO: Try and use the same vertical positioning all tooltips */
/* this is only for pseudo tooltips be want to avoid */
/* specifying pseudo in this file */
%tooltip::after {
bottom: calc(100% - 7px);
}
%tooltip-bottom::before {
bottom: auto;
top: calc(100% + 7px);
}
%tooltip-bottom::after {
bottom: -12px;
}