@openapi-generator-plus/plain-documentation-generator
Version:
An OpenAPI Generator Plus template for generating plain documentation
430 lines (355 loc) • 6.64 kB
text/less
// Main
#auth, #endpoints {
margin-top: @base * 10;
}
#schemas {
margin-top: @base * 20;
}
#overview .summary {
position: relative;
top: -6px;
}
body.api-docs {
.content {
@media @vp-min-tablet-wide {
margin-left: percentage((((6 * @grid-column) + (6 * @grid-gutter)) / @grid-width));
}
a {
.link-simple;
.link-simple-hover;
}
}
.page-bg, .footer {
@media @vp-min-tablet and @vp-max-page-padding {
max-width: @page-width-padding;
padding-left: @page-gutter;
padding-right: @page-gutter;
margin: 0 auto;
}
}
.api-title {
font-family: @f-meta;
font-size: @fs;
line-height: @lh;
margin-bottom: @base * 2;
}
h4 {
& + .summary, & + span[id] + .summary {
margin-top: (@base * 5);
}
}
span.method {
color: @white;
font-family: @f-text;
font-size: 87.5%;
font-weight: normal;
line-height: 1;
display: inline-block;
padding: 3px 3px 3px 4px;
letter-spacing: 0.1em;
.border-radius(4px);
&.operation-get {
background-color: @get;
}
&.operation-post {
background-color: @post;
}
&.operation-delete {
background-color: @delete;
}
&.operation-put {
background-color: @patch;
}
&.operation-patch {
background-color: @patch;
}
}
.summary {
margin-bottom: @base * 8;
& + .summary, & + span[id], p + .summary {
display: block;
margin-top: @base * 6;
}
.summary {
margin-top: @base * 6;
h4 {
font-size: @fs-title4 * 0.75;
line-height: @lh-title4;
}
}
}
.params, .request, .response, .values, .security, .parent, .children, .interface, .implements {
margin-top: @base * 4;
}
.detail {
margin: @base * 2 0 @base * 5;
}
span.type {
color: @text-light;
display: inline-block;
font-family: @f-meta;
font-size: @fs-meta;
line-height: @lh-meta;
border: 1px solid @ui-border;
padding: 4px 6px;
.border-radius(3px);
+ span.type {
margin-left: 0.25em;
}
}
table {
width: 100%;
margin: @base 0;
tr {
td {
border-top: 1px solid @ui-divider;
}
}
tr.-inherited-property {
// background-color: @ui-bg;
}
td {
padding: (@base * 1.5) (@base * 2) (@base * 1.75) 0;
.summary {
margin-bottom: 0;
}
&:last-child {
padding-right: 0 ;
}
}
td.code, td.name {
font-size: @fs;
}
td.resp, td.desc {
p, .model-property-type a {
font-size: @fs - 2;
line-height: @lh;
}
code {
font-size: @fs - 2;
}
}
td.code {
font-family: @f-meta;
color: @text-light;
width: 25%;
}
td.name {
line-height: 1;
white-space: nowrap;
width: 25%;
}
td.resp {
width: 50%;
}
td.type {
font-family: @f-meta;
font-size: 16px;
line-height: 1.33;
color: @text-light;
// white-space: nowrap;
width: 25%;
.model-property-enum {
white-space: normal;
}
.model-property-type, .model-ref {
font-size: @fs - 2;
}
}
td.desc {
padding-right: 0;
width: 25%;
}
td .example-trigger {
font-size: @fs-meta;
}
}
.example {
margin-bottom: @base * 2;
}
span.p {
display: block;
margin: @base 0;
&:last-child {
margin-bottom: 0;
}
}
.response table {
td {
padding: @base (@base * 2) @base 0;
p {
line-height: 1.33;
}
}
}
#schemas {
table {
td.type, td.desc {
width: 37.5%;
}
}
}
.api-title, .name {
.type {
color: @text-light;
font-family: @f-text;
font-size: @fs - 4;
border: none;
background-color: @ui-bg;
padding: 4px 8px 6px;
}
}
.name .type {
text-transform: uppercase;
font-size: @fs - 6;
letter-spacing: 0.1em;
padding: 4px 5px;
}
.meta {
color: @text-light;
margin-top: @base;
}
div.code {
background-color: @grey-dark;
padding: @base * 5;
margin-top: @base * 3;
.border-radius(4px);
}
code, pre {
font-family: @f-meta;
color: @code;
background-color: @code-bg;
font-size: 15px;
line-height: 1;
}
pre {
font-size: @fs;
line-height: 1.5;
padding-bottom: 1em;
background-color: @ui-bg;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.operation-label, .parameter-label, .property-label {
display: inline-block;
padding: 4px 5px 3px;
letter-spacing: 0.2em;
line-height: 1;
color: white;
background-color: @grey-dark;
font-size: @fs - 6;
top: -1px;
position: relative;
margin-right: 0.25em;
.border-radius(2px);
&.-deprecated {
background-color: @deprecated;
}
}
.collection-format {
font-family: @f-text;
font-size: 75%;
margin-top: 0.5em;
}
// Bootprint Overrides
.hljs-value, .hljs-attribute { color: @white; }
.hljs-string { color: @patch; }
.hljs-literal { color: @post; }
.hljs-number { color: @get; }
#schemas .hljs-string {
color: @text-light;
}
.model-ref {
font-family: @f-meta;
font-size: @fs;
line-height: @lh;
&:hover, &:active {
color: @link-hover;
border-bottom: 1px solid @link-hover;
}
}
td .model-ref,
.api-title .model-ref {
font-size: 16px;
}
.model-property-enum {
font-family: @f-meta;
font-size: @fs - 2;
line-height: 1.75;
color: @code;
margin-top: @base;
}
.model-property-type {
.model-property-enum-item {
display: block;
margin-left: 1em;
}
}
span.type .model-ref {
color: @text-light;
border-bottom: none;
&:hover, &:active {
color: @text;
}
}
.model-property-type { font-style: normal; }
// .model-property-enum { font-size: 15px; }
.model-allOf-inherited::before,
.model-array-items::before,
.model-additionalProperties::before,
.model-description::before {
float: left;
display: inline-block;
text-transform: none;
padding-bottom: 0;
color: inherit;
font-weight: normal;
margin-right: 0.25em;
}
.model-array-items::before,
.model-description::before {
display: inline;
content: '';
}
.model-additionalProperties::before {
content: 'Additional properties are';
}
.model-description {
font-size: 16px;
}
.summary .model-description {
line-height: 1.5;
}
.model-example {
pre {
color: @text-light;
font-size: 14px;
padding: 0.25em 0.5em;
}
&::before {
content: 'Example';
color: @text-light;
font-family: @f-subtitle;
font-weight: normal;
font-size: 14px;
text-transform: capitalize;
display: inline-block;
line-height: 1;
margin: (@base * 2) 0 0;
}
}
.model-allOf-inherited {
a {
font-size: 16px;
}
&::before {
content: 'Inherits from';
font-size: 16px;
}
}
}