John Cowen 06b6aff8d0 ui: CSS Components Migration (#5913)
Migrate roughly half of the base components into base
Adds a target for easily formatting CSS

Further CSS amends/migration (#5921)

1. tooltips within tables where a slightly bit troublesome due to a mix
of `inline-flex`, `overflow` and the need for truncation. This refineds
tooltips a slight bit more to work 'everywhere'.
2. We also move tooltip to use the correct color and min-width from
structure, but we overwrite the min-width here until we get confirmation
on widths/alignment of text within a tooltip.
3. Tiny fixes for breadcrumbs and toggle-buttons in tabular listings
4. Now we inline-flex our table cells, it means it is impossible to
truncate text without wrapping it in another element. This wraps all
Description like text in `<p>` tags. Generally the first column of text
is already wrapped in an `<a>` tag. Other items such as consul tags and
policy names etc get 'cutoff' rather than truncated.
5. We are now using all the icons from `@hashicorp/structure-icons`
2019-09-04 08:35:01 +00:00

49 lines
964 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;
/* TODO: should this be hardcoded here ? */
font-size: 14px;
/* structure */
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 */
/* specifiying pseudo in this file */
%tooltip::after {
bottom: calc(100% - 7px);
}