New and improved version of dark mode

This commit is contained in:
Adam Talbot
2022-03-27 19:12:47 -04:00
parent 884578ead6
commit 08515b0e88
23 changed files with 222 additions and 29 deletions
+208 -26
View File
@@ -80,7 +80,8 @@
--poke-water-background: #e1fbff80;
--poke-water-shaded: #5973b1;
--poke-water-dark: #1c2f5d;
--poke-all-dark-background: #ffffff30;
--poke-all-dark: #333333;
--poke-all-dark-background: #00000050;
}
.charsheet {
@@ -99,14 +100,19 @@
.sheet-rolltemplate-skill-roll {
--atk-gradient: #bb5555;
--atk-header: #ff9999;
--atk-header-dark: #771111;
--def-gradient: #bbbb55;
--def-header: #ffff99;
--def-header-dark: #777711;
--spatk-gradient: #55bbbb;
--spatk-header: #99ffff80;
--spatk-header: #99ffff;
--spatk-header-dark: #117777;
--spdef-gradient: #55bb55;
--spdef-header: #99ff9980;
--spdef-header: #99ff99;
--spdef-header-dark: #117711;
--spd-gradient: #bb55bb;
--spd-header: #ff99ff80;
--spd-header: #ff99ff;
--spd-header-dark: #771177;
}
.charsheet {
@@ -277,142 +283,161 @@ input.sheet-color-setting-move[value="water"] ~ div.sheet-pokemon-move {
.sheet-darkmode input.sheet-color-setting[value="bug"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="bug"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-bug-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-bug);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundBug.png");
}
.sheet-darkmode input.sheet-color-setting[value="dark"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="dark"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-dark-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-dark);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundDark.png");
}
.sheet-darkmode input.sheet-color-setting[value="dragon"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="dragon"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-dragon-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-dragon);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundDragon.png");
}
.sheet-darkmode input.sheet-color-setting[value="electric"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="electric"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-electric-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-electric);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundElectric.png");
}
.sheet-darkmode input.sheet-color-setting[value="fairy"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="fairy"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-fairy-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-fairy);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundFairy.png");
}
.sheet-darkmode input.sheet-color-setting[value="fighting"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="fighting"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-fighting-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-fighting);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundFighting.png");
}
.sheet-darkmode input.sheet-color-setting[value="fire"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="fire"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-fire-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-fire);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundFire.png");
}
.sheet-darkmode input.sheet-color-setting[value="flying"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="flying"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-flying-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-flying);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundFlying.png");
}
.sheet-darkmode input.sheet-color-setting[value="ghost"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="ghost"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-ghost-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-ghost);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundGhost.png");
}
.sheet-darkmode input.sheet-color-setting[value="grass"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="grass"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-grass-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-grass);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundGrass.png");
}
.sheet-darkmode input.sheet-color-setting[value="ground"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="ground"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-ground-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-ground);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundGround.png");
}
.sheet-darkmode input.sheet-color-setting[value="ice"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="ice"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-ice-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-ice);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundIce.png");
}
.sheet-darkmode input.sheet-color-setting[value="normal"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="normal"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-normal-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-normal);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundNormal.png");
}
.sheet-darkmode input.sheet-color-setting[value="poison"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="poison"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-poison-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-poison);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundPoison.png");
}
.sheet-darkmode input.sheet-color-setting[value="psychic"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="psychic"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-psychic-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-psychic);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundPsychic.png");
}
.sheet-darkmode input.sheet-color-setting[value="rock"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="rock"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-rock-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-rock);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundRock.png");
}
.sheet-darkmode input.sheet-color-setting[value="steel"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="steel"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-steel-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-steel);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundSteel.png");
}
.sheet-darkmode input.sheet-color-setting[value="typeless"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="typeless"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-typeless-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-typeless);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundTypeless.png");
}
.sheet-darkmode input.sheet-color-setting[value="water"] ~ div.sheet-wrapper,
.sheet-darkmode input.sheet-color-setting-move[value="water"] ~ div.sheet-pokemon-move {
--background-color: var(--poke-water-dark);
--background-color: var(--poke-all-dark);
--foreground-color: var(--poke-water);
--text-background-color: var(--poke-all-dark-background);
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/darkPokeballBackgroundWater.png");
}
.sheet-darkmode input[type="text"],
.sheet-darkmode input[type="number"],
.sheet-darkmode select,
.sheet-darkmode textarea {
color: #eeeeee;
color: #dddddd;
}
.sheet-darkmode option {
@@ -426,7 +451,7 @@ input.sheet-color-setting-move[value="water"] ~ div.sheet-pokemon-move {
.sheet-darkmode input.sheet-spdef-color[type="number"],
.sheet-darkmode input.sheet-speed-color[type="number"],
.sheet-darkmode input.sheet-skill-total[type="number"]{
color: #333333;
color: #222222;
}
div.sheet-wrapper b,
@@ -436,16 +461,52 @@ div.sheet-pokemon-move p {
color: var(--foreground-color);
}
button,
.repcontrol button {
background-color: #ffffff40;
background-image: none;
border: 1px solid #333333;
border-radius: 4px;
color: black;
padding: 2px 6px;
cursor: pointer;
box-shadow: 0 4px 4px 0 rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.19);
}
button:hover,
.repcontrol button:hover {
background-color: #ffffff80;
}
.sheet-darkmode button,
.sheet-darkmode .repcontrol button {
background-color: #00000040;
border: 1px solid #cccccc;
border-radius: 4px;
color: white;
}
.sheet-darkmode button:hover,
.sheet-darkmode .repcontrol button:hover {
background-color: #00000080;
}
div.sheet-configuration-page h2 {
color: var(--foreground-color);
margin-bottom: 12px;
margin-top: 24px;
}
div.sheet-configuration-page p.sheet-dark-text {
div.sheet-configuration-page p.sheet-dark-text,
div.sheet-configuration-page span.sheet-dark-text {
color: inherit;
}
.sheet-darkmode div.sheet-configuration-page p.sheet-dark-text,
.sheet-darkmode div.sheet-configuration-page span.sheet-dark-text {
color: #dddddd;
}
div.sheet-pokemon-move span.sheet-readonly-field,
div.sheet-pokemon-move span.sheet-readonly-field input[type="number"] {
border: none;
@@ -460,6 +521,13 @@ div.sheet-collapsible-feature {
border-color: var(--foreground-color);
}
div.sheet-pokemon-move {
background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/whitePokeballBackgroundSmall.png");
background-position: right top;
background-repeat: no-repeat;
background-size: 150px;
}
/* End fancy colors */
div.sheet-character-stat-grid b,
@@ -977,6 +1045,10 @@ button[type="roll"].sheet-skill-roller:hover {
text-shadow: none;
}
.sheet-darkmode button[type="roll"].sheet-stat-roller {
color: #222222;
}
button[type="roll"].sheet-stat-roller:active {
box-shadow: inset 0 1px 2px #00000080, 0 1px 2px #ffffff80;
transition-duration: 0.1s;
@@ -1029,6 +1101,18 @@ button[type="roll"].sheet-stat-roller:hover {
text-transform: capitalize;
}
.sheet-rolltemplate-darkmode.sheet-rolltemplate-move-roll,
.sheet-rolltemplate-darkmode.sheet-rolltemplate-dual-hit-move-roll,
.sheet-rolltemplate-darkmode.sheet-rolltemplate-multi-hit-move-roll,
.sheet-rolltemplate-darkmode.sheet-rolltemplate-triple-hit-move-roll,
.sheet-rolltemplate-darkmode.sheet-rolltemplate-feature-output,
.sheet-rolltemplate-darkmode.sheet-rolltemplate-skill-roll {
--header-text: #dddddd;
--main-text: #dddddd;
--odd-row-bg: #303030;
--row-bg: #404040;
}
.sheet-rolltemplate-color-setting-bug-move {
--border-color: var(--poke-bug-shaded);
--box-bg: linear-gradient(var(--header-bg), var(--border-color));
@@ -1173,6 +1257,104 @@ button[type="roll"].sheet-stat-roller:hover {
--header-bg: var(--spd-header);
}
/* Dark mode */
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-bug-move {
--header-bg: var(--poke-bug-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-dark-move {
--header-bg: var(--poke-dark-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-dragon-move {
--header-bg: var(--poke-dragon-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-electric-move {
--header-bg: var(--poke-electric-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-fairy-move {
--header-bg: var(--poke-fairy-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-fighting-move {
--header-bg: var(--poke-fighting-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-fire-move {
--header-bg: var(--poke-fire-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-flying-move {
--header-bg: var(--poke-flying-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-ghost-move {
--header-bg: var(--poke-ghost-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-grass-move {
--header-bg: var(--poke-grass-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-ground-move {
--header-bg: var(--poke-ground-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-ice-move {
--header-bg: var(--poke-ice-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-normal-move {
--header-bg: var(--poke-normal-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-poison-move {
--header-bg: var(--poke-poison-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-psychic-move {
--header-bg: var(--poke-psychic-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-rock-move {
--header-bg: var(--poke-rock-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-steel-move {
--header-bg: var(--poke-steel-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-typeless-move {
--header-bg: var(--poke-typeless-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-water-move {
--header-bg: var(--poke-water-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-atk-skill {
--header-bg: var(--atk-header-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-def-skill {
--header-bg: var(--def-header-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-spatk-skill {
--header-bg: var(--spatk-header-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-spdef-skill {
--header-bg: var(--spdef-header-dark);
}
.sheet-rolltemplate-darkmode .sheet-rolltemplate-color-setting-spd-skill {
--header-bg: var(--spd-header-dark);
}
.sheet-rolltemplate-move-roll .sheet-container hr.sheet-border,
.sheet-rolltemplate-dual-hit-move-roll .sheet-container hr.sheet-border,
.sheet-rolltemplate-multi-hit-move-roll .sheet-container hr.sheet-border,
+2 -2
View File
@@ -1296,7 +1296,7 @@
</div>
<div class="sheet-json-import sheet-show-on-mobile">
<textarea name="attr_json_import" title="Attribute: json_import" type="text"></textarea>
<span name="attr_json_import_response" ></span>
<span class="sheet-dark-text" name="attr_json_import_response" ></span>
</div>
<div class="sheet-json-export">
<b>Character Data Export</b>
@@ -1308,7 +1308,7 @@
</div>
<div class="sheet-json-import sheet-hide-on-mobile">
<textarea name="attr_json_import" title="Attribute: json_import" type="text"></textarea>
<span name="attr_json_import_response" ></span>
<span class="sheet-dark-text" name="attr_json_import_response" ></span>
</div>
<div class="sheet-json-export">
<textarea name="attr_json_export" title="Attribute: json_export" type="text"></textarea>
+12 -1
View File
@@ -16,7 +16,7 @@ Things we want to add to the character sheet, presented in no particular order o
- [X] Reasonable user experience on the Companion App
- [ ] Full "optimized for use" support for Companion App
- [X] Support Dark Mode sheet
- [ ] Support Dark Mode roll templates
- [X] Support Dark Mode roll templates
- [ ] Allow a second ability score to apply to skill checks
- [ ] Allow formula calculations for the extra damage fields
- [ ] Refactor the sheet workers to remove the cascading change observation; each `setAttrs` call takes way too long, so we want to capitalise on making them as low as possible
@@ -24,6 +24,17 @@ Things we want to add to the character sheet, presented in no particular order o
## Changelog
### Mar 27, 2022
- Reworked dark mode colors
- First dark mode attempt was pretty awful in terms of color theory and not being painful to look at over time.
- This time, took a totally different approach based on community feedback
- Roll templates now work in dark mode thanks to sheet-rolltemplate-darkmode existing now
- Buttons restyled and are no longer jarringly out of place
### Mar 24, 2022
- Water type background is always light - fixed
- Electric type text background in light mode is weird - fixed
### Mar 12th, 2022
- Removed some old legacy load-time backwards compatibility scripts. Nobody needs this anymore and it slows down the sheet.
- Set legacy to false, and updated things to make sure that the sheets still work the same way.
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB