User:Sur/vector.css: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m reverting to original form for now
Sur (talk | contribs)
m rework attempt1
Line 1: Line 1:
/* Used for {{StatBoxes}} for hero pages*/
/* Used for {{StatBoxes}} for hero pages*/


.stat-box {
.stat-infobox {
     width: 100px;
     width: 100px;
     height: 150px;
     height: 150px;
Line 8: Line 8:
     text-align: center;
     text-align: center;
     position: relative;
     position: relative;
    transition: width 0.3s ease;
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
     justify-content: center;
     justify-content: center;
     align-items: center;
     align-items: center;
    transition: width 0.3s ease;
}
}


.stat-box:hover {
.stat-infobox:hover {
     width: 175px;
     width: 175px;
}
}


.stat-box-content {
.stat-infobox-content {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
Line 29: Line 29:
}
}


.stat-box-icon {
.stat-infobox-icon {
     width: 40px;
     width: 40px;
     height: 40px;
     height: 40px;
}
}


.stat-box-label {
.stat-infobox-label {
     margin-top: 10px;
     margin-top: 10px;
     font-size: 16px;
     font-size: 16px;
Line 44: Line 44:
}
}


.stat-box-hover {
.stat-infobox-hover {
     display: none;
     display: block; /* Table is now always visible */
     position: absolute;
     position: absolute;
     top: 0;
     top: 0;
Line 53: Line 53:
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
     padding: 10px;
     padding: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
     border-radius: 15px;
     border-radius: 15px;
}
.stat-box:hover .stat-box-hover {
    display: block;
     opacity: 1;
     opacity: 1;
     transform: translateX(0);
     transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
}


@media (max-width: 768px) {
@media (max-width: 768px) {
     .stat-box {
     .stat-infobox {
         width: 90px;
         width: 90px;
         height: 130px;
         height: 130px;
     }
     }


     .stat-box:hover {
     .stat-infobox:hover {
         width: 140px;
         width: 140px;
     }
     }


     .stat-box-hover {
     .stat-infobox-hover {
         left: 140px;
         left: 140px;
         font-size: 14px;
         font-size: 14px;
Line 80: Line 76:


@media (max-width: 480px) {
@media (max-width: 480px) {
     .stat-box {
     .stat-infobox {
         width: 75px;
         width: 75px;
         height: 110px;
         height: 110px;
     }
     }


     .stat-box:hover {
     .stat-infobox:hover {
         width: 120px;
         width: 120px;
     }
     }


     .stat-box-hover {
     .stat-infobox-hover {
         left: 120px;
         left: 120px;
         font-size: 12px;
         font-size: 12px;
Line 96: Line 92:
}
}


.stat-box-table {
.stat-infobox-table {
     width: 100%;
     width: 100%;
     border-collapse: separate;
     border-collapse: separate;
}
}


.stat-box-table th,  
.stat-infobox-table th,  
.stat-box-table td {
.stat-infobox-table td {
     padding: 5px;
     padding: 5px;
     text-align: center;
     text-align: center;
Line 115: Line 111:
}
}


.stat-box-table th:hover,
.stat-infobox-table th:hover,
.stat-box-table td:hover {
.stat-infobox-table td:hover {
     overflow: visible;
     overflow: visible;
     text-overflow: clip;
     text-overflow: clip;
Line 122: Line 118:
}
}


.stat-box-table td::before,  
.stat-infobox-table td::before,  
.stat-box-table th::before {
.stat-infobox-table th::before {
     content: '';
     content: '';
     position: absolute;
     position: absolute;
Line 134: Line 130:
}
}


.stat-box-table th:first-child,
.stat-infobox-table th:first-child,
.stat-box-table td:first-child {
.stat-infobox-table td:first-child {
     border-top-left-radius: 10px;
     border-top-left-radius: 10px;
     border-bottom-left-radius: 10px;
     border-bottom-left-radius: 10px;
}
}


.stat-box-table th:last-child,
.stat-infobox-table th:last-child,
.stat-box-table td:last-child {
.stat-infobox-table td:last-child {
     border-top-right-radius: 10px;
     border-top-right-radius: 10px;
     border-bottom-right-radius: 10px;
     border-bottom-right-radius: 10px;
}
}


.stat-box-table .darker {
.stat-infobox-table .darker {
     background-color: rgba(0, 0, 0, 0.25);
     background-color: rgba(0, 0, 0, 0.25);
}
}

Revision as of 02:10, 22 September 2024

/* Used for {{StatBoxes}} for hero pages*/

.stat-infobox {
    width: 100px;
    height: 150px;
    background-color: #f0f0f0;
    border-radius: 10px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: width 0.3s ease;
}

.stat-infobox:hover {
    width: 175px;
}

.stat-infobox-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    height: 100%;
    width: 100%;
}

.stat-infobox-icon {
    width: 40px;
    height: 40px;
}

.stat-infobox-label {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    font-family: 'Retail Demo', sans-serif;
}

.stat-infobox-hover {
    display: block; /* Table is now always visible */
    position: absolute;
    top: 0;
    left: 175px;
    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);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .stat-infobox {
        width: 90px;
        height: 130px;
    }

    .stat-infobox:hover {
        width: 140px;
    }

    .stat-infobox-hover {
        left: 140px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stat-infobox {
        width: 75px;
        height: 110px;
    }

    .stat-infobox:hover {
        width: 120px;
    }

    .stat-infobox-hover {
        left: 120px;
        font-size: 12px;
        padding: 8px;
    }
}

.stat-infobox-table {
    width: 100%;
    border-collapse: separate;
}

.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;
    position: relative;
    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 td::before, 
.stat-infobox-table th::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.08);
    mix-blend-mode: multiply;
}

.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;
}

.stat-infobox-table .darker {
    background-color: rgba(0, 0, 0, 0.25);
}