redoc/lib/components/JsonSchema/json-schema.scss
2016-03-14 15:29:27 -04:00

142 lines
2.5 KiB
SCSS

@import 'json-schema-common';
/* styles for array-schema for array */
$array-marker-font-sz: 13px;
$array-marker-line-height: 1.5;
:host {
display: block;
}
.param-schema > td {
border-left: $line-border;
padding: 0 10px;
}
json-schema.nested-schema {
background-color: $side-menu-active-bg-color;
padding: 10px 20px;
position: relative;
border-radius: $border-radius;
&:before, &:after {
content: "";
width: 0;
height: 0;
position: absolute;
top: 0;
border-style: solid;
border-color: transparent;
border-width: 10px 15px 0;
margin-left: -7.5px;
border-top-color: white;
}
&:before {
left: 10%;
}
&:after {
right: 10%;
}
.param:first-of-type > .param-name:before, .param:last-of-type > .param-name:after {
border-color: #f1f1f1;
}
}
.param.complex > .param-info {
border-bottom: 0;
}
.params-wrap {
border-collapse: collapse;
width: 100%;
}
.params-wrap.params-array:before, .params-wrap.params-array:after {
display: block;
font-weight: $base-font-weight;
color: $black;
font-size: $array-marker-font-sz;
line-height: $array-marker-line-height;
}
.params-wrap.params-array:after {
content: "]";
}
.params-wrap.params-array:before {
content: "Array [";
padding-top: 1em;
}
.params-wrap.params-array {
padding-left: $bullet-margin;
}
.param-schema.param-array:before {
bottom: ($array-marker-font-sz * $array-marker-line-height) / 2;
width: $bullet-margin;
border-left-style: dashed;
border-bottom: $lines-width dashed $tree-lines-color;
}
.params-wrap.params-array > .param-wrap:first-of-type > .param > .param-name:after {
content: "";
display: block;
position: absolute;
left: -$lines-width;
top: 0;
border-left: $line-border-erase;
height: ($param-name-height/2) + $cell-padding;
}
.params-wrap > .param > .param-schema.param-array {
border-left-color: transparent;
}
.param.discriminator {
> .param-info {
padding-bottom: 0;
border-bottom: 0;
}
> .param-name:after {
display: none;
}
}
.discriminator-info {
font-weight: bold;
}
.discriminator-wrap > td {
border-left: $line-border;
padding: 0;
}
:host tabs {
display: block;
}
:host ul {
text-align: center;
}
:host tabs li {
margin: 0.2em 0.5em 0.2em 0;
font-size: 14px;
border: 0;
color: white;
padding: 0 15px;
border-radius: 10px;
background-color: #8A9094;
&:last-of-type {
margin: 0;
}
&.active {
background-color: $headers-color;
}
}