John Cowen b8166de30d
ui: Replaces almost all remaining instances of SASS variables with CSS (#11200)
From an engineers perspective, whenever specifying colors from now on we should use the form:

```
color: rgb(var(--tone-red-500));
```

Please note:

- Use rgb. This lets us do this like rgb(var(--tone-red-500) / 10%) so we can use a 10% opacity red-500 if we ever need to whilst still making use of our color tokens.
- Use --tone-colorName-000 (so the prefix tone). Previously we could use a mix of --gray-500: $gray-500 (note the left hand CSS prop and right hand SASS var) for the things we need to theme currently. As we no longer use SASS we can't do --gray-500: --gray-500, so we now do --tone-gray-500: --gray-500.

Just for clarity after that, whenever specifying a color anywhere, use rgb and --tone. There is only one reason where you might not use tone, and that is if you never want a color to be affected by a theme (for example a background shadow probably always should use --black)

There are a 2 or 3 left for the code editor, plus our custom-query values
2021-10-07 19:21:11 +01:00

103 lines
2.0 KiB
SCSS

#metrics-container .sparkline-wrapper {
svg path {
stroke-width: 0;
}
.tooltip {
padding: 0 0 10px;
font-size: 0.875em;
line-height: 1.5em;
font-weight: normal;
border: 1px solid rgb(var(--tone-gray-300));
background: #fff;
border-radius: 2px;
box-sizing: border-box;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.1);
.sparkline-time {
padding: 8px 10px;
font-weight: bold;
font-size: 14px;
color: #000;
border-bottom: 1px solid rgb(var(--tone-gray-200));
margin-bottom: 4px;
text-align: center;
}
.sparkline-tt-legend,
.sparkline-tt-sum {
border: 0;
padding: 3px 10px 0 10px;
}
.sparkline-tt-sum {
border-top: 1px solid rgb(var(--tone-gray-200));
margin-top: 4px;
padding: 8px 10px 0 10px;
}
.sparkline-tt-legend-color {
width: 12px;
height: 12px;
border-radius: 2px;
margin: 0 5px 0 0;
padding: 0;
}
.sparkline-tt-legend-value,
.sparkline-tt-sum-value {
float: right;
}
}
div.tooltip:before {
content: '';
display: block;
position: absolute;
width: 12px;
height: 12px;
left: 15px;
bottom: -7px;
border: 1px solid rgb(var(--tone-gray-300));
border-top: 0;
border-left: 0;
background: #fff;
transform: rotate(45deg);
}
}
// Key modal
.sparkline-key {
h3::before {
@extend %with-info-circle-fill-mask, %as-pseudo;
margin: 2px 3px 0 0;
font-size: 14px;
}
h3 {
color: rgb(var(--tone-gray-900));
font-size: 16px;
}
.sparkline-key-content {
dt {
font-weight: 600;
}
dd {
color: rgb(var(--tone-gray-500));
}
}
}
.sparkline-key-link {
color: rgb(var(--tone-gray-500));
}
.sparkline-key-link:hover {
color: rgb(var(--tone-blue-500));
}
#metrics-container:hover .sparkline-key-link::before {
@extend %with-info-circle-fill-mask, %as-pseudo;
margin: 1px 3px 0 0;
font-size: 12px;
}