variables.less 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. /************************************************************************/
  20. /* COLORS */
  21. /* Please attempt to use and standardize on these colors, */
  22. /* rather than including specific color values in */
  23. /* component styles. This will allow us to more easily adjust theming */
  24. /************************************************************************/
  25. @primary-color: #00a699;
  26. @indicator-color: #44c0ff;
  27. @almost-black: #263238;
  28. @gray-dark: #484848;
  29. @gray-light: #cfd8dc;
  30. @gray: #879399;
  31. @gray-bg: #f5f5f5;
  32. @gray-heading: #a3a3a3;
  33. @menu-hover: #f2f3f5;
  34. @lightest: #ffffff;
  35. @darkest: #000000;
  36. /**************************** text-specific *****************************/
  37. @link: @brand-primary;
  38. @link-hover: darken(@link, @colorstop-one);
  39. /***************************** status colors ****************************/
  40. @success: #4ac15f;
  41. @info: lighten(#2ab7ca, 15%);
  42. @warning: mix(
  43. #fed766,
  44. #ffab00,
  45. 50%
  46. ); // mix of old superset warning color and cosmo warning color. Compromise!
  47. @danger: #fe4a49;
  48. /* general component effects */
  49. @shadow-highlight: @primary-color;
  50. /*************************** filter indicators **************************/
  51. /* make sure be consistent with FILTER_COLORS_COUNT in
  52. dashboardFiltersColorMap.js
  53. */
  54. @badge-colors: #228be6, #40c057, #fab005, #f76707, #e64980, #15aabf, #7950f2,
  55. #fa5252, #74b816, #12b886, #1864ab, #2b8a3e, #e67700, #d9480f, #a61e4d,
  56. #0b7285, #5f3dc4, #c92a2a, #5c940d, #087f5b;
  57. @iterations: length(@badge-colors);
  58. .badge-loop (@i) when (@i > 0) {
  59. .filter-badge.badge-@{i},
  60. .active .color-bar.badge-@{i},
  61. .dashboard-filter-indicators-container:hover .color-bar.badge-@{i},
  62. .dashboard-component-chart-holder:hover .color-bar.badge-@{i} {
  63. @value: extract(@badge-colors, @i);
  64. background-color: @value;
  65. }
  66. .badge-loop(@i - 1);
  67. }
  68. .badge-loop(@iterations);
  69. /************************************************************************/
  70. /* OPACITIES */
  71. /* Used in LESS filters, e.g. fade(@someColorVar, @someOpacityBelow) */
  72. /************************************************************************/
  73. @opacity-light: 10%;
  74. @opacity-medium-light: 35%;
  75. @opacity-medium-heavy: 60%;
  76. @opacity-heavy: 80%;
  77. /************************************************************************/
  78. /* SHADES & TINTS */
  79. /* Used in LESS filters for shadint/tinting, */
  80. /* e.g. shade(@someColorVar, @colorstop-one) to darken */
  81. /* or tint(@someColorVar, @colorstop-one) to lighten */
  82. /************************************************************************/
  83. @colorstop-one: 20%;
  84. @colorstop-two: 40%;
  85. @colorstop-three: 60%;
  86. @colorstop-four: 80%;
  87. /************************************************************************/
  88. /* LAYOUT */
  89. /* Widths and heights of things, that might be referred to often */
  90. /************************************************************************/
  91. /* builder component pane */
  92. @builder-pane-width: 374px;
  93. /************************************************************************/
  94. /* Z-INDEX */
  95. /* Think of the site as "layers" rather than an arms race of numbers */
  96. /* Keep these to a minimum */
  97. /* Label semantic "layers" and add comments for usage notes */
  98. /* Use double dash modifiers to step up/down from a base layer */
  99. /* e.g. z-whatever--modifier */
  100. /************************************************************************/
  101. /************************ toast messages, popovers **********************/
  102. @z-index-max: 3000;
  103. /***** filters, dashboard editor widgets, Explore reloading overlay *****/
  104. @z-index-dropdown: @z-index-above-dashboard-charts + 1;
  105. @z-index-above-dashboard-charts: 10;
  106. /******************************** charts ********************************/
  107. @z-index-chart--dragging: @z-index-chart + 1;
  108. @z-index-chart: 1;
  109. /************************************************************************/
  110. /* TYPOGRAPHY */
  111. /* Commonly used font weights, line heights, etc. These should be the */
  112. /* core values used to build more complex styles for headers, etc. */
  113. /************************************************************************/
  114. // *************************** Weights **********************************
  115. @font-weight-light: 200;
  116. @font-weight-normal: 400;
  117. @font-weight-bold: 700;
  118. // ***************************** Font Sizes *****************************
  119. @font-size-base: 14px; // Base `rem` units on this, as needed.
  120. @font-size-xxs: 9px;
  121. @font-size-xs: 10px;
  122. @font-size-s: 12px;
  123. @font-size-m: @font-size-base;
  124. @font-size-l: 16px;
  125. @font-size-xl: 21px;
  126. @font-size-xxl: 28px;
  127. // **************************** Line Heights ****************************
  128. @line-height-base: 1.4;
  129. // Ranged Sizes
  130. @line-height-tight: 1;
  131. @line-height-normal: @line-height-base;
  132. @line-height-loose: 2;
  133. // ****************************** Families ******************************
  134. @font-family-sans-serif: Helvetica, Arial;
  135. @font-family-serif: Georgia, 'Times New Roman', Times, serif;
  136. @font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace;
  137. @font-family-base: @font-family-sans-serif;
  138. /************************************************************************/
  139. /* TRANSITIONS */
  140. /* Timing and easings presets used in CSS transitions */
  141. /************************************************************************/
  142. @timing-normal: 0.3s;
  143. /************************************************************************/
  144. /* BORDER RADII */
  145. /* Standard border-radius settings */
  146. /************************************************************************/
  147. @border-radius-normal: 2px;
  148. @border-radius-large: (@border-radius-normal * 2);
  149. /************************************************************************/
  150. /* BOOTSTRAP/BOOTSWATCH/COSMO */
  151. /* These are the legacy Cosmo theme overrides to Bootswatch's */
  152. /* overrides to Bootstrap. We should consolidate/deprecate these */
  153. /* in favor of custom/reusable CSS wherever possible */
  154. /************************************************************************/
  155. @import '../less/cosmo/variables.less';