fix: overlapping "10" sur d10, hover, suppression dice-so-nice

Plage de des dans la feuille
- "10" superpose sur l'icone d10 (plus de colonne verticale)
- Passe de 40x56px a 40x40px (carre)
- Couleur hover (bordure + texte violets, glow)

Boutons fa-dice-d10 (magies, kung-fu, armes, initiative)
- Override CSS : affiche "10" + icone d10 SVG superposes
- Couleur hover sur le texte "10"

Suppression images dice-so-nice inutilisees
- src/ui/dice.js supprime (referencait des images manquantes)
- Import et appel registerDice retires de system.js

Divers
- Retire img-die-sm des templates skills/nghang (ecrasait la taille des plaques)
- Reduit padding/gaps de la grille de faces dans le chat
- Supprime overflow:hidden sur cde-roll-result
This commit is contained in:
2026-07-01 17:21:12 +02:00
parent a5406ea901
commit af72ca5ceb
8 changed files with 544 additions and 668 deletions
+247 -283
View File
@@ -1,5 +1,5 @@
/* -------------------------------------------
/* -------------------------------------------
Fonts
---------------------------------------------*/
@@ -381,22 +381,17 @@ section.npc .cde-neon-tabs .item.active { color: @cde-supernatural; borde
.cde-tab-body {
flex: 1 1 0;
min-height: 0;
display: flex;
flex-direction: column;
padding: @cde-gap;
background: @cde-surface2;
border: 1px solid @cde-border;
border-top: none;
border-radius: 0 0 @cde-radius @cde-radius;
overflow: hidden;
overflow-y: auto;
.tab {
display: none;
flex: 1 1 0;
min-height: 0;
flex-direction: column;
gap: @cde-gap;
overflow-y: auto;
}
.tab.active {
@@ -450,26 +445,11 @@ section.npc .cde-neon-tabs .item.active { color: @cde-supernatural; borde
flex-direction: column;
.editor {
flex: 1 1 auto;
flex: 1 1 0;
min-height: 200px;
height: 100%;
border-radius: @cde-radius;
border: 1px solid @cde-border;
background: @cde-surface;
// Force TinyMCE to fill the container
.tox {
height: 100% !important;
min-height: 100% !important;
}
.tox-editor-container {
height: 100% !important;
min-height: 100% !important;
}
iframe {
height: 100% !important;
min-height: 100% !important;
}
}
}
@@ -2253,23 +2233,6 @@ section.npc .cde-neon-tabs .item.active { color: @cde-supernatural; borde
&:hover i { color: @cde-text; }
}
.cde-magic-order-btn {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: @cde-muted;
border-radius: 3px;
flex-shrink: 0;
transition: color 0.12s, background 0.12s;
i { font-size: 9px; }
&:hover { color: @cde-text; background: fade(@cde-border-hi, 25%); }
}
// Specialities list
.cde-magic-specialities {
border-top: 1px solid @cde-border;
@@ -2805,95 +2768,6 @@ section.npc .cde-neon-tabs .item.active { color: @cde-supernatural; borde
text-shadow: 0 0 8px fade(@cde-spell, 50%);
}
/* Recovery roll chat message */
.cde-chat-recovery {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px 12px;
}
.cde-chat-recovery-header {
display: flex;
align-items: center;
gap: 8px;
}
.cde-chat-recovery-icon {
width: 28px;
height: 28px;
object-fit: contain;
}
.cde-chat-recovery-title {
font-family: "Averia", sans-serif;
font-size: 14px;
font-weight: 700;
color: @cde-text;
}
.cde-chat-recovery-dice {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
}
.cde-chat-recovery-dice-label {
font-weight: 700;
color: @cde-item;
}
.cde-chat-recovery-dice-results {
font-family: monospace;
font-size: 13px;
color: @cde-text;
}
.cde-chat-recovery-results {
display: flex;
flex-direction: column;
gap: 4px;
padding: 6px 8px;
border-radius: 4px;
font-size: 12px;
}
.cde-chat-recovery-even {
display: flex;
align-items: center;
gap: 6px;
color: @cde-spell;
}
.cde-chat-recovery-odd {
display: flex;
align-items: center;
gap: 6px;
color: @cde-supernatural;
}
.cde-chat-recovery-count {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 50%;
font-size: 11px;
font-weight: 700;
color: #fff;
flex-shrink: 0;
}
.cde-chat-recovery-even .cde-chat-recovery-count {
background: @cde-spell;
}
.cde-chat-recovery-odd .cde-chat-recovery-count {
background: @cde-supernatural;
}
// Legacy tabs (actor sheets still use cde-tabs)
.cde-tabs {
margin-top: @cde-gap;
@@ -2933,7 +2807,7 @@ section.npc .cde-neon-tabs .item.active { color: @cde-supernatural; borde
}
#pause > img {
content: url("/systems/fvtt-chroniques-de-l-etrange/images/wheel.webp");
content: url("/systems/fvtt-chroniques-de-l-etrange/images/logo_cde.webp");
height: 192px;
width: 192px;
top: -45px;
@@ -2999,37 +2873,6 @@ strong.ellipsis {
width: 100px;
}
// ============================================================
// Recovery button
// ============================================================
.cde-recovery-bar {
margin-bottom: 10px;
}
.cde-recovery-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
padding: 10px 16px;
border: 1px solid @cde-spell;
border-radius: 6px;
background: fadeout(@cde-spell, 85%);
color: @cde-spell;
font-family: "Averia", sans-serif;
font-size: 14px;
font-weight: 700;
cursor: pointer;
transition: background 0.15s, filter 0.15s;
&:hover {
background: fadeout(@cde-spell, 70%);
filter: brightness(1.1);
}
}
// ============================================================
// Three Treasures partial layout
// ============================================================
@@ -3384,7 +3227,7 @@ ol.item-list {
img { border: none; border-radius: 3px; flex-shrink: 0; }
h4.item-name { flex: 1 1 0; margin: 0; font-size: 13px; font-weight: 600; color: @cde-text; font-family: "Signika", sans-serif; }
h4.item-name { flex: 1 1 0; margin: 0; font-size: 13px; color: @cde-text; }
.cde-item-stat {
font-family: monospace;
@@ -3593,7 +3436,6 @@ ol.item-list {
font-family: 'Share Tech Mono', monospace;
border-radius: 4px;
border: 1px solid @cde-border;
overflow: hidden;
// ---- Header ----
.cde-rr-header {
@@ -3719,13 +3561,6 @@ ol.item-list {
text-shadow: 0 0 12px var(--rr-accent, transparent);
}
.cde-rr-spell-power-formula {
font-size: 10px;
color: @cde-muted;
margin: 2px 0;
white-space: nowrap;
}
.cde-rr-spell-power-label {
font-size: 9px;
font-weight: 700;
@@ -3860,8 +3695,8 @@ ol.item-list {
.cde-dice-grid {
display: grid;
grid-template-columns: repeat(10, 1fr);
gap: 3px;
padding: 8px 8px 6px;
gap: 1px;
padding: 6px 4px 4px;
border-top: 1px solid @cde-border;
.cde-dice-cell {
@@ -3877,11 +3712,6 @@ ol.item-list {
line-height: 1;
}
.cde-dice-plate {
width: 100%;
border: none;
opacity: 0.65;
}
}
}
}
@@ -4751,112 +4581,6 @@ ol.item-list {
text-align: center;
}
/* Duplicate row highlight */
.cde-migration-row-duplicate {
background: fadeout(#d4af37, 85%);
}
.cde-migration-duplicate-icon {
color: #d4af37;
margin-right: 4px;
font-size: 11px;
}
/* Confirmation bar */
.cde-migration-confirm-bar {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border: 1px solid fadeout(#d4af37, 30%);
border-radius: 6px;
background: fadeout(#d4af37, 90%);
}
.cde-migration-confirm-msg {
margin: 0;
font-size: 12px;
color: @cde-text;
display: flex;
align-items: center;
gap: 6px;
i { color: #d4af37; }
}
.cde-migration-confirm-duplicates {
margin: 0;
font-size: 11px;
color: #e07070;
display: flex;
align-items: center;
gap: 6px;
i { color: #e07070; }
}
.cde-migration-confirm-actions {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 4px;
}
.cde-migration-confirm-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 9px 24px;
border: none;
border-radius: 6px;
background: @cde-spell;
color: #fff;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: filter 0.15s;
&:hover { filter: brightness(1.15); }
}
.cde-migration-cancel-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 9px 24px;
border: 1px solid @cde-border;
border-radius: 6px;
background: none;
color: @cde-muted;
font-size: 13px;
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
&:hover {
color: #e04444;
border-color: #e04444;
}
}
/* Progress section */
.cde-migration-progress {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 16px;
font-size: 13px;
color: @cde-text;
i { color: @cde-spell; }
}
.cde-migration-progress-count {
font-weight: 700;
color: @cde-spell;
font-variant-numeric: tabular-nums;
}
// ============================================================
// Welcome message
// ============================================================
@@ -4924,3 +4648,243 @@ ol.item-list {
filter: brightness(1.2);
}
}
// ============================================================
// Override fa-dice-d10 to show Foundry d10 SVG + "10" overlay
// ============================================================
i.fas.fa-dice-d10,
i.fa-solid.fa-dice-d10 {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.4em;
height: 1.4em;
font-size: inherit;
vertical-align: middle;
// Replace FA glyph with "10" text
&:before {
content: "10";
font-family: "Averia", sans-serif;
font-size: 0.55em;
font-weight: 700;
color: @cde-text;
z-index: 1;
position: relative;
line-height: 1;
}
// d10 SVG behind the text
&:after {
content: "";
position: absolute;
inset: 0;
background: url('../../../icons/svg/d10-grey.svg') center / contain no-repeat;
opacity: 0.5;
}
}
// Hover effect trickle-up: the parent hover changes background,
// the ::after inherits opacity change via the wrapper
a.cde-roll-trigger:hover i.fas.fa-dice-d10,
a.cde-roll-trigger:hover i.fa-solid.fa-dice-d10,
button:hover i.fas.fa-dice-d10,
button:hover i.fa-solid.fa-dice-d10 {
&:after { opacity: 0.7; }
}
// Nested in NPC roll cell — keep the 24x24 size
.cde-roll-cell i.fas.fa-dice-d10 {
width: 20px;
height: 20px;
font-size: 16px;
}
// ============================================================
// Dice plate - CSS-only dice display (chiffre + dé SVG)
// Utilise les icônes de base de FoundryVTT : icons/svg/d10-grey.svg
// ============================================================
.cde-dice-plate-css {
position: relative;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 50px;
height: 70px;
background: @cde-bg;
border-radius: @cde-radius;
border: 1px solid @cde-border;
color: @cde-text;
font-family: "Averia", sans-serif;
font-size: 24px;
font-weight: 700;
margin: 2px;
line-height: 1;
&::before {
content: attr(data-value);
display: block;
line-height: 1;
padding-top: 4px;
}
&::after {
content: "";
display: block;
width: 32px;
height: 32px;
background-image: url('../../../icons/svg/d10-grey.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
margin-top: 4px;
opacity: 0.85;
}
// Variantes de taille
&.small {
width: 40px;
height: 40px;
font-size: 14px;
border-radius: @cde-radius-sm;
&::before {
position: relative;
z-index: 1;
padding-top: 0;
font-size: inherit;
}
&::after {
position: absolute;
inset: 0;
width: auto;
height: auto;
margin-top: 0;
border-radius: @cde-radius-sm;
}
}
&.large {
width: 60px;
height: 84px;
font-size: 30px;
&::after {
width: 38px;
height: 38px;
}
}
// Couleurs par élément Wu Xing
&.wood { border-color: @wu-green; &::before { color: lighten(@wu-green, 20%); } }
&.fire { border-color: @wu-red; &::before { color: lighten(@wu-red, 20%); } }
&.earth { border-color: @wu-brown; &::before { color: lighten(@wu-brown, 20%); } }
&.metal { border-color: @wu-gray; &::before { color: lighten(@wu-gray, 20%); } }
&.water { border-color: @wu-blue; &::before { color: lighten(@wu-blue, 20%); } }
}
// Hover effect for sheet dice plates
.cde-roll-trigger:hover .cde-dice-plate-css.small,
.cde-die-cell:hover .cde-dice-plate-css.small {
border-color: @cde-supernatural;
box-shadow: 0 0 8px fade(@cde-supernatural, 40%);
&::before { color: @cde-supernatural; }
&::after { opacity: 1; }
}
// Hover color for the "10" text on fa-dice-d10 override
a.cde-roll-trigger:hover i.fas.fa-dice-d10::before,
a.cde-roll-trigger:hover i.fa-solid.fa-dice-d10::before,
button:hover i.fas.fa-dice-d10::before,
button:hover i.fa-solid.fa-dice-d10::before {
color: @cde-supernatural;
}
// ============================================================
// Dice plate specific styling (for chat messages)
// Compact dice with colored borders per value + colored die icon
// ============================================================
.cde-dice-plate.cde-dice-plate-css {
width: 24px;
min-width: 24px;
height: 36px;
font-size: 12px;
margin: 1px;
box-shadow:
0 0 0 1px fade(@cde-border-hi, 60%),
inset 0 0 0 1px fade(@cde-text, 15%);
&::before {
padding-top: 1px;
font-size: 12px;
}
&::after {
width: 14px;
height: 14px;
margin-top: 2px;
opacity: 0.9;
filter: brightness(0) saturate(100%);
}
// Couleur par valeur de dé (0-10) + couleur du SVG
&[data-value="0"] {
border-color: @wu-gray;
&::before { color: lighten(@wu-gray, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(0%) saturate(100%) hue-rotate(200deg) brightness(100%); }
}
&[data-value="1"] {
border-color: @wu-blue;
&::before { color: lighten(@wu-blue, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(200deg) brightness(100%); }
}
&[data-value="2"] {
border-color: @wu-green;
&::before { color: lighten(@wu-green, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(120deg) brightness(100%); }
}
&[data-value="3"] {
border-color: @wu-brown;
&::before { color: lighten(@wu-brown, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(20deg) brightness(100%); }
}
&[data-value="4"] {
border-color: @wu-red;
&::before { color: lighten(@wu-red, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(0deg) brightness(100%); }
}
&[data-value="5"] {
border-color: @wu-gray;
&::before { color: lighten(@wu-gray, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(0%) saturate(100%) hue-rotate(200deg) brightness(100%); }
}
&[data-value="6"] {
border-color: @wu-blue;
&::before { color: lighten(@wu-blue, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(200deg) brightness(100%); }
}
&[data-value="7"] {
border-color: @wu-green;
&::before { color: lighten(@wu-green, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(120deg) brightness(100%); }
}
&[data-value="8"] {
border-color: @wu-brown;
&::before { color: lighten(@wu-brown, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(20deg) brightness(100%); }
}
&[data-value="9"] {
border-color: @wu-red;
&::before { color: lighten(@wu-red, 25%); }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(0deg) brightness(100%); }
}
&[data-value="10"] {
border-color: @wu-red;
&::before { color: lighten(@wu-red, 25%); font-size: 13px; }
&::after { filter: brightness(0) saturate(100%) invert(75%) sepia(24%) saturate(1200%) hue-rotate(0deg) brightness(100%); }
}
}