User:Sur/vector.css: Difference between revisions
< User:Sur
Tag: Undo |
m more height matching tests |
||
Line 1: | Line 1: | ||
.stat-infobox { | .stat-infobox { | ||
width: 175px; | width: 175px; | ||
height: 150px; | min-height: 150px; /* Minimum height to allow growth */ | ||
background-color: #f0f0f0; | background-color: #f0f0f0; | ||
border-radius: 10px; | border-radius: 10px; | ||
text-align: center; | text-align: center; | ||
position: relative; | position: relative; | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
justify-content: center; | justify-content: center; | ||
align-items: center; | align-items: center; | ||
transition: | transition: all 0.3s ease; /* Smooth resizing */ | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
} | } | ||
Line 26: | Line 20: | ||
align-items: center; | align-items: center; | ||
border-radius: 15px; | border-radius: 15px; | ||
width: 100%; | width: 100%; | ||
position: relative; | |||
} | } | ||
.stat-infobox-hover { | .stat-infobox-hover { | ||
position: absolute; | position: absolute; | ||
top: 0; | top: 100%; /* Start just below stat-infobox */ | ||
left: 0; | |||
width: 100%; | |||
background-color: #fff; | background-color: #fff; | ||
border: 1px solid #ccc; | border: 1px solid #ccc; | ||
Line 57: | Line 36: | ||
opacity: 1; | opacity: 1; | ||
transform: translateX(0); | transform: translateX(0); | ||
z-index: 1; | |||
} | |||
.stat-infobox:hover .stat-infobox-hover { | |||
display: block; | |||
} | } | ||
Line 63: | Line 46: | ||
width: 100%; | width: 100%; | ||
border-collapse: separate; | border-collapse: separate; | ||
margin-top: 10px; | margin-top: 10px; | ||
} | } | ||
.stat-infobox-table th, | .stat-infobox-table th, | ||
.stat-infobox-table td { | .stat-infobox-table td { | ||
padding: 5px; | padding: 5px; | ||
Line 75: | Line 58: | ||
overflow: hidden; | overflow: hidden; | ||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||
max-width: 320px; | max-width: 320px; | ||
font-family: 'Retail Demo', sans-serif; | font-family: 'Retail Demo', sans-serif; | ||
Line 85: | Line 67: | ||
text-overflow: clip; | text-overflow: clip; | ||
background-color: rgba(0, 0, 0, .4); | background-color: rgba(0, 0, 0, .4); | ||
} | } | ||
Line 109: | Line 79: | ||
border-top-right-radius: 10px; | border-top-right-radius: 10px; | ||
border-bottom-right-radius: 10px; | border-bottom-right-radius: 10px; | ||
} | } |
Revision as of 18:21, 22 September 2024
.stat-infobox {
width: 175px;
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 {
display: flex;
flex-direction: column;
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;
}