tableau-vlans/style.css
2025-04-02 01:11:25 +02:00

265 lines
4.0 KiB
CSS

:root {
--hue: 15;
--saturation: 97%;
--lightness: 65%;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f5f5f5;
color: #333;
}
.container {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1rem;
}
h1 {
color: #2c3e50;
margin-bottom: 1rem;
text-align: center;
}
h2 {
color: #34495e;
margin-bottom: 0.5rem;
}
.file-list summary {
padding: 0.5rem 1rem;
background-color: white;
border-radius: 4px;
color: #2c3e50;
transition: background-color 0.3s;
margin-bottom: 0.5em;
font-weight: bold;
}
.file-list summary:hover {
background-color: #e0e0e0;
}
.file-list summary::marker {
content: "📁 ";
}
.file-list details[open] summary::marker {
content: "📂 ";
}
.file-list ul {
list-style: none;
}
.file-list li {
margin-left: 0.5rem;
}
.file-list a::before {
content: "📄 ";
}
.file-list a {
display: block;
padding: 0.5rem 1rem;
background-color: white;
border-radius: 4px;
text-decoration: none;
color: #2c3e50;
transition: background-color 0.3s;
margin-bottom: 0.5em;
}
.file-list a:hover {
background-color: #e0e0e0;
}
.link {
display: inline-block;
margin-bottom: 1rem;
color: #3498db;
text-decoration: none;
}
.link:hover {
text-decoration: underline;
}
main {
display: flex;
flex-flow: wrap;
gap: 1rem;
margin-bottom: 2rem;
}
ul {
list-style: none;
}
details {
cursor: pointer;
}
main > table {
margin: auto;
}
td {
text-align: left;
}
.member {
display: flex;
align-items: center;
border: 8px outset #476079;
border-radius: 6px;
background-color: #34495e;
margin-bottom: 0.5rem;
print-color-adjust: exact;
}
.member-id {
background: #777;
align-content: center;
color: lightgreen;
text-shadow: 0 1px 3px #fffb;
font-weight: bold;
border: 2px inset black;
font-family: monospace;
margin: 1em 0.5em;
padding: 0.12em 0.4em;
}
.interfaces {
border-spacing: 0;
margin: 0;
background-color: white;
}
.interface {
position: relative;
text-align: center;
vertical-align: middle;
min-width: 2em;
height: 2em;
mix-blend-mode: darken;
cursor: help;
transition: 0.2s background-color;
border: 2px inset #476079;
border-image-width: 4px;
border-image-slice: 3;
border-image-source: url(rj45.svg);
border-image-repeat: stretch;
background-color: white;
print-color-adjust: exact;
}
.member tr:nth-child(even) .interface {
border-image-source: url(rj45-inverse.svg);
}
.interface:not(.vlan):hover {
background-color: #ddd;
}
.vlan {
--pvid: 0;
color: #ecf0f1;
text-shadow: 0 1px 3px black;
background-color: hsl(
calc(var(--hue) * var(--pvid)) var(--saturation) var(--lightness)
);
}
.vlan:hover {
--saturation: 65%;
--lightness: 75%;
}
.trunk:not(.shutdown) {
font-weight: bold;
border: 3px solid;
border-image-slice: 1 !important;
border-image-source: linear-gradient(
127deg,
red,
orange,
yellow,
green,
blue,
violet
) !important;
}
.hybrid {
--tagged: 0;
--untagged: var(--pvid);
background-image: linear-gradient(
135deg,
hsl(calc(var(--hue) * var(--tagged)) var(--saturation) var(--lightness)) 50%,
hsl(calc(var(--hue) * var(--untagged)) var(--saturation) var(--lightness))
50%
);
background-size: cover;
background-position: center;
background-origin: border-box;
}
.shutdown:not([class*="loopback-detection action shutdown"]) {
background-color: lightgray;
color: gray !important;
}
.poe::before {
content: "⚡";
font-size: 0.7em;
position: absolute;
top: -0.5em;
right: -0.5em;
}
.voice_vlan::after {
content: "📞";
font-size: 0.7em;
position: absolute;
bottom: -0.5em;
left: -0.5em;
}
.legend {
border-spacing: 0;
}
.legend td:not(.interface) {
border: 1px solid #2c3e50;
}
footer {
display: flex;
flex-flow: column;
align-items: center;
}
#colorSlider {
width: 33%;
}
@media print {
* {
overflow: visible !important;
}
.no-print {
display: none;
}
}