Skip to content

Commit

Permalink
Merge pull request #3344 from meeseeksmachine/auto-backport-of-pr-334…
Browse files Browse the repository at this point in the history
…2-on-7.x

Backport PR #3342 on branch 7.x (HTMLManager: Do not reset lab's CSS variables if they are defined)
  • Loading branch information
martinRenou authored Jan 12, 2022
2 parents a2a31ce + 20dc79a commit 02e8963
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit 02e8963

Please sign in to comment.