|
| 1 | +/*----------------------------------------------------------------------------- |
| 2 | +| Copyright (c) Jupyter Development Team. |
| 3 | +| Distributed under the terms of the Modified BSD License. |
| 4 | +|----------------------------------------------------------------------------*/ |
| 5 | + |
| 6 | +/* |
| 7 | +This file is copied from the JupyterLab project to define default styling for |
| 8 | +when the widget styling is compiled down to eliminate CSS variables. We make one |
| 9 | +change - we comment out the font import below. |
| 10 | +*/ |
| 11 | + |
| 12 | +@import "./materialcolors.css"; |
| 13 | + |
| 14 | +/* |
| 15 | +The following CSS variables define the main, public API for styling JupyterLab. |
| 16 | +These variables should be used by all plugins wherever possible. In other |
| 17 | +words, plugins should not define custom colors, sizes, etc unless absolutely |
| 18 | +necessary. This enables users to change the visual theme of JupyterLab |
| 19 | +by changing these variables. |
| 20 | +
|
| 21 | +Many variables appear in an ordered sequence (0,1,2,3). These sequences |
| 22 | +are designed to work well together, so for example, `--jp-border-color1` should |
| 23 | +be used with `--jp-layout-color1`. The numbers have the following meanings: |
| 24 | +
|
| 25 | +* 0: super-primary, reserved for special emphasis |
| 26 | +* 1: primary, most important under normal situations |
| 27 | +* 2: secondary, next most important under normal situations |
| 28 | +* 3: tertiary, next most important under normal situations |
| 29 | +
|
| 30 | +Throughout JupyterLab, we are mostly following principles from Google's |
| 31 | +Material Design when selecting colors. We are not, however, following |
| 32 | +all of MD as it is not optimized for dense, information rich UIs. |
| 33 | +*/ |
| 34 | + |
| 35 | + |
| 36 | +/* |
| 37 | + * Optional monospace font for input/output prompt. |
| 38 | + */ |
| 39 | + /* Commented out in ipywidgets since we don't need it. */ |
| 40 | +/* @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); */ |
| 41 | + |
| 42 | +/* |
| 43 | + * Added for compabitility with output area |
| 44 | + */ |
| 45 | +:root { |
| 46 | + --jp-icon-search: none; |
| 47 | + --jp-ui-select-caret: none; |
| 48 | +} |
| 49 | + |
| 50 | + |
| 51 | +:root { |
| 52 | + |
| 53 | + /* Borders |
| 54 | +
|
| 55 | + The following variables, specify the visual styling of borders in JupyterLab. |
| 56 | + */ |
| 57 | + |
| 58 | + --jp-border-width: 1px; |
| 59 | + --jp-border-color0: var(--md-grey-700); |
| 60 | + --jp-border-color1: var(--md-grey-500); |
| 61 | + --jp-border-color2: var(--md-grey-300); |
| 62 | + --jp-border-color3: var(--md-grey-100); |
| 63 | + |
| 64 | + /* UI Fonts |
| 65 | +
|
| 66 | + The UI font CSS variables are used for the typography all of the JupyterLab |
| 67 | + user interface elements that are not directly user generated content. |
| 68 | + */ |
| 69 | + |
| 70 | + --jp-ui-font-scale-factor: 1.2; |
| 71 | + --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor)); |
| 72 | + --jp-ui-font-size1: 13px; /* Base font size */ |
| 73 | + --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor)); |
| 74 | + --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor)); |
| 75 | + --jp-ui-icon-font-size: 14px; /* Ensures px perfect FontAwesome icons */ |
| 76 | + --jp-ui-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; |
| 77 | + |
| 78 | + /* Use these font colors against the corresponding main layout colors. |
| 79 | + In a light theme, these go from dark to light. |
| 80 | + */ |
| 81 | + |
| 82 | + --jp-ui-font-color0: rgba(0,0,0,1.0); |
| 83 | + --jp-ui-font-color1: rgba(0,0,0,0.8); |
| 84 | + --jp-ui-font-color2: rgba(0,0,0,0.5); |
| 85 | + --jp-ui-font-color3: rgba(0,0,0,0.3); |
| 86 | + |
| 87 | + /* Use these against the brand/accent/warn/error colors. |
| 88 | + These will typically go from light to darker, in both a dark and light theme |
| 89 | + */ |
| 90 | + |
| 91 | + --jp-inverse-ui-font-color0: rgba(255,255,255,1); |
| 92 | + --jp-inverse-ui-font-color1: rgba(255,255,255,1.0); |
| 93 | + --jp-inverse-ui-font-color2: rgba(255,255,255,0.7); |
| 94 | + --jp-inverse-ui-font-color3: rgba(255,255,255,0.5); |
| 95 | + |
| 96 | + /* Content Fonts |
| 97 | +
|
| 98 | + Content font variables are used for typography of user generated content. |
| 99 | + */ |
| 100 | + |
| 101 | + --jp-content-font-size: 13px; |
| 102 | + --jp-content-line-height: 1.5; |
| 103 | + --jp-content-font-color0: black; |
| 104 | + --jp-content-font-color1: black; |
| 105 | + --jp-content-font-color2: var(--md-grey-700); |
| 106 | + --jp-content-font-color3: var(--md-grey-500); |
| 107 | + |
| 108 | + --jp-ui-font-scale-factor: 1.2; |
| 109 | + --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor)); |
| 110 | + --jp-ui-font-size1: 13px; /* Base font size */ |
| 111 | + --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor)); |
| 112 | + --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor)); |
| 113 | + |
| 114 | + --jp-code-font-size: 13px; |
| 115 | + --jp-code-line-height: 1.307; |
| 116 | + --jp-code-padding: 5px; |
| 117 | + --jp-code-font-family: monospace; |
| 118 | + |
| 119 | + |
| 120 | + /* Layout |
| 121 | +
|
| 122 | + The following are the main layout colors use in JupyterLab. In a light |
| 123 | + theme these would go from light to dark. |
| 124 | + */ |
| 125 | + |
| 126 | + --jp-layout-color0: white; |
| 127 | + --jp-layout-color1: white; |
| 128 | + --jp-layout-color2: var(--md-grey-200); |
| 129 | + --jp-layout-color3: var(--md-grey-400); |
| 130 | + |
| 131 | + /* Brand/accent */ |
| 132 | + |
| 133 | + --jp-brand-color0: var(--md-blue-700); |
| 134 | + --jp-brand-color1: var(--md-blue-500); |
| 135 | + --jp-brand-color2: var(--md-blue-300); |
| 136 | + --jp-brand-color3: var(--md-blue-100); |
| 137 | + |
| 138 | + --jp-accent-color0: var(--md-green-700); |
| 139 | + --jp-accent-color1: var(--md-green-500); |
| 140 | + --jp-accent-color2: var(--md-green-300); |
| 141 | + --jp-accent-color3: var(--md-green-100); |
| 142 | + |
| 143 | + /* State colors (warn, error, success, info) */ |
| 144 | + |
| 145 | + --jp-warn-color0: var(--md-orange-700); |
| 146 | + --jp-warn-color1: var(--md-orange-500); |
| 147 | + --jp-warn-color2: var(--md-orange-300); |
| 148 | + --jp-warn-color3: var(--md-orange-100); |
| 149 | + |
| 150 | + --jp-error-color0: var(--md-red-700); |
| 151 | + --jp-error-color1: var(--md-red-500); |
| 152 | + --jp-error-color2: var(--md-red-300); |
| 153 | + --jp-error-color3: var(--md-red-100); |
| 154 | + |
| 155 | + --jp-success-color0: var(--md-green-700); |
| 156 | + --jp-success-color1: var(--md-green-500); |
| 157 | + --jp-success-color2: var(--md-green-300); |
| 158 | + --jp-success-color3: var(--md-green-100); |
| 159 | + |
| 160 | + --jp-info-color0: var(--md-cyan-700); |
| 161 | + --jp-info-color1: var(--md-cyan-500); |
| 162 | + --jp-info-color2: var(--md-cyan-300); |
| 163 | + --jp-info-color3: var(--md-cyan-100); |
| 164 | + |
| 165 | + /* Cell specific styles */ |
| 166 | + |
| 167 | + --jp-cell-padding: 5px; |
| 168 | + --jp-cell-editor-background: #f7f7f7; |
| 169 | + --jp-cell-editor-border-color: #cfcfcf; |
| 170 | + --jp-cell-editor-background-edit: var(--jp-ui-layout-color1); |
| 171 | + --jp-cell-editor-border-color-edit: var(--jp-brand-color1); |
| 172 | + --jp-cell-prompt-width: 100px; |
| 173 | + --jp-cell-prompt-font-family: 'Roboto Mono', monospace; |
| 174 | + --jp-cell-prompt-letter-spacing: 0px; |
| 175 | + --jp-cell-prompt-opacity: 1.0; |
| 176 | + --jp-cell-prompt-opacity-not-active: 0.4; |
| 177 | + --jp-cell-prompt-font-color-not-active: var(--md-grey-700); |
| 178 | + /* A custom blend of MD grey and blue 600 |
| 179 | + * See https://meyerweb.com/eric/tools/color-blend/#546E7A:1E88E5:5:hex */ |
| 180 | + --jp-cell-inprompt-font-color: #307FC1; |
| 181 | + /* A custom blend of MD grey and orange 600 |
| 182 | + * https://meyerweb.com/eric/tools/color-blend/#546E7A:F4511E:5:hex */ |
| 183 | + --jp-cell-outprompt-font-color: #BF5B3D; |
| 184 | + |
| 185 | + /* Notebook specific styles */ |
| 186 | + |
| 187 | + --jp-notebook-padding: 10px; |
| 188 | + --jp-notebook-scroll-padding: 100px; |
| 189 | + |
| 190 | + /* Console specific styles */ |
| 191 | + |
| 192 | + --jp-console-background: var(--md-grey-100); |
| 193 | + |
| 194 | + /* Toolbar specific styles */ |
| 195 | + |
| 196 | + --jp-toolbar-border-color: var(--md-grey-400); |
| 197 | + --jp-toolbar-micro-height: 8px; |
| 198 | + --jp-toolbar-background: var(--jp-layout-color0); |
| 199 | + --jp-toolbar-box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.24); |
| 200 | + --jp-toolbar-header-margin: 4px 4px 0px 4px; |
| 201 | + --jp-toolbar-active-background: var(--md-grey-300); |
| 202 | +} |
0 commit comments