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

Fix scrollbar color for light mode #36

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions demo/demo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<title>Lichess PGN Viewer</title>
</head>
<body>
<input type="checkbox" id="light-mode-selector"> <label for="checkbox" style="color: #aaa">Light mode</label>
<div class="viewers">
<div><div></div></div>
<div><div class="previous-class"></div></div>
Expand Down
2 changes: 1 addition & 1 deletion demo/lichess-pgn-viewer.demo.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
background: #161512;
background: var(--demo-bg, #161512);
font-family: 'Noto Sans';
--board-color: #886f46;
margin: 0;
Expand Down
24 changes: 13 additions & 11 deletions scss/_scrollbar.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
body ::-webkit-scrollbar,
body ::-webkit-scrollbar-corner {
width: 0.5rem;
background: $lpv-bg;
}
.lpv {
*::-webkit-scrollbar,
*::-webkit-scrollbar-corner {
width: 0.5rem;
background: var(--c-lpv-bg, $lpv-bg);
}

body ::-webkit-scrollbar-thumb {
background: var(--c-lpv-font-bg, $lpv-font-bg);
}
*::-webkit-scrollbar-thumb {
background: var(--c-lpv-font-bg, $lpv-font-bg);
}

body ::-webkit-scrollbar-thumb:hover,
body ::-webkit-scrollbar-thumb:active {
background: $lpv-font-shy;
*::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:active {
background: var(--c-lpv-font-shy, $lpv-font-shy);
}
}
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const defaults: Opts = {
},
analysisBoard: {
enabled: true,
}
},
},
lichess: 'https://lichess.org', // support for Lichess games, with links to the game and players. Set to false to disable.
classes: undefined, // CSS classes to set on the root element. Defaults to the element classes before being replaced by LPV.
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export interface Opts {
};
analysisBoard?: {
enabled?: boolean;
}
};
};
lichess: Lichess;
classes?: string;
Expand Down
Loading