Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with Some Styling Variables for Themes #789

Closed
psygo opened this issue May 24, 2021 · 5 comments
Closed

Help with Some Styling Variables for Themes #789

psygo opened this issue May 24, 2021 · 5 comments

Comments

@psygo
Copy link

psygo commented May 24, 2021

I'm trying to create some new themes of my own but have encountered 2 issues with trying to modify the following characteristics:

  • The grid color
  • Sabaki's background to the Go board — I've only managed to do it outside the .asar file, inside the preferences' theming tab

Are there ways of modifying those characteristics and embed them in the .asar file? If so, is there documentation about it — I couldn't find it neither here nor here —?

Additionally, are there ways of modifying more of Sabaki's styles through CSS?

And does anyone know how to open the inspector on Linux? I've tried googling it and using the shortcuts I use on my browser and on Windows but nothing really worked.

@ParmuzinAlexander
Copy link
Contributor

Grid color
.shudan-goban {--shudan-board-foreground-color: #000;}
Board color

.shudan-goban {--shudan-board-background-color: #FFF;}
.shudan-goban-image {background-image: none;}

You may be interested in some of the tricks that I personally use.
P.S. Disable bar very extreme change, use only background settings for fixing bug #542

/* Stones texture */
.shudan-stone-image.shudan-sign_1 {background-image: url('0.png');}
.shudan-stone-image.shudan-sign_-1 {background-image: url('1.png');}
.shudan-stone-image.shudan-sign_-1.shudan-random_1 {background-image: url('2.png');}
.shudan-stone-image.shudan-sign_-1.shudan-random_2 {background-image: url('3.png');}
.shudan-stone-image.shudan-sign_-1.shudan-random_3 {background-image: url('4.png');}
.shudan-stone-image.shudan-sign_-1.shudan-random_4 {background-image: url('5.png');}
/* 100% stones size */
.shudan-vertex .shudan-stone {top: 0; left: 0; width: 100%; height: 100%;}
/* Black lines and disable borders */
.shudan-goban {--shudan-board-border-width: 0; --shudan-board-foreground-color: #000;}
.shudan-goban:not(.shudan-coordinates) {padding: 0;}
/* Board texture */
.shudan-goban-image {background-image: url('board1.png');}
/* Disable stones shadow */
.shudan-vertex:not(.shudan-sign_0) .shudan-shadow {background: none; box-shadow: none;}
/* Disable bar */
#bar {visibility: hidden;}
main {bottom: 0; background: #f0f0f0 url('background1.png') left top;}
/* Disable goban shadow */
#goban {box-shadow: none;}
/* Disable last move marker */
.shudan-vertex.shudan-marker_point.shudan-sign_1 .shudan-marker {background: none;}
.shudan-vertex.shudan-marker_point.shudan-sign_-1 .shudan-marker {background: none;}
/* Heat map */
.shudan-vertex .shudan-heat {transition: opacity 0s, box-shadow 0s;}
.shudan-vertex.shudan-heat_9 .shudan-heat {background: #009900; box-shadow: 0 0 0 .5em #009900; opacity: 1;}
.shudan-vertex.shudan-heat_8 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_7 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_6 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_5 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_4 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_3 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_2 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex.shudan-heat_1 .shudan-heat {background: none; box-shadow: none; opacity: 1;}
.shudan-vertex .shudan-heatlabel {color: white; font-size: .38em; line-height: 1; text-shadow: none; opacity: 1;}

@psygo
Copy link
Author

psygo commented Jun 11, 2021

.shudan-goban {
    --shudan-board-foreground-color: #FFF; 
}

solved the color of the grid for me. Thanks a lot, @ParmuzinAlexander. Before I close this issue, could you please leave a reference to where you ended up finding all these properties?

@ParmuzinAlexander
Copy link
Contributor

@psygo Source code like https://github.com/SabakiHQ/Shudan/blob/master/css/goban.css or inspect web version https://github.com/SabakiHQ/Sabaki/releases/download/v0.43.3/sabaki-v0.43.3-web.zip
But after adding settings for textures, I don't see the point in simple themes. Maybe things like custom Heat map in lizzie \ katrain style will be more useful. Using themes as an addon or plugin, unfortunately only one...

@psygo
Copy link
Author

psygo commented Jun 12, 2021

I wish there were more documentation for all this. Even the names are not quite great — how am I supposed to guess --shudan-board-foreground-color means the grid color? Anyway, I think this will do for now.

@psygo psygo closed this as completed Jun 12, 2021
@yishn
Copy link
Member

yishn commented Sep 16, 2021

For future reference: https://github.com/SabakiHQ/Shudan/blob/master/docs/README.md#styling

Foreground color also refers to marker/label/arrow/line color on non-stone vertices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants