variables.css 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. /*
  6. The following CSS variables define the main, public API for styling JupyterLab.
  7. These variables should be used by all plugins wherever possible. In other
  8. words, plugins should not define custom colors, sizes, etc unless absolutely
  9. necessary. This enables users to change the visual theme of JupyterLab
  10. by changing these variables.
  11. Many variables appear in an ordered sequence (0,1,2,3). These sequences
  12. are designed to work well together, so for example, `--jp-border-color1` should
  13. be used with `--jp-layout-color1`. The numbers have the following meanings:
  14. * 0: super-primary, reserved for special emphasis
  15. * 1: primary, most important under normal situations
  16. * 2: secondary, next most important under normal situations
  17. * 3: tertiary, next most important under normal situations
  18. Throughout JupyterLab, we are mostly following principles from Google's
  19. Material Design when selecting colors. We are not, however, following
  20. all of MD as it is not optimized for dense, information rich UIs.
  21. */
  22. :root {
  23. /* Borders
  24. *
  25. * The following variables, specify the visual styling of borders in JupyterLab.
  26. */
  27. --jp-border-width: 1px;
  28. --jp-border-color0: var(--md-grey-400);
  29. --jp-border-color1: var(--md-grey-400);
  30. --jp-border-color2: var(--md-grey-300);
  31. --jp-border-color3: var(--md-grey-200);
  32. --jp-button-border-radius: 2px;
  33. /* UI Fonts
  34. *
  35. * The UI font CSS variables are used for the typography all of the JupyterLab
  36. * user interface elements that are not directly user generated content.
  37. */
  38. --jp-ui-font-scale-factor: 1.2;
  39. --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor));
  40. --jp-ui-font-size1: 13px; /* Base font size */
  41. --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor));
  42. --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor));
  43. --jp-ui-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  44. /*
  45. * Use these font colors against the corresponding main layout colors.
  46. * In a light theme, these go from dark to light.
  47. */
  48. /* Defaults use Material Design specification */
  49. --jp-ui-font-color0: rgba(0,0,0,1.0);
  50. --jp-ui-font-color1: rgba(0,0,0,0.87);
  51. --jp-ui-font-color2: rgba(0,0,0,0.54);
  52. --jp-ui-font-color3: rgba(0,0,0,0.38);
  53. /*
  54. * Use these against the brand/accent/warn/error colors.
  55. * These will typically go from light to darker, in both a dark and light theme.
  56. */
  57. --jp-ui-inverse-font-color0: rgba(255,255,255,1.0);
  58. --jp-ui-inverse-font-color1: rgba(255,255,255,1.0);
  59. --jp-ui-inverse-font-color2: rgba(255,255,255,0.7);
  60. --jp-ui-inverse-font-color3: rgba(255,255,255,0.5);
  61. /* Content Fonts
  62. *
  63. * Content font variables are used for typography of user generated content.
  64. */
  65. --jp-content-line-height: 1.6;
  66. --jp-content-font-scale-factor: 1.2;
  67. --jp-content-font-size0: calc( var(--jp-content-font-size1)/var(--jp-content-font-scale-factor) );
  68. --jp-content-font-size1: 14px; /* Base font size */
  69. --jp-content-font-size2: calc( var(--jp-content-font-size1)*var(--jp-content-font-scale-factor) );
  70. --jp-content-font-size3: calc( var(--jp-content-font-size2)*var(--jp-content-font-scale-factor) );
  71. --jp-content-font-size4: calc( var(--jp-content-font-size3)*var(--jp-content-font-scale-factor) );
  72. --jp-content-font-size5: calc( var(--jp-content-font-size4)*var(--jp-content-font-scale-factor) );
  73. --jp-content-heading-line-height: 1.0;
  74. --jp-content-heading-margin-top: 1.2em;
  75. --jp-content-heading-margin-bottom: 0.8em;
  76. --jp-content-heading-font-weight: 500;
  77. /* Defaults use Material Design specification */
  78. --jp-content-font-color0: rgba(0,0,0,1.0);
  79. --jp-content-font-color1: rgba(0,0,0,0.87);
  80. --jp-content-font-color2: rgba(0,0,0,0.54);
  81. --jp-content-font-color3: rgba(0,0,0,0.38);
  82. --jp-content-link-color: var(--md-blue-700);
  83. --jp-content-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  84. /*
  85. * Code Fonts
  86. *
  87. * Code font variables are used for typography of code and other monospaces content.
  88. */
  89. --jp-code-font-size: 13px;
  90. --jp-code-line-height: 17px;
  91. --jp-code-padding: 5px;
  92. --jp-code-font-family: 'Source Code Pro', monospace;
  93. /* Layout
  94. *
  95. * The following are the main layout colors use in JupyterLab. In a light
  96. * theme these would go from light to dark.
  97. */
  98. --jp-layout-color0: white;
  99. --jp-layout-color1: white;
  100. --jp-layout-color2: var(--md-grey-200);
  101. --jp-layout-color3: var(--md-grey-400);
  102. --jp-layout-color4: var(--md-grey-600);
  103. /* Brand/accent */
  104. --jp-brand-color0: var(--md-blue-700);
  105. --jp-brand-color1: var(--md-blue-500);
  106. --jp-brand-color2: var(--md-blue-300);
  107. --jp-brand-color3: var(--md-blue-100);
  108. --jp-accent-color0: var(--md-green-700);
  109. --jp-accent-color1: var(--md-green-500);
  110. --jp-accent-color2: var(--md-green-300);
  111. --jp-accent-color3: var(--md-green-100);
  112. /* State colors (warn, error, success, info) */
  113. --jp-warn-color0: var(--md-orange-700);
  114. --jp-warn-color1: var(--md-orange-500);
  115. --jp-warn-color2: var(--md-orange-300);
  116. --jp-warn-color3: var(--md-orange-100);
  117. --jp-error-color0: var(--md-red-700);
  118. --jp-error-color1: var(--md-red-500);
  119. --jp-error-color2: var(--md-red-300);
  120. --jp-error-color3: var(--md-red-100);
  121. --jp-success-color0: var(--md-green-700);
  122. --jp-success-color1: var(--md-green-500);
  123. --jp-success-color2: var(--md-green-300);
  124. --jp-success-color3: var(--md-green-100);
  125. --jp-info-color0: var(--md-cyan-700);
  126. --jp-info-color1: var(--md-cyan-500);
  127. --jp-info-color2: var(--md-cyan-300);
  128. --jp-info-color3: var(--md-cyan-100);
  129. /* Cell specific styles */
  130. --jp-cell-padding: 5px;
  131. --jp-cell-collapser-width: 8px;
  132. --jp-cell-collapser-min-height: 20px;
  133. --jp-cell-collapser-not-active-hover-opacity: 0.6;
  134. --jp-cell-editor-background: var(--md-grey-100);
  135. --jp-cell-editor-border-color: var(--md-grey-300);
  136. --jp-cell-editor-box-shadow: inset 0 0 2px var(--md-blue-300);
  137. --jp-cell-editor-active-background: var(--jp-layout-color0);
  138. --jp-cell-editor-active-border-color: var(--jp-brand-color1);
  139. --jp-cell-prompt-width: 90px;
  140. --jp-cell-prompt-font-family: 'Source Code Pro', monospace;
  141. --jp-cell-prompt-letter-spacing: 0px;
  142. --jp-cell-prompt-opacity: 1.0;
  143. --jp-cell-prompt-not-active-opacity: 0.5;
  144. --jp-cell-prompt-not-active-font-color: var(--md-grey-700);
  145. /* A custom blend of MD grey and blue 600
  146. * See https://meyerweb.com/eric/tools/color-blend/#546E7A:1E88E5:5:hex */
  147. --jp-cell-inprompt-font-color: #307FC1;
  148. /* A custom blend of MD grey and orange 600
  149. * https://meyerweb.com/eric/tools/color-blend/#546E7A:F4511E:5:hex */
  150. --jp-cell-outprompt-font-color: #BF5B3D;
  151. /* Notebook specific styles */
  152. --jp-notebook-padding: 10px;
  153. --jp-notebook-scroll-padding: 100px;
  154. --jp-notebook-select-background: var(--jp-layout-color1);
  155. --jp-notebook-multiselected-color: var(--md-blue-50);
  156. /* Rendermime styles */
  157. --jp-rendermime-error-background: #fdd;
  158. --jp-rendermime-table-row-background: var(--md-grey-100);
  159. --jp-rendermime-table-row-hover-background: var(--md-light-blue-50);
  160. /* Dialog specific styles */
  161. --jp-dialog-background: rgba(0,0,0,.25);
  162. /* Console specific styles */
  163. --jp-console-padding: 10px;
  164. /* Toolbar specific styles */
  165. --jp-toolbar-border-color: var(--jp-border-color1);
  166. --jp-toolbar-micro-height: 8px;
  167. --jp-toolbar-background: var(--jp-layout-color1);
  168. --jp-toolbar-box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.24);
  169. --jp-toolbar-header-margin: 4px 4px 0px 4px;
  170. --jp-toolbar-active-background: var(--md-grey-300);
  171. /* Input field styles */
  172. --jp-input-box-shadow: inset 0 0 2px var(--md-blue-300);
  173. --jp-input-active-background: var(--jp-layout-color1);
  174. --jp-input-hover-background: var(--jp-layout-color1);
  175. --jp-input-background: var(--md-grey-100);
  176. --jp-input-border-color: var(--jp-border-color1);
  177. --jp-input-active-border-color: var(--jp-brand-color1);
  178. /* General editor styles */
  179. --jp-editor-selected-background: #d9d9d9;
  180. --jp-editor-selected-focused-background: #d7d4f0;
  181. --jp-editor-cursor-color: var(--jp-ui-font-color0);
  182. /* Code mirror specific styles */
  183. --jp-mirror-editor-keyword-color: #008000;
  184. --jp-mirror-editor-atom-color: #88F;
  185. --jp-mirror-editor-number-color: #080;
  186. --jp-mirror-editor-def-color: #00f;
  187. --jp-mirror-editor-variable-color: var(--md-grey-900);
  188. --jp-mirror-editor-variable-2-color: var(--md-grey-800);
  189. --jp-mirror-editor-variable-3-color: var(--md-grey-700);
  190. --jp-mirror-editor-punctuation-color: #05a;
  191. --jp-mirror-editor-property-color: #05a;
  192. --jp-mirror-editor-operator-color: #AA22FF;
  193. --jp-mirror-editor-comment-color: #408080;
  194. --jp-mirror-editor-string-color: #BA2121;
  195. --jp-mirror-editor-string-2-color: #f50;
  196. --jp-mirror-editor-meta-color: #AA22FF;
  197. --jp-mirror-editor-qualifier-color: #555;
  198. --jp-mirror-editor-builtin-color: #008000;
  199. --jp-mirror-editor-bracket-color: #997;
  200. --jp-mirror-editor-tag-color: #170;
  201. --jp-mirror-editor-attribute-color: #00c;
  202. --jp-mirror-editor-header-color: blue;
  203. --jp-mirror-editor-quote-color: #090;
  204. --jp-mirror-editor-link-color: #00c;
  205. --jp-mirror-editor-error-color: #f00;
  206. --jp-mirror-editor-hr-color: #999;
  207. /* Vega extension styles */
  208. --jp-vega-background: white;
  209. }