cf63afaddb
We've always had this idea of being able to markup up information semantically without thinking about what it should look like, then applying our %h* placeholder styles to control what the information should look like. Back when we originally made our set of %h* placeholders, we tried to follow Structure as much as possible, which defined the largest header (which we thought would have been the h1 style) as a super large 3.5rem. Therefore we made our set of %h* placeholders the same as Structure beginning at a huge 3.5 size. We then re-overwrote those sizes only in Consul specific CSS files thinking that this was due to us existing before Structure did. Lately we saw an extra clue in Structure - the extra large 3.5 header was called 'h0'. This commit moves all our headers to use a zero based scale, and additionally uses our 3 digit scale as opposed to 1 digit (h1 vs h100), similar to our color scales (note we don't use a hypen, which we can alter later if need be), which means we can insert additional h150 etc if need be. Additional we stop styling our headers globally (h1 { @extend %h100; } ). This means there is no reason not to use headers for marking up content depending on what it is rather than what it should look like, and as a consequence means we can be more purposeful in ordering h* tags. Lastly, we use the new scale over the entire codebase and update a couple of places where we were using using header tags due to what the styleing for them looked like rather than what the meaning/order was.
112 lines
2.3 KiB
SCSS
112 lines
2.3 KiB
SCSS
/* CSS active states are partly added at the top of */
|
|
/* components/templates/discovery-chain.hbs for reasons */
|
|
/* the styling there almost 100% uses our CSS vars */
|
|
/* defined in our CSS files, but be sure to */
|
|
/* take a look in the discovery-chain.hbs */
|
|
%route-card > header ul li {
|
|
@extend %pill-500, %frame-gray-900;
|
|
}
|
|
%discovery-chain-tween {
|
|
transition-duration: 0.1s;
|
|
transition-timing-function: linear;
|
|
}
|
|
%discovery-chain-edge,
|
|
%chain-node {
|
|
cursor: pointer;
|
|
}
|
|
%discovery-chain-edge {
|
|
@extend %discovery-chain-tween;
|
|
transition-property: stroke;
|
|
|
|
fill: none;
|
|
stroke: $gray-400;
|
|
stroke-width: 2;
|
|
vector-effect: non-scaling-stroke;
|
|
}
|
|
%discovery-chain.active [id*=':'],
|
|
%chain-node-inactive,
|
|
%discovery-chain-edge-inactive {
|
|
opacity: 0.5;
|
|
}
|
|
%chain-node,
|
|
%chain-node a {
|
|
color: $gray-900 !important;
|
|
}
|
|
%discovery-chain-edge-active {
|
|
stroke: $gray-900;
|
|
}
|
|
%chain-group {
|
|
border-radius: $decor-radius-100;
|
|
border: 1px solid $gray-200;
|
|
background-color: $gray-100;
|
|
|
|
pointer-events: none;
|
|
}
|
|
|
|
%chain-group > header span,
|
|
%chain-node {
|
|
pointer-events: all;
|
|
}
|
|
%chain-group > header > * {
|
|
text-transform: uppercase;
|
|
@extend %p3;
|
|
}
|
|
%chain-group > header span::after {
|
|
@extend %with-info-circle-outline-icon, %as-pseudo;
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
opacity: 0.6;
|
|
}
|
|
%chain-node {
|
|
@extend %discovery-chain-tween;
|
|
transition-property: opacity background-color border-color;
|
|
}
|
|
%chain-node-active {
|
|
opacity: 1;
|
|
background-color: $white;
|
|
border-color: $gray-500;
|
|
}
|
|
/* TODO: More text truncation, centralize */
|
|
%route-card header:not(.short) dd {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
/* Icons */
|
|
%route-card section header > * {
|
|
visibility: hidden;
|
|
}
|
|
%resolver-card dt,
|
|
%route-card section header > *::before {
|
|
@extend %with-glyph-icon;
|
|
}
|
|
%route-card .match-headers header *::before {
|
|
content: 'H';
|
|
}
|
|
%route-card .match-queryparams header > *::before {
|
|
content: 'Q';
|
|
}
|
|
%resolver-card dt {
|
|
font-size: 0;
|
|
background-size: 80% 80%;
|
|
}
|
|
%resolver-card dl.failover dt {
|
|
@extend %with-cloud-cross-icon;
|
|
}
|
|
%resolver-card dl.redirect dt {
|
|
@extend %with-redirect-icon;
|
|
}
|
|
/**/
|
|
%with-chain-outlet::before {
|
|
@extend %as-pseudo;
|
|
background-color: $white;
|
|
|
|
border-radius: $decor-radius-full;
|
|
border: 2px solid $gray-400;
|
|
}
|
|
%discovery-chain circle {
|
|
stroke-width: 2;
|
|
stroke: $gray-400;
|
|
fill: $white;
|
|
}
|