Skip to content

Commit 71cd6ca

Browse files
authored
Implemented a single columned list for the kubernetes metrics reference page (#42823)
* Single column css and documentation.md * Wrapper class added & SCSS adjusted accordingly * some label fixes * Wrapper class is now metric only * Final fixes for labels and padding in mobile devices
1 parent e7975c8 commit 71cd6ca

File tree

2 files changed

+3065
-3054
lines changed

2 files changed

+3065
-3054
lines changed

assets/scss/_custom.scss

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -349,52 +349,63 @@ footer {
349349
}
350350

351351
main {
352-
.td-content table code,
353-
.td-content>table td {
354-
word-break: break-word;
355-
}
356352

357-
/* SCSS Related to the Metrics Table */
353+
/* SCSS Related to the Metrics list */
354+
355+
div.metric:nth-of-type(odd) { // Look & Feel , Aesthetics
356+
background-color: $light-grey;
357+
}
358358

359-
@media (max-width: 767px) { // for mobile devices, Display the names, Stability levels & types
359+
div.metrics {
360360

361-
table.metrics {
362-
th:nth-child(n + 4),
363-
td:nth-child(n + 4) {
361+
.metric {
362+
div:empty{
364363
display: none;
365364
}
366365

367-
td.metric_type{
368-
min-width: 7em;
366+
display: flex;
367+
flex-direction: column;
368+
flex-wrap: wrap;
369+
gap: .75em;
370+
padding:.75em .75em .75em .75em;
371+
372+
.metric_name{
373+
font-size: large;
374+
font-weight: bold;
375+
word-break: break-word;
369376
}
370-
td.metric_stability_level{
371-
min-width: 6em;
377+
378+
label{
379+
font-weight: bold;
380+
margin-right: .5em;
372381
}
373-
}
374-
}
375-
376-
table.metrics tbody{ // Tested dimensions to improve overall aesthetic of the table
377-
tr {
378-
td {
379-
font-size: smaller;
382+
ul {
383+
li:empty{
384+
display: none;
380385
}
381-
td.metric_labels_varying{
382-
min-width: 9em;
383-
}
384-
td.metric_type{
385-
min-width: 9em;
386-
}
387-
td.metric_description{
388-
min-width: 10em;
386+
display: flex;
387+
flex-direction: column;
388+
gap: .75em;
389+
flex-wrap: wrap;
390+
li.metric_labels_varying{
391+
span{
392+
display: inline-block;
393+
background-color: rgb(240, 239, 239);
394+
padding: 0 0.5em;
395+
margin-right: .35em;
396+
font-family: monospace;
397+
border: 1px solid rgb(230 , 230 , 230);
398+
border-radius: 5%;
399+
margin-bottom: .35em;
400+
}
389401
}
390-
402+
391403
}
404+
392405
}
393406

394-
table.no-word-break td,
395-
table.no-word-break code {
396-
word-break: normal;
397-
}
407+
408+
}
398409
}
399410

400411
// blockquotes and callouts

0 commit comments

Comments
 (0)