refactor(docs-infra): scope API list styles to the `<aio-api-list>` element (#40704)

This commit ensures that all styles for the API list page (which are
defined in `_api-list.scss`) only apply to elements inside an
`<aio-api-list>` element. This will prevent the styles accidentally
taking effect on a different part of the app.

PR Close #40704
This commit is contained in:
George Kalpakas 2021-02-05 12:49:13 +02:00 committed by Alex Rickabaugh
parent ae1a00760d
commit defcd50b05
1 changed files with 136 additions and 149 deletions

View File

@ -1,34 +1,6 @@
/* API LIST STYLES */ /* API LIST STYLES */
aio-api-list { aio-api-list {
.form-search {
.material-icons {
width: 20px;
pointer-events: none;
}
input {
width: 182px;
@media screen and (max-width: 600px) {
width: 100%;
}
}
}
.api-list-container {
display: flex;
flex-direction: column;
margin: 0 auto;
padding-left: 0;
h2 {
margin-top: 16px;
margin-bottom: 16px;
}
}
}
.api-filter { .api-filter {
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
@ -63,7 +35,47 @@ aio-api-list {
} }
.form-search { .form-search {
position: relative;
float: left; float: left;
input {
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);
box-sizing: border-box;
border: 1px solid $white;
border-radius: 4px;
color: $darkgray;
@include font-size(14);
@include line-height(32);
outline: none;
padding: 4px 16px 4px 32px;
transition: all .2s;
width: 182px;
@include placeholder {
@include font-size(14);
color: $mediumgray;
}
&:focus {
border: 1px solid $blue-400;
box-shadow: 0 2px 2px rgba($blue-400, 0.24), 0 0 2px rgba($blue-400, 0.12);
}
@media screen and (max-width: 600px) {
width: 100%;
}
}
.material-icons {
color: $blue-grey-600;
@include font-size(20);
left: 8px;
pointer-events: none;
position: absolute;
top: 12px;
width: 20px;
z-index: $layer-1;
}
} }
/* API SEARCH ICON */ /* API SEARCH ICON */
@ -134,40 +146,15 @@ aio-api-list {
} }
} }
/* SEARCH BAR */ .api-list-container {
display: flex;
flex-direction: column;
margin: 0 auto;
padding-left: 0;
.form-search { h2 {
position: relative; margin-top: 16px;
margin-bottom: 16px;
input {
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);
box-sizing: border-box;
border: 1px solid $white;
border-radius: 4px;
color: $darkgray;
@include font-size(14);
@include line-height(32);
outline: none;
padding: 4px 16px 4px 32px;
transition: all .2s;
@include placeholder {
@include font-size(14);
color: $mediumgray;
}
&:focus {
border: 1px solid $blue-400;
box-shadow: 0 2px 2px rgba($blue-400, 0.24), 0 0 2px rgba($blue-400, 0.12);
} }
} }
.material-icons {
color: $blue-grey-600;
@include font-size(20);
left: 8px;
position: absolute;
top: 12px;
z-index: $layer-1;
}
} }