refactor(docs-infra): merge style rules in `_label.scss` (#40704)

This commit cleans up the styles in `_label.scss` by merging together
blocks that target the same elements.

PR Close #40704
This commit is contained in:
George Kalpakas 2021-02-05 12:49:04 +02:00 committed by Alex Rickabaugh
parent 8a723daf6a
commit c3a81916c9
1 changed files with 21 additions and 33 deletions

View File

@ -1,8 +1,8 @@
.api-header label { .api-header label {
border-radius: 4px; border-radius: 4px;
padding: 4px 16px; padding: 2px 10px;
display: inline; display: inline;
@include font-size(14); @include font-size(12);
color: $white; color: $white;
margin-right: 8px; margin-right: 8px;
font-weight: 500; font-weight: 500;
@ -10,7 +10,25 @@
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
display: block; display: block;
margin: 8px 0; margin: 4px 0;
}
&.api-status-label {
background-color: $mediumgray;
&.deprecated, &.security, &.impure-pipe {
background-color: $brightred;
}
}
&.api-type-label {
background-color: $accentblue;
@each $name, $symbol in $api-symbols {
&.#{$name} {
background: map-get($symbol, background);
}
}
} }
&.page-label { &.page-label {
@ -35,33 +53,3 @@
text-transform: none; text-transform: none;
} }
} }
.api-header label {
// The API badges should be a little smaller
padding: 2px 10px;
@include font-size(12);
@media screen and (max-width: 600px) {
margin: 4px 0;
}
&.api-status-label {
background-color: $mediumgray;
&.deprecated, &.security, &.impure-pipe {
background-color: $brightred;
}
}
&.api-type-label {
background-color: $accentblue;
@each $name, $symbol in $api-symbols {
&.#{$name} {
background: map-get($symbol, background);
}
}
}
}