diff --git a/TASKS.md b/TASKS.md index 176b196..45776f6 100644 --- a/TASKS.md +++ b/TASKS.md @@ -20,6 +20,7 @@ - [x] Allow Jenkins agents without Node.js to publish after the Python checks; keep the JavaScript tab check when Node.js is available. - [x] Mirror Ravenous Jenkins publication by deploying successful master artifacts to /mnt/books/RPG/d10_character_sheet/. - [x] Link the published body images in generated cyberpunk HTML by default, with a local preview override. +- [x] Improve roll result contrast and spacing in the chat template across light and dark themes. ## Live Roll20 checks after local verification diff --git a/templates/sheet.css b/templates/sheet.css index d29ee61..1a8a551 100644 --- a/templates/sheet.css +++ b/templates/sheet.css @@ -114,7 +114,13 @@ .sheet-d10 .sheet-repeater .sheet-repeater-skilllevel, .sheet-d10 .sheet-repeater .sheet-repeater-skillcost, .sheet-d10 .sheet-repeater .sheet-repeater-quantity, .sheet-d10 .sheet-repeater .sheet-repeater-damage { flex: 0 1 70px; } .sheet-d10 .sheet-repeater .sheet-repeater-attribute { flex: 1 1 130px; } .sheet-d10 .sheet-repeater .sheet-roll { flex: 0 0 34px; } -.sheet-rolltemplate-d10skillcheck { padding: 7px 9px; color: var(--d10-ink); background: var(--d10-panel); border: 1px solid var(--d10-border); border-left: 4px solid var(--d10-accent); font: 12px Georgia,serif; } +.sheet-rolltemplate-d10skillcheck { overflow: hidden; color: var(--d10-ink); background: var(--d10-panel); border: 1px solid var(--d10-border); border-left: 4px solid var(--d10-accent); font: 12px Georgia,serif; } +.sheet-rolltemplate-d10skillcheck .sheet-roll-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; padding: 7px 9px; border-bottom: 1px solid var(--d10-border); } +.sheet-rolltemplate-d10skillcheck .sheet-roll-title strong { font-size: 14px; } +.sheet-rolltemplate-d10skillcheck .sheet-roll-title span { opacity: .85; } +.sheet-rolltemplate-d10skillcheck .sheet-roll-values { display: grid; grid-template-columns: auto minmax(36px,auto) auto minmax(36px,auto); gap: 6px; align-items: center; justify-content: start; padding: 8px 9px; } +.sheet-rolltemplate-d10skillcheck .sheet-roll-value { min-width: 30px; text-align: center; } +.sheet-rolltemplate-d10skillcheck .inlinerollresult { display: inline-block; min-width: 28px; padding: 2px 5px; color: #20242b !important; background: #ffffff !important; border: 1px solid #68717d !important; border-radius: 3px; font-weight: bold; text-align: center; text-shadow: none !important; } @media (max-width: 760px) { .sheet-d10 { padding: 9px; } .sheet-d10 .sheet-stat-grid, .sheet-d10 .sheet-resource-grid, .sheet-d10 .sheet-weapon-grid { grid-template-columns: 1fr; } diff --git a/tests/test_build.py b/tests/test_build.py index a533631..65b2087 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -21,6 +21,10 @@ class BuildTests(unittest.TestCase): self.assertGreater(info['skills'], 10) self.assertIn('repeating_', files['sheet.html']) self.assertIn('sheet-rolltemplate-d10skillcheck', files['sheet.html']) + self.assertIn('class="sheet-roll-values"', files['sheet.html']) + self.assertIn('class="sheet-roll-value">{{result}}', files['sheet.html']) + self.assertIn('.sheet-rolltemplate-d10skillcheck .inlinerollresult', files['sheet.css']) + self.assertIn('color: #20242b !important; background: #ffffff !important', files['sheet.css']) self.assertIn('class="sheet-stat-grid"', files['sheet.html']) self.assertIn('class="sheet-skill-head"', files['sheet.html']) self.assertEqual(files['sheet.html'].count('class="sheet-page sheet-page-'), 2 if variant == 'base' else 3) diff --git a/tools/build.py b/tools/build.py index fa40dab..145e2e9 100644 --- a/tools/build.py +++ b/tools/build.py @@ -337,8 +337,8 @@ def render(model, skills, variant, theme_name, theme, themes, asset_base_url='') f'.sheet-d10 .sheet-category-tab-state[value="{section["id"]}"] ~ .sheet-category-tab-nav .sheet-category-tab-{section["id"]} {{ color: var(--d10-panel); background: var(--d10-accent); border-color: var(--d10-accent); }}\n' for section in skills['sections'] if any(group.get('skills') for group in section['groups'])) html_text += ''' -{{name}} — {{roll_name}} -Seuil: {{threshold}} · Résultat: {{result}} +{{name}}{{roll_name}} +Seuil{{threshold}}Résultat{{result}} ''' html_text += '