Mudanças entre as edições de "Predefinição:Itemdata/styles.css"

De Wiki Gla
Ir para navegação Ir para pesquisar
Linha 7: Linha 7:
     padding: 0;
     padding: 0;
     z-index: 5;
     z-index: 5;
    text-align: center; /* garante centralização do conteúdo */
}
}


.item-wrapper img {
.item-wrapper img {
    width: 32px;
    height: 32px;
     display: block;
     display: block;
     margin: 0 auto;
     margin: 0 auto;
}
}


/* Quantidade no canto inferior direito, sem rotação */
/* Quantidade abaixo do item, centralizada horizontalmente */
.item-count {
.item-count {
     position: absolute;
     position: absolute;
     bottom: 0;
     bottom: -2px; /* mantém a altura atual */
     right: 0;
     left: 50%;
    transform: translateX(-50%);
     font-size: 11px;
     font-size: 11px;
     font-weight: bold;
     font-weight: bold;
     background: rgba(0, 0, 0, 0.75);
     background: rgba(0, 0, 0, 0.75);
     color: white;
     color: white;
     padding: 2px 5px;
     padding: 2px 6px;
     border-radius: 4px;
     border-radius: 4px;
     line-height: 1;
     line-height: 1;
     white-space: nowrap;
     white-space: nowrap;
     text-align: right;
     text-align: center;
     box-shadow: 0 0 2px #000;
     box-shadow: 0 0 2px #000;
    max-width: 100%; /* <-- ESSENCIAL */
    overflow: hidden;
    text-overflow: ellipsis;
     z-index: 2;
     z-index: 2;
}
}
Linha 37: Linha 38:
.item-wrapper:hover .item-count {
.item-wrapper:hover .item-count {
     background: rgba(0, 0, 0, 0.9);
     background: rgba(0, 0, 0, 0.9);
}
/* Tooltip */
.item-wrapper[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c2c;
    color: #fff;
    padding: 2px 5px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
}
.item-wrapper[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #2c2c2c transparent transparent transparent;
    z-index: 9998;
}
}

Edição das 18h21min de 11 de junho de 2025

.item-wrapper {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 4px;
    padding: 0;
    z-index: 5;
    text-align: center; /* garante centralização do conteúdo */
}

.item-wrapper img {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto;
}

/* Quantidade abaixo do item, centralizada horizontalmente */
.item-count {
    position: absolute;
    bottom: -2px; /* mantém a altura atual */
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 0 2px #000;
    z-index: 2;
}

.item-wrapper:hover .item-count {
    background: rgba(0, 0, 0, 0.9);
}

/* Tooltip */
.item-wrapper[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c2c;
    color: #fff;
    padding: 2px 5px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
}

.item-wrapper[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #2c2c2c transparent transparent transparent;
    z-index: 9998;
}