api-console-assets
Version:
This repo only exists to publish api console components to npm
265 lines (223 loc) • 7.15 kB
HTML
<!--
@license
Copyright 2016 The Advanced REST client authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-styles/typography.html">
<!--
### Styling
`<docs-parameters-table>` provides the following custom properties and mixins for styling:
Custom property | Description | Default
----------------|-------------|----------
`--docs-parameters-table` | Mixin applied to all parameter table elements | `{}`
`--docs-parameters-url-table` | Mixin applied to this elements | `{}`
`--params-table-header-background-color` | Background color of table header | `#00A1DF`
`--params-table-header-color` | Font color of table header | `rgba(255, 255, 255, 0.87)`
`--params-table-subheader-background-color` | Background color of table subheader | `rgba(0, 161, 223, 0.24)`
`--params-table-subheader-color` | Font color of table subheader | `rgba(0, 0, 0, 0.87)`
`--params-table-row-border-color` | Border color of table's each row | `#00A1DF`
`--params-table-row-background-color` | Background color of table's each row | `#fff`
`--params-table-row-color` | Font color of table's each row | `#fff`
`--docs-parameters-table-cell` | Mixin applied to each cell | `{}`
`--docs-parameters-table-meta` | Mixin applied to property's metadata (example, pattern, etc) | `{}`
`--params-table-meta-color` | Color of the meta data property | `rgba(0, 0, 0, 0.64)`
`--params-table-meta-value-font-weight` | Metadata property value font weight | `500`
`--params-table-meta-required-color` | Color of the "required" and "enum" property label | `rgba(0, 0, 0, 0.64)`
-->
<dom-module id="docs-parameters-table-shared-styles">
<template>
<style>
:host {
display: block;
}
:host([hidden]) {
display: none;
}
.params-table {
display: table;
border-collapse: collapse;
text-align: left;
width: 100%;
margin-bottom: 40px;
@apply(--paper-font-body1);
font-size: 15px;
@apply(--docs-parameters-table);
@apply(--docs-parameters-url-table);
}
.tr {
display: table-row;
@apply --docs-parameters-table-tr;
}
.td {
display: table-cell;
@apply --docs-parameters-table-td;
}
.tbody {
display: table-row-group;
@apply --docs-parameters-table-tbody;
}
.thead {
display: table-header-group;
@apply --docs-parameters-table-thead;
}
.thead .tr > span {
display: table-cell;
@apply --docs-parameters-table-thead-tr-span;
}
.thead .tr,
.narrow-title {
vertical-align: middle;
background-color: var(--params-table-header-background-color, #00A1DF);
color: var(--params-table-header-color, rgba(255, 255, 255, 0.87));
@apply(--docs-parameters-table-header);
}
.params-table-header .tr {
height: 36px;
}
.narrow-title {
display: none;
}
.tr.params-table-header.subheader {
background-color: var(--params-table-subheader-background-color, rgba(0, 161, 223, 0.24));
color: var(--params-table-subheader-color, rgba(0, 0, 0, 0.87));
@apply(--docs-parameters-table-subheader);
}
.tr {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: var(--params-table-row-border-color, rgba(0, 161, 223, 1));
background-color: var(--params-table-row-background-color, #fff);
color: var(--params-table-row-color, rgba(0, 0, 0, 0.87));
}
.tr[subproperty] {
border-bottom-color: var(--params-table-row-subproperty-border-color, rgba(0, 161, 223, 0.24));
}
.tr[subproperty]:last-of-type {
border-bottom-color: var(--params-table-row-border-color, rgba(0, 161, 223, 1));
}
.tr[has-children] {
border-bottom-color: var(--params-table-row-subproperty-border-color, rgba(0, 161, 223, 0.24));
}
.tr:last-of-type {
border-bottom-color: transparent;
}
.td,
.th,
.params-table .th,
.params-table .td {
padding: 8px 12px;
@apply(--docs-parameters-table-cell);
}
.params-table .td {
vertical-align: top;
}
.meta-property.pattern,
.meta-property.example,
.meta-property.enum,
.meta-property.min,
.meta-property.max,
.meta-property.default,
.meta-property.annotations,
.meta-property.type {
color: var(--params-table-meta-color, rgba(0, 0, 0, 0.64));
margin: 0px 0 12px 20px;
@apply(--docs-parameters-table-meta);
}
.meta-property.pattern span,
.meta-property.example span,
.meta-property.enum span,
.meta-property.min span,
.meta-property.max span,
.meta-property.default span,
.meta-property.annotations span,
.meta-property.type span {
font-weight: var(--params-table-meta-value-font-weight, 500);
margin-left: 8px;
white-space: pre-wrap;
word-break: break-all;
}
.display ~ .value {
margin-left: 8px;
}
.td.param-name > .name {
white-space: nowrap;
}
.td.param-name,
.td.param-type {
font-weight: 500;
}
.param-desc {
@apply --docs-parameters-table-td-param-desc;
}
.subheader {
@apply --docs-parameters-table-subheader;
}
.subheader-empty-cell {
@apply --docs-parameters-table-subheader-empty-cell;
}
.markdown-html p:first-child {
margin-top: 0;
padding-top: 0;
}
.markdown-html p:last-child {
margin-bottom: 0;
padding-bottom: 0;
}
:host([narrow]) .params-table {
display: block;
}
:host([narrow]) .params-table-header {
display: none;
}
:host([narrow]) .tbody,
:host([narrow]) .tr {
display: block;
width: 100%;
}
:host([narrow]) .td.param-name,
:host([narrow]) .td.param-type {
display: inline-block;
}
:host([narrow]) .td.param-desc {
display: block;
}
:host([narrow]) .narrow-title {
display: block;
padding: 12px;
margin: 0;
font-size: 16px;
}
:host([narrow]) .required-label,
:host([narrow]) .enum-label {
display: inline-block;
}
.property-display-name {
margin: 0 0 8px 0;
padding: 0;
font-weight: 500;
}
.required-label,
.enum-label {
display: block;
font-weight: 400;
color: var(--params-table-meta-required-color, rgba(0, 0, 0, 0.64));
@apply --params-table-label-required;
}
marked-element {
margin-bottom: 20px;
}
[hidden] {
display: none ;
}
</style>
</template>
</dom-module>