forked from jupyterlab/jupyterlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dark High Contrast Theme for JupyterLab with Improved Sidebar Focus I…
…ndication (jupyterlab#15623) * Added a high contrast dark theme * Updated variables to improve contrast and improved focus indication on sidebars * Added a test for toggling high contrast theme * Changed theme name * Updated versions in package.json * Update Playwright Snapshots * Update version numbers in package.json * Updated snapshots * Update package.json * Update package.json * Update package.json * Update package.json - missed quotation marks * Update package.json version numbers * Update package.json * Made naming more consistent * Updated naming in test helpers * Update package.json * Update package.json --------- Co-authored-by: EC2 Default User <m158261@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
- Loading branch information
Showing
21 changed files
with
654 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+454 Bytes
(110%)
...yterlab/menus.test.ts-snapshots/opened-menu-settings-theme-jupyterlab-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @jupyterlab/theme-dark-high-contrast-extension | ||
|
||
A JupyterLab theme extension which provides a dark high contrast theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "@jupyterlab/theme-dark-high-contrast-extension", | ||
"version": "4.2.0-beta.0", | ||
"description": "JupyterLab - Dark High Contrast Theme", | ||
"homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"bugs": { | ||
"url": "https://github.com/jupyterlab/jupyterlab/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/jupyterlab.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Project Jupyter", | ||
"sideEffects": true, | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"lib": "lib/" | ||
}, | ||
"files": [ | ||
"lib/*.d.ts", | ||
"lib/*.js.map", | ||
"lib/*.js", | ||
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}", | ||
"style/index.js", | ||
"src/**/*.{ts,tsx}" | ||
], | ||
"scripts": { | ||
"build": "tsc -b", | ||
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", | ||
"watch": "tsc -b --watch" | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/application": "^4.2.0-beta.0", | ||
"@jupyterlab/apputils": "^4.3.0-beta.0", | ||
"@jupyterlab/translation": "^4.2.0-beta.0" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~5.0.5", | ||
"typedoc": "~0.24.7", | ||
"typescript": "~5.1.6" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"jupyterlab": { | ||
"extension": true, | ||
"themePath": "style/theme.css" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
/** | ||
* @packageDocumentation | ||
* @module theme-dark-high-contrast-extension | ||
*/ | ||
|
||
import { | ||
JupyterFrontEnd, | ||
JupyterFrontEndPlugin | ||
} from '@jupyterlab/application'; | ||
import { IThemeManager } from '@jupyterlab/apputils'; | ||
import { ITranslator } from '@jupyterlab/translation'; | ||
|
||
/** | ||
* A plugin for the Jupyter Dark Theme. | ||
*/ | ||
const plugin: JupyterFrontEndPlugin<void> = { | ||
id: '@jupyterlab/theme-dark-high-contrast-extension:plugin', | ||
description: 'Adds a dark high contrast theme.', | ||
requires: [IThemeManager, ITranslator], | ||
activate: ( | ||
app: JupyterFrontEnd, | ||
manager: IThemeManager, | ||
translator: ITranslator | ||
) => { | ||
const trans = translator.load('jupyterlab'); | ||
const style = '@jupyterlab/theme-dark-high-contrast-extension/index.css'; | ||
manager.register({ | ||
name: 'JupyterLab Dark High Contrast', | ||
displayName: trans.__('JupyterLab Dark High Contrast'), | ||
isLight: false, | ||
themeScrollbars: true, | ||
load: () => manager.loadCSS(style), | ||
unload: () => Promise.resolve(undefined) | ||
}); | ||
}, | ||
autoStart: true | ||
}; | ||
|
||
export default plugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */ | ||
@import url('~@jupyterlab/apputils/style/index.css'); | ||
@import url('~@jupyterlab/application/style/index.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */ | ||
import '@jupyterlab/apputils/style/index.js'; | ||
import '@jupyterlab/application/style/index.js'; |
26 changes: 26 additions & 0 deletions
26
packages/theme-dark-high-contrast-extension/style/theme.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
@import './variables.css'; | ||
|
||
/* Set the default typography for monospace elements */ | ||
tt, | ||
code, | ||
kbd, | ||
samp, | ||
pre { | ||
font-family: var(--jp-code-font-family); | ||
font-size: var(--jp-code-font-size); | ||
line-height: var(--jp-code-line-height); | ||
} | ||
|
||
/* fix illegible yellow backround in exception stacktrace */ | ||
:where( | ||
.jp-RenderedText[data-mime-type='application/vnd.jupyter.stderr'] | ||
pre | ||
.ansi-yellow-bg | ||
) { | ||
color: black; | ||
} |
Oops, something went wrong.