| 1 |
/* Copyright 2015 Bloomberg Finance L.P. |
| 2 |
* |
| 3 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
* you may not use this file except in compliance with the License. |
| 5 |
* You may obtain a copy of the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software |
| 10 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
* See the License for the specific language governing permissions and |
| 13 |
* limitations under the License. |
| 14 |
*/ |
| 15 |
|
| 16 |
:root { |
| 17 |
--bq-content-font-color: var(--jp-content-font-color1); |
| 18 |
--bq-content-scatter-font-color: var(--jp-content-font-color1); |
| 19 |
--bq-background: var(--jp-layout-color0); |
| 20 |
--bq-font: 12px sans-serif; |
| 21 |
|
| 22 |
--bq-axislabel-font: 14px sans-serif; |
| 23 |
|
| 24 |
--bq-axis-rect-opacity: 1; |
| 25 |
--bq-axis-tick-stroke-width: 1; |
| 26 |
--bq-axis-tick-opacity: 1; |
| 27 |
--bq-axis-tick-text-font: var(--bq-font); |
| 28 |
|
| 29 |
--bq-mark-tooltip-border-radius: 5px; |
| 30 |
--bq-mark-tooltip--webkit-user-select: none; |
| 31 |
--bq-mark-tooltip--moz-user-select: none; |
| 32 |
|
| 33 |
--bq-mainheading-font: 16px sans-serif; |
| 34 |
--bq-mainheading-font-size: large; |
| 35 |
|
| 36 |
--bq-world-map-path-stroke-width: 0.25px; |
| 37 |
|
| 38 |
--bq-pie-polyline-stroke-width: 1px; |
| 39 |
--bq-pie-polyline-fill: none; |
| 40 |
|
| 41 |
--bq-network-node-element-stroke: #000; |
| 42 |
--bq-network-node-element-stroke-width: 1.5px; |
| 43 |
|
| 44 |
--bq-network-link-fill: none; |
| 45 |
--bq-network-link-stroke: #666; |
| 46 |
--bq-network-link-stroke-width: 1.5px; |
| 47 |
|
| 48 |
--bq-network-node-label-pointer-events: none; |
| 49 |
--bq-network-node-label-font: var(--bq-font); |
| 50 |
|
| 51 |
--bq-selector-fill: var(--jp-border-color1); |
| 52 |
|
| 53 |
--bq-network-node-label-text-fill: #000; |
| 54 |
|
| 55 |
--bq-mark-tooltip-border: 2px solid var(--jp-border-color0); |
| 56 |
--bq-mark-tooltip-box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), |
| 57 |
0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); |
| 58 |
--bq-mark-tooltip-background-color: var(--jp-layout-color0); |
| 59 |
--bq-mark-tooltip-td-border: 1px solid var(--jp-border-color1); |
| 60 |
|
| 61 |
--bq-world-map-path-stroke: black; |
| 62 |
--bq-world-map-path-fill: seagreen; |
| 63 |
|
| 64 |
--bq-pie-polyline-opacity: 0.3; |
| 65 |
--bq-pie-polyline-stroke: var(--bq-content-font-color); |
| 66 |
|
| 67 |
--bq-network-node-element-fill: #666; |
| 68 |
--bq-linkarrow-fill-dark: rgb(0, 0, 0); |
| 69 |
--bq-linkarrow-fill-light: #666; |
| 70 |
|
| 71 |
--bq-default-stroke: var(--bq-content-font-color); |
| 72 |
--bq-stick-stroke: var(--bq-content-font-color); |
| 73 |
--bq-stick-fill: var(--bq-content-font-color); |
| 74 |
--bq-sticktext-fill: var(--bq-content-font-color); |
| 75 |
} |
| 76 |
|
| 77 |
/* |
| 78 |
* gg and classic bqplot themes differ in the styling of the svg-background. |
| 79 |
* |
| 80 |
* plot area background fill: |
| 81 |
* - gg: contrasted with the jupyterlab background. var(--jp-layout-color2); |
| 82 |
* - classic: less contrasted: var(--jp-layout-color1); |
| 83 |
* |
| 84 |
* tick text fill: |
| 85 |
* - gg: less contrasted with background: var(--jp-content-font-color2); |
| 86 |
* - classic: more contrasted with background: var(--jp-content-font-color1); |
| 87 |
* |
| 88 |
* grid, axes, and tick colors: |
| 89 |
* - gg: grid, axes, and tick marks are all of the same (grid) color |
| 90 |
* - classic: grid has little contrast with respect to the background while the axes, |
| 91 |
* and tick marks are more contrasted. |
| 92 |
*/ |
| 93 |
|
| 94 |
.common() { |
| 95 |
--bq-mainheading-fill: var(--bq-content-font-color); |
| 96 |
--bq-axislabel-fill: var(--bq-content-font-color); |
| 97 |
} |
| 98 |
|
| 99 |
.gg { |
| 100 |
--bq-plotarea-background-fill: var(--jp-layout-color2); |
| 101 |
--bq-axis-tick-text-fill: var(--jp-content-font-color2); |
| 102 |
|
| 103 |
--bq-grid-color: var(--jp-layout-color0); |
| 104 |
--bq-axis-rect-stroke: var(--bq-grid-color); |
| 105 |
--bq-axis-path-stroke: var(--bq-grid-color); |
| 106 |
--bq-axis-tick-stroke: var(--bq-grid-color); |
| 107 |
--bq-axis-tick-short-stroke: var(--bq-grid-color); |
| 108 |
|
| 109 |
.common(); |
| 110 |
} |
| 111 |
|
| 112 |
[data-jp-theme-light='false'] .gg { |
| 113 |
--bq-plotarea-background-fill: var(--jp-layout-color1); |
| 114 |
} |
| 115 |
|
| 116 |
[data-jp-theme-light='false'] .linkarrow { |
| 117 |
fill: var(--bq-linkarrow-fill-light); |
| 118 |
} |
| 119 |
|
| 120 |
[data-jp-theme-light='false'] .network .node .label { |
| 121 |
--bq-network-node-label-text-fill: #727272; |
| 122 |
} |
| 123 |
|
| 124 |
.classic { |
| 125 |
--bq-plotarea-background-fill: var(--jp-layout-color0); |
| 126 |
--bq-axis-tick-text-fill: var(--jp-content-font-color2); |
| 127 |
|
| 128 |
--bq-grid-color: var(--jp-layout-color2); |
| 129 |
--bq-axis-border-color: var(--jp-content-font-color2); |
| 130 |
--bq-axis-path-stroke: var(--bq-axis-border-color); |
| 131 |
--bq-axis-rect-stroke: var(--bq-axis-border-color); |
| 132 |
--bq-axis-tick-stroke: var(--bq-grid-color); |
| 133 |
--bq-axis-tick-short-stroke: var(--bq-axis-border-color); |
| 134 |
|
| 135 |
.common(); |
| 136 |
} |
| 137 |
|
| 138 |
.bbg, |
| 139 |
[data-jp-theme-light='false'] { |
| 140 |
--bq-content-font-color: orange; |
| 141 |
|
| 142 |
.common(); |
| 143 |
} |
| 144 |
|
| 145 |
.bqplot { |
| 146 |
box-sizing: border-box; |
| 147 |
display: flex; |
| 148 |
width: auto; |
| 149 |
height: 480px; |
| 150 |
} |
| 151 |
.bqplot > .svg-background { |
| 152 |
position: absolute; |
| 153 |
width: 100%; |
| 154 |
height: 100%; |
| 155 |
z-index: 0; |
| 156 |
} |
| 157 |
.bqplot > canvas { |
| 158 |
position: absolute; |
| 159 |
pointer-events: none; |
| 160 |
z-index: 0; |
| 161 |
} |
| 162 |
.bqplot > svg { |
| 163 |
z-index: 0; |
| 164 |
font: 11px sans-serif; |
| 165 |
user-select: none; |
| 166 |
-ms-user-select: none; |
| 167 |
-khtml-user-select: none; |
| 168 |
-khtml-user-select: none; |
| 169 |
-webkit-user-select: none; |
| 170 |
flex-grow: 1; |
| 171 |
|
| 172 |
.svg-figure { |
| 173 |
background: var(--bq-background); |
| 174 |
} |
| 175 |
|
| 176 |
.axis { |
| 177 |
rect { |
| 178 |
stroke: var(--bq-axis-rect-stroke); |
| 179 |
opacity: var(--bq-axis-rect-opacity); |
| 180 |
} |
| 181 |
.tick line { |
| 182 |
stroke: var(--bq-axis-tick-stroke); |
| 183 |
stroke-width: var(--bq-axis-tick-stroke-width); |
| 184 |
opacity: var(--bq-axis-tick-opacity); |
| 185 |
} |
| 186 |
.tick.short line { |
| 187 |
stroke: var(--bq-axis-tick-short-stroke); |
| 188 |
} |
| 189 |
.tick text { |
| 190 |
fill: var(--bq-axis-tick-text-fill); |
| 191 |
font: var(--bq-axis-tick-text-font); |
| 192 |
} |
| 193 |
line { |
| 194 |
shape-rendering: crispEdges; |
| 195 |
font: 10px sans-serif; |
| 196 |
stroke-width: 1px; |
| 197 |
} |
| 198 |
path, |
| 199 |
line { |
| 200 |
fill: none; |
| 201 |
} |
| 202 |
path { |
| 203 |
stroke: var(--bq-axis-path-stroke); |
| 204 |
} |
| 205 |
|
| 206 |
text.axislabel, |
| 207 |
tspan.axislabel { |
| 208 |
text-anchor: end; |
| 209 |
fill: var(--bq-axislabel-fill); |
| 210 |
font: var(--bq-axislabel-font); |
| 211 |
} |
| 212 |
.tick text { |
| 213 |
cursor: default; |
| 214 |
} |
| 215 |
} |
| 216 |
.axis.axisbold path { |
| 217 |
stroke-width: 3px; |
| 218 |
} |
| 219 |
.axis.axisbold text, |
| 220 |
.axis.axisbold text.axislabel { |
| 221 |
font-weight: bolder; |
| 222 |
} |
| 223 |
.stick, |
| 224 |
.zeroLine { |
| 225 |
stroke: var(--bq-stick-stroke); |
| 226 |
fill: var(--bq-stick-fill); |
| 227 |
} |
| 228 |
.sticktext { |
| 229 |
fill: var(--bq-sticktext-fill); |
| 230 |
} |
| 231 |
.bargroup, |
| 232 |
.boxplot, |
| 233 |
.slice { |
| 234 |
rect, |
| 235 |
path, |
| 236 |
line { |
| 237 |
stroke: var(--bq-default-stroke); |
| 238 |
} |
| 239 |
} |
| 240 |
.zeroLine { |
| 241 |
shape-rendering: crispEdges; |
| 242 |
} |
| 243 |
text.mainheading { |
| 244 |
text-anchor: middle; |
| 245 |
fill: var(--bq-mainheading-fill); |
| 246 |
font: var(--bq-mainheading-font); |
| 247 |
font-size: var(--bq-mainheading-font-size); |
| 248 |
} |
| 249 |
text.legendtext { |
| 250 |
text-anchor: start; |
| 251 |
font: 14px sans-serif; |
| 252 |
} |
| 253 |
text.dot_text { |
| 254 |
fill: var(--bq-content-scatter-font-color); |
| 255 |
} |
| 256 |
.indsel { |
| 257 |
stroke: red; |
| 258 |
} |
| 259 |
.brushintsel { |
| 260 |
text { |
| 261 |
fill: var(--bq-content-font-color); |
| 262 |
font: var(--bq-font); |
| 263 |
text-anchor: middle; |
| 264 |
} |
| 265 |
.selection { |
| 266 |
fill: var(--bq-selector-fill); |
| 267 |
stroke: none; |
| 268 |
} |
| 269 |
} |
| 270 |
.intsel { |
| 271 |
fill: var(--bq-selector-fill); |
| 272 |
stroke: none; |
| 273 |
fill-opacity: 0.3; |
| 274 |
} |
| 275 |
.intselmouse { |
| 276 |
visibility: hidden; |
| 277 |
pointer-events: all; /*none?*/ |
| 278 |
} |
| 279 |
.multiselector { |
| 280 |
.active { |
| 281 |
pointer-events: all; |
| 282 |
.selection { |
| 283 |
stroke: green; |
| 284 |
} |
| 285 |
.overlay { |
| 286 |
pointer-events: all; |
| 287 |
} |
| 288 |
} |
| 289 |
.inactive { |
| 290 |
pointer-events: none; |
| 291 |
.selection { |
| 292 |
stroke: red; |
| 293 |
} |
| 294 |
.overlay { |
| 295 |
pointer-events: none; |
| 296 |
} |
| 297 |
} |
| 298 |
.visible { |
| 299 |
pointer-events: all; |
| 300 |
.selection { |
| 301 |
stroke: red; |
| 302 |
} |
| 303 |
.overlay { |
| 304 |
pointer-events: none; |
| 305 |
} |
| 306 |
} |
| 307 |
} |
| 308 |
.lassoselector { |
| 309 |
.selected { |
| 310 |
opacity: 0.3; |
| 311 |
} |
| 312 |
path { |
| 313 |
fill: none; |
| 314 |
stroke: orange; |
| 315 |
stroke-width: 4; |
| 316 |
} |
| 317 |
} |
| 318 |
.plotarea_background { |
| 319 |
fill: var(--bq-plotarea-background-fill); |
| 320 |
} |
| 321 |
.plotarea_events { |
| 322 |
opacity: 0; // fully transparent, only used for capturing events |
| 323 |
} |
| 324 |
.image_pixelated { |
| 325 |
/* |
| 326 |
optimizespeed does not guarantee nearest neighbor, but firefox seems to do so for now |
| 327 |
https://www.w3.org/TR/SVG/single-page.html#painting-ImageRenderingProperty |
| 328 |
*/ |
| 329 |
image-rendering: optimizespeed; |
| 330 |
image-rendering: pixelated; /* chrome doesn't support optimizespeed */ |
| 331 |
image-rendering: -moz-crisp-edges; /* this is guaranteed to work for firefox */ |
| 332 |
} |
| 333 |
} |
| 334 |
.tooltip_div { |
| 335 |
z-index: 1001; |
| 336 |
} |
| 337 |
.mark_tooltip { |
| 338 |
pointer-events: none; |
| 339 |
z-index: 1001; |
| 340 |
color: var(--bq-content-font-color); |
| 341 |
font: var(--bq-font); |
| 342 |
border: var(--jp-border-width) solid var(--jp-border-color1); |
| 343 |
box-shadow: var(--bq-mark-tooltip-box-shadow); |
| 344 |
background-color: var(--bq-mark-tooltip-background-color); |
| 345 |
-webkit-user-select: var(--bq-mark-tooltip--webkit-user-select); |
| 346 |
-moz-user-select: var(--bq-mark-tooltip--moz-user-select); |
| 347 |
} |
| 348 |
.mark_tooltip > .bqplot.figure { |
| 349 |
width: 427px; |
| 350 |
height: 320px; |
| 351 |
} |
| 352 |
.mark_tooltip .tooltiptext { |
| 353 |
text-align: center; |
| 354 |
padding: 0.5em; |
| 355 |
} |
| 356 |
.world_map path { |
| 357 |
stroke: var(--bq-world-map-path-stroke); |
| 358 |
stroke-width: var(--bq-world-map-path-stroke-width); |
| 359 |
fill: var(--bq-world-map-path-fill); |
| 360 |
} |
| 361 |
.world_map .hovered { |
| 362 |
fill: Orange; |
| 363 |
stroke: Orange; |
| 364 |
stroke-width: 2.5px; |
| 365 |
} |
| 366 |
|
| 367 |
.world_map #container { |
| 368 |
margin: 10px 10%; |
| 369 |
border: 2px solid #000; |
| 370 |
border-radius: 5px; |
| 371 |
height: 100%; |
| 372 |
overflow: hidden; |
| 373 |
background: #f0f8ff; |
| 374 |
} |
| 375 |
|
| 376 |
.world_map .graticule { |
| 377 |
fill: none; |
| 378 |
stroke: #bbb; |
| 379 |
stroke-width: 0.5px; |
| 380 |
stroke-opacity: 0.5; |
| 381 |
} |
| 382 |
|
| 383 |
.g_legend { |
| 384 |
fill: none; |
| 385 |
} |
| 386 |
|
| 387 |
.pie polyline { |
| 388 |
opacity: var(--bq-pie-polyline-opacity); |
| 389 |
stroke: var(--bq-pie-polyline-stroke); |
| 390 |
stroke-width: var(--bq-pie-polyline-stroke-width); |
| 391 |
fill: var(--bq-pie-polyline-fill); |
| 392 |
} |
| 393 |
|
| 394 |
.pie_label { |
| 395 |
fill: var(--bq-content-font-color); |
| 396 |
} |
| 397 |
|
| 398 |
.bar_label, |
| 399 |
.curve_label { |
| 400 |
fill: var(--bq-content-font-color); |
| 401 |
} |
| 402 |
|
| 403 |
.network .node .element { |
| 404 |
fill: var(--bq-network-node-element-fill); |
| 405 |
stroke: var(--bq-network-node-element-stroke); |
| 406 |
stroke-width: var(--bq-network-node-element-stroke-width); |
| 407 |
} |
| 408 |
|
| 409 |
.network .link { |
| 410 |
fill: var(--bq-network-link-fill); |
| 411 |
stroke: var(--bq-network-link-stroke); |
| 412 |
stroke-width: var(--bq-network-link-stroke-width); |
| 413 |
} |
| 414 |
|
| 415 |
.network .node .label { |
| 416 |
font: var(--bq-network-node-label-font); |
| 417 |
pointer-events: var(--bq-network-node-label-pointer-events); |
| 418 |
text-shadow: var(--bq-network-node-label-text-shadow); |
| 419 |
fill: var(--bq-network-node-label-text-fill); |
| 420 |
} |
| 421 |
|
| 422 |
.linkarrow { |
| 423 |
fill: var(--bq-linkarrow-fill-dark); |
| 424 |
} |