1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/ui-components/tooltip/src/tooltip.scss
Gabriel 01059d8cb1 chore: extract tooltip into package
- chore: add sanity check unit test
- chore: added tailwind.config.js to fix build
- chore: .swcrc added for tests to pass
- chore(deps): sass is not a dependency
- fix: manually import the tooltip css to fix tooltips not showing up
- chore: Run lint:fix against code
- chore: Fix use of mock in @k8slens/core

Signed-off-by: Gabriel <gaccettola@mirantis.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-04-19 09:21:04 -04:00

93 lines
1.6 KiB
SCSS

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
.Tooltip {
position: fixed;
margin: 0 !important;
background: var(--mainBackground);
font-size: small;
font-weight: normal;
border-radius: 3px;
color: var(--textColorAccent);
white-space: normal;
padding: .5em;
text-align: center;
pointer-events: none;
transition: opacity 150ms 150ms ease-in-out;
z-index: 100000;
box-shadow: 0 8px 16px rgba(0,0,0,0.24);
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
&.visible {
opacity: 1;
visibility: visible;
}
&:empty {
display: none;
}
&.formatter {
&.nowrap {
&, * {
white-space: nowrap;
}
}
&.narrow {
max-width: 300px;
text-overflow: ellipsis;
word-wrap: break-word;
text-align: left;
}
&.small {
font-size: 12px;
}
&.warning {
color: var(--colorError);
}
&.tableView {
display: grid;
gap: var(--padding);
grid-template-columns: max-content 1fr;
grid-template-rows: repeat(2, 1fr);
> .flex {
display: contents;
}
> * {
white-space: pre-wrap;
word-break: break-word;
}
.title {
grid-column: 1 / 3;
color: var(--textColorAccent);
text-align: center;
font-weight: bold;
}
.name {
text-align: right;
color: var(--textColorAccent);
}
.value {
text-align: left;
color: var(--textColorSecondary);
}
}
}
}