angular-docs-cn/public/resources/css/module/_api.scss

257 lines
4.3 KiB
SCSS

@mixin icon {
line-height: 14px;
&.decorator:before {
content: '@';
background: $blueberry;
}
&.directive:before {
content: 'D';
background: #db4437;
}
&.class:before {
content: 'C';
background: #4285f4;
}
&.interface:before {
content: 'I';
background: #0097a7;
}
&.function:before {
content: 'F';
background: #0f9d58;
}
&.const:before,
&.enum:before {
content: 'N';
background: #757575;
}
&.var:before,
&.let:before {
content: 'V';
background: #9575cd;
}
&:before {
display: inline-block;
border-radius: 50%;
width: 14px;
height: 14px;
text-align: center;
color: white;
font-family: Roboto, sans-serif;
font-size: 10px;
margin-right: $unit;
float: left;
}
}
.api-key {
dt, dd {
display: inline-block;
font-size: 14px;
font-family: Roboto, sans-serif;
padding: $unit;
}
dt {
padding-left: 0;
}
dd {
@include icon;
margin: 0 0 0 ($unit);
cursor: pointer;
&.active {
background: #d5d9dc;
border-radius: 3px;
}
}
}
input.api-filter {
display: block;
max-width: ($unit * 100);
width: 100%;
line-height: 18px;
padding: $unit;
position: relative;
left: ($unit * -1);
}
.docs-content {
.anchor-offset {
display: block;
position: relative;
top: -250px;
visibility: hidden;
}
.anchor-focused {
background-color: transparent !important;
-moz-animation: fade 1s linear; /* Firefox */
-webkit-animation: fade 1s linear; /* Safari and Chrome */
-o-animation: fade 1s linear; /* Opera */
animation: fade 1s linear;
}
@keyframes fade {
0% { background-color: $sunshine }
}
.h2-api-docs {
font-size: 15px !important;
line-height: 20px;
text-transform: uppercase !important;
color: #78909C !important;
}
.api-list {
list-style: none;
padding: 0 0 ($unit * 4);
overflow: hidden;
.api-item {
font-size: 14px;
font-family: Roboto, sans-serif;
margin: 0;
line-height: 14px;
padding: $unit $unit $unit 0;
float: left;
width: 33%;
min-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
a {
text-decoration: none;
color: black;
}
.symbol {
@include icon;
}
}
}
.code-links {
a {
code, .api-doc-code {
color: #1E88E5 !important;
}
}
}
.openParens {
margin-top: 15px;
}
.endParens {
margin-bottom: 20px !important;
}
p {
&.selector {
margin: 0;
}
&.location-badge {
margin: 0 0 16px 16px !important;
}
.api-doc-code {
border-bottom: 0px;
:hover {
border-bottom: none;
}
}
}
.row-margin {
margin-bottom: 36px;
h2 {
line-height: 28px;
}
}
.code-margin {
margin-bottom: $unit;
}
.hr-margin {
display: block;
height: 1px;
border: 0;
border-top: 1px solid $lightgrey;
margin-top: 15px;
margin-bottom: 20px;
padding: 0;
}
.no-bg {
background: none;
padding: 0;
}
.no-bg-with-indent {
padding-top: 0;
padding-bottom: 0;
padding-left: 16px;
margin-top: 6px;
margin-bottom: 0;
background: none;
}
.code-background {
padding: 0 5px 0;
span.pln {
color: #1E88E5 !important;
}
}
.code-anchor {
cursor: pointer;
text-decoration: none;
// Override highlight.js
.kwd {
color: #1E88E5 !important;
}
&:hover {
text-decoration: underline;
}
}
.api-doc-code {
font-size: 14px;
color: #1a2326;
// the last .pln (white space) creates additional spacing between sections of the api doc. Remove it.
&.no-pln {
.pln:last-child {
display: none;
}
}
}
}
@media screen and (max-width: 600px) {
.docs-content {
// Overrides display flex from angular material.
// This was added because Safari doesn't play nice with layout="column".
// Look of API doc in Chrome and Firefox remains the same, and is fixed for Safari.
.layout-xs-column {
display: block !important;
}
}
.api-doc-code {
font-size: 12px;
}
p.location-badge {
position: relative;
font-size: 11px;
}
}