docs: дизайн таблиц, ответы Соннета, CSS, правила без ВМ
This commit is contained in:
@@ -18,19 +18,27 @@
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
/* Full-width resource pages without right TOC */
|
||||
/* Resource pages: no sidebars, normal scrolling */
|
||||
.md-sidebar--primary {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary {
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.md-grid {
|
||||
max-width: 61rem;
|
||||
}
|
||||
|
||||
.md-content,
|
||||
.md-content__inner,
|
||||
.md-main__inner {
|
||||
max-width: 100%;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.md-content__inner {
|
||||
margin-right: 0;
|
||||
/* Active tab highlight in resource nav */
|
||||
.md-content a:has(strong) {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
/* Keep horizontal scrollbars visible for wide tables */
|
||||
@@ -40,9 +48,10 @@
|
||||
}
|
||||
|
||||
/* Column sizing for resource tables */
|
||||
/* Widths based on real YAML data analysis, see docs/help/table-column-widths-analysis.md */
|
||||
.resource-table {
|
||||
width: 100%;
|
||||
table-layout: auto;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.5;
|
||||
@@ -50,7 +59,7 @@
|
||||
|
||||
.resource-table th,
|
||||
.resource-table td {
|
||||
padding: 0.3rem 0.5rem;
|
||||
padding: 0.3rem 0.4rem;
|
||||
vertical-align: top;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
||||
font-size: 0.82rem;
|
||||
@@ -60,54 +69,124 @@
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* ID column: useless to user, barely visible */
|
||||
.resource-table th:nth-child(1),
|
||||
.resource-table td:nth-child(1) {
|
||||
width: 6%;
|
||||
white-space: nowrap;
|
||||
width: 2%;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
font-size: 0.58rem;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(2),
|
||||
.resource-table td:nth-child(2) {
|
||||
width: auto;
|
||||
max-width: 40ch;
|
||||
/* ---- MAIN TABLE: Code(18%) Type(5%) Default(auto) Descr(45%) Constr(30%) ---- */
|
||||
|
||||
.resource-table:not(.resource-table-nested) th:nth-child(2),
|
||||
.resource-table:not(.resource-table-nested) td:nth-child(2) {
|
||||
width: 18%;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.resource-table td:nth-child(2) code {
|
||||
.resource-table:not(.resource-table-nested) td:nth-child(2) code {
|
||||
font-weight: 700;
|
||||
font-size: inherit;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(3),
|
||||
.resource-table td:nth-child(3),
|
||||
.resource-table th:nth-child(4),
|
||||
.resource-table td:nth-child(4),
|
||||
.resource-table th:nth-child(5),
|
||||
.resource-table td:nth-child(5) {
|
||||
.resource-table:not(.resource-table-nested) th:nth-child(3),
|
||||
.resource-table:not(.resource-table-nested) td:nth-child(3) {
|
||||
width: 5%;
|
||||
white-space: nowrap;
|
||||
width: 6%;
|
||||
font-size: 0.63rem;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(4),
|
||||
.resource-table td:nth-child(4) {
|
||||
.resource-table:not(.resource-table-nested) th:nth-last-child(2),
|
||||
.resource-table:not(.resource-table-nested) td:nth-last-child(2) {
|
||||
width: 45%;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
font-size: 0.63rem;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.resource-table:not(.resource-table-nested) th:nth-last-child(1),
|
||||
.resource-table:not(.resource-table-nested) td:nth-last-child(1) {
|
||||
width: 30%;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-all;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
/* ---- NESTED TABLE: Code(16%) Type(5%) Req(4%) Def(6%) Descr(36%) Constr(31%) ---- */
|
||||
.resource-table-nested {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.resource-table-nested th,
|
||||
.resource-table-nested td {
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
font-size: 0.72rem;
|
||||
padding: 0.25rem 0.3rem;
|
||||
}
|
||||
|
||||
.resource-table-nested th:nth-child(2),
|
||||
.resource-table-nested td:nth-child(2) {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.resource-table-nested td:nth-child(2) code {
|
||||
font-weight: 700;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.resource-table-nested th:nth-child(3),
|
||||
.resource-table-nested td:nth-child(3) {
|
||||
width: 5%;
|
||||
white-space: nowrap;
|
||||
font-size: 0.63rem;
|
||||
}
|
||||
|
||||
/* Required column: green ✓ instead of text "yes" */
|
||||
.resource-table-nested th:nth-child(4),
|
||||
.resource-table-nested td:nth-child(4) {
|
||||
width: 5%;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(5),
|
||||
.resource-table td:nth-child(5) {
|
||||
width: 8%;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
font-size: 0.72rem;
|
||||
.resource-table-nested td:nth-child(4) strong {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(6),
|
||||
.resource-table td:nth-child(6) {
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: normal;
|
||||
font-size: 0.72rem;
|
||||
.resource-table-nested td:nth-child(4):has(strong)::before {
|
||||
content: "✓";
|
||||
color: #27ae60;
|
||||
font-weight: 700;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.resource-table-nested th:nth-child(5),
|
||||
.resource-table-nested td:nth-child(5) {
|
||||
width: 6%;
|
||||
white-space: nowrap;
|
||||
color: #2c6f8c;
|
||||
}
|
||||
|
||||
.resource-table-nested th:nth-child(6),
|
||||
.resource-table-nested td:nth-child(6) {
|
||||
width: 35%;
|
||||
font-size: 0.63rem;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.resource-table-nested th:nth-child(7),
|
||||
.resource-table-nested td:nth-child(7) {
|
||||
width: 31%;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.resource-table th:nth-child(7),
|
||||
|
||||
Reference in New Issue
Block a user