Template:ItemGrid/styles.css: Difference between revisions
Template page
More actions
Content deleted Content added
.item-grid width: max-content; |
No edit summary |
||
| Line 3: | Line 3: | ||
grid-template-columns: repeat(3, 150px); |
grid-template-columns: repeat(3, 150px); |
||
gap: 10px; |
gap: 10px; |
||
width: auto; |
|||
width: max-content; |
|||
} |
} |
||
Revision as of 13:18, 22 October 2025
.item-grid {
display: grid;
grid-template-columns: repeat(3, 150px);
gap: 10px;
width: auto;
}
.item-cell {
display: flex;
flex-direction: column;
justify-content: flex-end;
background: #0d1117;
border-radius: 10px;
padding: 0px 2px;
min-width: 150px;
height: auto;
position: relative; /* important for tooltip positioning */
overflow: visible; /* allow tooltip to extend outside */
}
.item-image {
text-align: center;
margin-top: 4px;
position: relative;
overflow: hidden;
border-radius: 4px;
}
.item-image .curve-Common {
content: "";
position: absolute;
bottom: -20px;
left: -20px;
width: 50px; /* controls arc width */
height: 50px; /* controls arc height */
border-bottom-left-radius: 35px;
border-left: 20px solid #717471;
border-bottom: 20px solid #717471;
box-sizing: content-box;
}
.item-image .curve-Uncommon {
content: "";
position: absolute;
bottom: -20px;
left: -20px;
width: 50px; /* controls arc width */
height: 50px; /* controls arc height */
border-bottom-left-radius: 40px;
border-left: 20px solid #41eb6a;
border-bottom: 20px solid #41eb6a;
box-sizing: content-box;
}
.item-image .curve-Rare {
content: "";
position: absolute;
bottom: -20px;
left: -20px;
width: 50px; /* controls arc width */
height: 50px; /* controls arc height */
border-bottom-left-radius: 50px;
border-left: 20px solid #1ecbfc;
border-bottom: 20px solid #1ecbfc;
box-sizing: content-box;
}
.item-image .curve-Epic {
content: "";
position: absolute;
bottom: -20px;
left: -20px;
width: 50px; /* controls arc width */
height: 50px; /* controls arc height */
border-bottom-left-radius: 60px;
border-left: 20px solid #d8299b;
border-bottom: 20px solid #d8299b;
box-sizing: content-box;
}
.item-image .curve-Legendary {
content: "";
position: absolute;
bottom: -20px;
left: -20px;
width: 50px; /* controls arc width */
height: 50px; /* controls arc height */
border-bottom-left-radius: 65px;
border-left: 20px solid #fbc700;
border-bottom: 20px solid #fbc700;
box-sizing: content-box;
}
.data-table {
display: flex;
justify-content: space-between;
}
.data-table .category-icon {
color: #ccc;
font-weight: 500;
}
.data-table .item-price {
color: #ccc;
font-weight: 500;
}
.item-name {
display: none;
position: absolute;
color: #ddd;
font-weight: bold;
margin-top: 4px;
word-break: break-word;
bottom: 110%; /* position above the item */
left: 50%;
transform: translateX(-50%);
background: rgba(20, 20, 20, 0.95);
padding: 6px 10px;
border-radius: 6px;
font-size: 0.9em;
white-space: nowrap;
z-index: 10;
pointer-events: none;
box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.item-name::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 6px;
border-style: solid;
border-color: rgba(20,20,20,0.95) transparent transparent transparent;
}
.item-cell:hover .item-name {
display: block;
}