Skip to content

Backport PR #3342 on branch 7.x (HTMLManager: Do not reset lab's CSS variables if they are defined) #3344

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

Merged
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
11 changes: 10 additions & 1 deletion packages/html-manager/src/libembed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ __webpack_public_path__ = (window as any).__jupyter_widgets_assets_path__ || __w

import 'font-awesome/css/font-awesome.css';
import '@lumino/widgets/style/index.css';
import '@jupyter-widgets/controls/css/widgets.css';
import '@jupyter-widgets/controls/css/widgets-base.css';

// If lab variables are not found, we set them (we don't want to reset the variables if they are already defined)
if (
getComputedStyle(document.documentElement).getPropertyValue(
'--jp-layout-color0'
) === ''
) {
require('@jupyter-widgets/controls/css/labvariables.css');
}

// Used just for the typing. We must not import the javascript because we don't
// want to include it in the require embedding.
Expand Down