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

This commit cleans up the styles in `_api-list.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:11 +02:00 committed by Alex Rickabaugh
parent d214e79485
commit bf63d92ea6
1 changed files with 85 additions and 89 deletions

View File

@ -1,23 +1,18 @@
/* API EDIT ICON */
#api {
.api-filter .material-icons {
right: 48px;
}
}
/* API LIST STYLES */ /* API LIST STYLES */
aio-api-list { aio-api-list {
div.form-search i.material-icons { .form-search {
width: 20px; .material-icons {
pointer-events: none; width: 20px;
} pointer-events: none;
}
.form-search input { input {
width: 182px; width: 182px;
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
width: 100%; width: 100%;
}
} }
} }
@ -43,6 +38,19 @@ aio-api-list {
margin: 16px auto; margin: 16px auto;
} }
/* API FILTER MENU */
aio-select {
width: 200px;
@media screen and (max-width: 600px) {
width: 100%;
}
.symbol {
margin-right: 8px;
}
}
.form-select-menu, .form-select-menu,
.form-search { .form-search {
margin: 8px; margin: 8px;
@ -52,8 +60,19 @@ aio-api-list {
} }
} }
aio-select:first-child .form-select-menu { aio-select:first-child {
margin-left: 0; .form-select-menu {
margin-left: 0;
}
}
.form-search {
float: left;
}
/* API SEARCH ICON */
.material-icons {
right: 48px;
} }
} }
@ -61,6 +80,55 @@ aio-api-list {
.docs-content { .docs-content {
position: relative; position: relative;
/* API CLASS LIST */
.api-list {
list-style: none;
margin: 0 0 32px -8px;
padding: 0;
overflow: hidden;
@media screen and (max-width: 600px) {
margin: 0 0 0 -8px;
}
li {
@include font-size(14);
margin: 8px 0;
@include line-height(14);
padding: 0;
float: left;
width: 33%;
overflow: hidden;
min-width: 220px;
text-overflow: ellipsis;
white-space: nowrap;
.symbol {
margin-right: 8px;
}
a {
color: $blue-grey-600;
display: inline-block;
@include line-height(16);
padding: 0 16px 0;
text-decoration: none;
transition: all .3s;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
background: $blue-grey-50;
color: $blue-500;
}
&.deprecated-api-item {
text-decoration: line-through;
}
}
}
}
} }
.l-content-small { .l-content-small {
@ -140,78 +208,6 @@ aio-api-list {
} }
} }
/* API HOMEE PAGE */
/* API FILTER MENU */
.api-filter {
aio-select {
width: 200px;
@media screen and (max-width: 600px) {
width: 100%;
}
.symbol {
margin-right: 8px;
}
}
.form-search {
float: left;
}
}
/* API CLASS LIST */
.docs-content .api-list {
list-style: none;
margin: 0 0 32px -8px;
padding: 0;
overflow: hidden;
@media screen and (max-width: 600px) {
margin: 0 0 0 -8px;
}
li {
@include font-size(14);
margin: 8px 0;
@include line-height(14);
padding: 0;
float: left;
width: 33%;
overflow: hidden;
min-width: 220px;
text-overflow: ellipsis;
white-space: nowrap;
.symbol {
margin-right: 8px;
}
a {
color: $blue-grey-600;
display: inline-block;
@include line-height(16);
padding: 0 16px 0;
text-decoration: none;
transition: all .3s;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
background: $blue-grey-50;
color: $blue-500;
}
&.deprecated-api-item {
text-decoration: line-through;
}
}
}
}
.code-anchor { .code-anchor {
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;