Jump to content

The wiki is in the process of updating to the latest major game changes. Any contributions are appreciated!
Start here to learn how to edit and join our Discord server to make suggestions.

User:Sur/vector.css: Difference between revisions

From The Deadlock Wiki
Sur (talk | contribs)
m more height matching tests
Sur (talk | contribs)
mNo edit summary
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
.stat-infobox {
.icon {
    width: 175px;
  filter: invert(0%);
    min-height: 150px; /* Minimum height to allow growth */
    background-color: #f0f0f0;
    border-radius: 10px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease; /* Smooth resizing */
    margin-bottom: 10px;
}
}


.stat-infobox-content {
@media (prefers-color-scheme: dark) {
    display: flex;
  .icon {
    flex-direction: column;
     filter: invert(100%);
    justify-content: center;
  }
    align-items: center;
    border-radius: 15px;
    width: 100%;
    position: relative;
}
 
.stat-infobox-hover {
    position: absolute;
    top: 100%; /* Start just below stat-infobox */
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 15px;
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}
 
.stat-infobox:hover .stat-infobox-hover {
    display: block;
}
 
.stat-infobox-table {
     width: 100%;
    border-collapse: separate;
    margin-top: 10px;
}
 
.stat-infobox-table th,
.stat-infobox-table td {
    padding: 5px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.08);
    border: 1px solid black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    font-family: 'Retail Demo', sans-serif;
}
 
.stat-infobox-table th:hover,
.stat-infobox-table td:hover {
    overflow: visible;
    text-overflow: clip;
    background-color: rgba(0, 0, 0, .4);
}
 
.stat-infobox-table th:first-child,
.stat-infobox-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
 
.stat-infobox-table th:last-child,
.stat-infobox-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
}

Revision as of 18:56, 6 October 2024

.icon {
  filter: invert(0%);
}

@media (prefers-color-scheme: dark) {
  .icon {
    filter: invert(100%);
  }
}