tableau-vlans/style.css
2025-05-19 16:21:50 +02:00

262 lines
4.0 KiB
CSS

:root {
--hue: 58.3;
--saturation: 90%;
--lightness: 65%;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
overflow: visible !important;
}
body {
margin: 2rem auto;
padding: 0 1rem;
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f5f5f5;
color: #333;
}
h1 {
color: #2c3e50;
margin-bottom: 1rem;
text-align: center;
}
h2 {
color: #34495e;
text-align: center;
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;
cursor: pointer;
}
.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: 1rem;
}
.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;
align-items: center;
justify-content: space-evenly;
gap: 1rem;
margin-bottom: 2rem;
}
.member {
display: flex;
align-items: center;
border: 6px outset #476079;
border-radius: 4px;
background-color: #34495e;
margin-bottom: 0.5rem;
print-color-adjust: exact;
}
.member-id {
background: #888;
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;
transition: 0.2s background-color;
border: 3px inset #476079;
border-image-width: 5px;
border-image-slice: 3;
border-image-source: url(rj45.svg);
border-image-repeat: stretch;
background-color: white;
print-color-adjust: exact;
background-size: cover;
background-position: center;
background-origin: border-box;
}
[title] {
cursor: help;
}
.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: 1px 2px 2px black;
background-color: hsl(
calc(var(--hue) * var(--pvid)) var(--saturation) var(--lightness)
);
}
.vlan:hover {
--saturation: 65%;
--lightness: 75%;
}
.trunk:not(.shutdown) {
background-image: linear-gradient(
145deg,
transparent 60%,
red,
orange,
yellow,
green,
blue,
violet
);
}
.hybrid {
--tagged: 0;
background-image: linear-gradient(
145deg,
transparent 50%,
hsl(calc(var(--hue) * var(--tagged)) var(--saturation) var(--lightness)) 50%
);
}
.shutdown:not([class*="loopback-detection action shutdown"]) {
background-color: lightgray;
color: gray !important;
font-weight: normal;
text-shadow: none;
}
.voice_vlan::before {
content: "📞";
position: absolute;
bottom: -0.4em;
left: -0.4em;
}
.poe::after {
content: "⚡";
position: absolute;
top: -0.5em;
right: -0.5em;
}
.legend {
border-spacing: 0;
}
.legend td:not(.interface) {
border: 1px solid #2c3e50;
text-align: left;
padding: 0 0.3em;
}
footer {
display: flex;
flex-flow: column;
align-items: center;
}
#colorSlider {
width: 33%;
}
input[type="color"] {
opacity: 0%;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}
@media print {
body {
margin: auto;
padding: 0;
background-color: unset;
}
.no-print {
display: none;
}
}