Skip to content

Commit 6cc095b

Browse files
committed
Improves current appearence
1 parent e135f05 commit 6cc095b

File tree

1 file changed

+25
-56
lines changed

1 file changed

+25
-56
lines changed

assets/scss/_custom.scss

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -356,74 +356,43 @@ main {
356356

357357
/* SCSS Related to the Metrics Table */
358358

359-
// Define the variable for the table caption
360-
$table-caption: "This is the list of STABLE metrics emitted from core Kubernetes components";
361-
362-
// Define a mixin for the key-value pair style
363-
@mixin key-value-pair {
364-
td {
365-
padding: 5px 10px;
366-
text-align: left;
367-
width: 100%;
368-
}
369-
}
370-
371-
// Apply the key-value pair style to the table
372-
table.metrics {
373-
border-collapse: collapse;
374-
width: 100%;
375-
caption {
376-
font-size: 1.2em;
377-
font-weight: bold;
378-
padding-bottom: 10px;
379-
}
380-
thead {
381-
border: 1px solid $medium-grey;
382-
display: flex;
383-
flex-direction: column;
384-
width: fit-content;
385-
margin-bottom: 1rem;
359+
@media (max-width: 767px) { // for mobile devices, Display the names, Stability levels & types
386360

387-
tr{
388-
display: contents;
389-
th{
390-
display: block;
391-
white-space: nowrap;
361+
th:nth-child(n + 4),
362+
td:nth-child(n + 4) {
363+
display: none;
392364
}
393-
}
394-
}
395-
tbody {
396-
tr.metric {
397-
td {
398-
@include key-value-pair;
399-
display: block;
400-
margin-bottom: 1rem;
401-
min-width: 2rem;
365+
366+
td.metric_type{
367+
min-width: 7em;
402368
}
403-
td.metric_name {
404-
font-weight: 700;
369+
td.metric_stability_level{
370+
min-width: 6em;
405371
}
406-
td.metric_labels_varying{
407-
div {
408-
position: relative;
409-
padding-left: 1em;
410-
411-
&::before{
412-
content: '-';
413-
position: absolute;
414-
left:0;
372+
}
373+
374+
tbody{ // Tested dimensions to improve overall aesthetic of the table
375+
tr {
376+
td {
377+
font-size: smaller;
378+
}
379+
td.metric_labels_varying{
380+
min-width: 9em;
381+
}
382+
td.metric_type{
383+
min-width: 9em;
415384
}
385+
td.metric_description{
386+
min-width: 10em;
416387
}
388+
417389
}
418390
}
419-
}
420-
}
421391

422392
table.no-word-break td,
423393
table.no-word-break code {
424394
word-break: normal;
425-
}
426-
395+
}
427396
}
428397

429398
// blockquotes and callouts

0 commit comments

Comments
 (0)