JAVASCRIPT   36
plotcss
Guest on 1st February 2023 01:26:45 AM


  1. 'use strict';
  2.  
  3. var Lib = require('../src/lib');
  4. var rules = {
  5.     "X,X div": "direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;",
  6.     "X input,X button": "font-family:'Open Sans', verdana, arial, sans-serif;",
  7.     "X input:focus,X button:focus": "outline:none;",
  8.     "X a": "text-decoration:none;",
  9.     "X a:hover": "text-decoration:none;",
  10.     "X .crisp": "shape-rendering:crispEdges;",
  11.     "X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;",
  12.     "X svg": "overflow:hidden;",
  13.     "X svg a": "fill:#447adb;",
  14.     "X svg a:hover": "fill:#3c6dc5;",
  15.     "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;",
  16.     "X .main-svg .draglayer": "pointer-events:all;",
  17.     "X .cursor-default": "cursor:default;",
  18.     "X .cursor-pointer": "cursor:pointer;",
  19.     "X .cursor-crosshair": "cursor:crosshair;",
  20.     "X .cursor-move": "cursor:move;",
  21.     "X .cursor-col-resize": "cursor:col-resize;",
  22.     "X .cursor-row-resize": "cursor:row-resize;",
  23.     "X .cursor-ns-resize": "cursor:ns-resize;",
  24.     "X .cursor-ew-resize": "cursor:ew-resize;",
  25.     "X .cursor-sw-resize": "cursor:sw-resize;",
  26.     "X .cursor-s-resize": "cursor:s-resize;",
  27.     "X .cursor-se-resize": "cursor:se-resize;",
  28.     "X .cursor-w-resize": "cursor:w-resize;",
  29.     "X .cursor-e-resize": "cursor:e-resize;",
  30.     "X .cursor-nw-resize": "cursor:nw-resize;",
  31.     "X .cursor-n-resize": "cursor:n-resize;",
  32.     "X .cursor-ne-resize": "cursor:ne-resize;",
  33.     "X .cursor-grab": "cursor:-webkit-grab;cursor:grab;",
  34.     "X .modebar": "position:absolute;top:2px;right:2px;z-index:1001;",
  35.     "X .ease-bg": "-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;",
  36.     "X .modebar--hover>:not(.watermark)": "opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;",
  37.     "X:hover .modebar--hover .modebar-group": "opacity:1;",
  38.     "X .modebar-group": "float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;",
  39.     "X .modebar-btn": "position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;",
  40.     "X .modebar-btn svg": "position:relative;top:2px;",
  41.     "X .modebar.vertical": "display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;",
  42.     "X .modebar.vertical svg": "top:-1px;",
  43.     "X .modebar.vertical .modebar-group": "display:block;float:none;margin-left:0px;margin-bottom:8px;",
  44.     "X .modebar.vertical .modebar-group .modebar-btn": "display:block;text-align:center;",
  45.     "X [data-title]:before,X [data-title]:after": "position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;",
  46.     "X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;",
  47.     "X [data-title]:before": "content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;",
  48.     "X [data-title]:after": "content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;",
  49.     "X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;",
  50.     "X .vertical [data-title]:before": "border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;",
  51.     "X .select-outline": "fill:none;stroke-width:1;shape-rendering:crispEdges;",
  52.     "X .select-outline-1": "stroke:white;",
  53.     "X .select-outline-2": "stroke:black;stroke-dasharray:2px 2px;",
  54.     Y: "font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
  55.     "Y p": "margin:0;",
  56.     "Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;",
  57.     "Y .notifier-close": "color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;",
  58.     "Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;"
  59. };
  60.  
  61. for(var selector in rules) {
  62.     var fullSelector = selector.replace(/^,/,' ,')
  63.         .replace(/X/g, '.js-plotly-plot .plotly')
  64.         .replace(/Y/g, '.plotly-notifier');
  65.     Lib.addStyleRule(fullSelector, rules[selector]);
  66. }

Raw Paste

Login or Register to edit or fork this paste. It's free.