_ag-theme-base-default-params.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. @import "../../mixins/ag-theme-params";
  2. @import "./ag-theme-base-font-vars";
  3. // NOTE this file is used in the <ag-grid-docs>/javascript-grid-themes-provided/index.php file for customer-facing documentation. If you update it, then also update the php file
  4. // Keep to 80 characters per line to avoid line wrapping in the docs
  5. $ag-theme-base-default-params: (
  6. // Colour of text and icons in primary UI elements like menus
  7. foreground-color: #000,
  8. // Colour of text in grid cells
  9. data-color: ag-derived(foreground-color),
  10. // Colour of text and icons in UI elements that need to be slightly less emphasised to avoid distracting attention from data
  11. secondary-foreground-color: ag-derived(foreground-color),
  12. // Colour of text and icons in the header
  13. header-foreground-color: ag-derived(secondary-foreground-color),
  14. // Color of elements that can't be interacted with because they are in a disabled state
  15. disabled-foreground-color: ag-derived(foreground-color, $opacity: 0.5),
  16. // Background colour of the grid
  17. background-color: #fff,
  18. // Background colour for all headers, including the grid header, panels etc
  19. header-background-color: null,
  20. // Background colour for second level headings within UI components
  21. subheader-background-color: null,
  22. // Background colour for toolbars directly under subheadings (as used in the chart settings menu)
  23. subheader-toolbar-background-color: null,
  24. // Background for areas of the interface that contain UI controls, like tool panels and the chart settings menu
  25. control-panel-background-color: null,
  26. // Background color of selected rows in the grid and in dropdown menus
  27. selected-row-background-color: ag-derived(background-color, $mix: foreground-color 25%),
  28. // Background colour applied to every other row or null to use background-color for all rows
  29. odd-row-background-color: null,
  30. // Background color of the overlay shown over the grid when it is covered by an overlay, e.g. a data loading indicator.
  31. modal-overlay-background-color: ag-derived(background-color, $opacity: 0.66),
  32. // Background color when hovering over rows in the grid and in dropdown menus, or null for no rollover effect (note - if you want a rollover on one but not the other, set to null and use CSS to achieve the rollover)
  33. row-hover-color: null,
  34. // Color to draw around selected cell ranges
  35. range-selection-border-color: ag-derived(foreground-color),
  36. // Background colour of selected cell ranges. By default, setting this to a semi-transparent color (opacity of 0.1 to 0.5 works well) will generate appropriate values for the range-selection-background-color-{1..4} colours used when multiple ranges overlap.
  37. // NOTE: if setting this value to a CSS variable, and your app supports overlapping range selections, also set range-selection-background-color-{1..4}.
  38. range-selection-background-color: ag-derived(range-selection-border-color, $opacity: 0.2),
  39. // These 4 parameters are used for fine-grained control over the background color used when 1, 2, 3 or 4 ranges overlap.
  40. range-selection-background-color-1: ag-derived(range-selection-background-color),
  41. range-selection-background-color-2: ag-derived(range-selection-background-color, $self-overlay: 2),
  42. range-selection-background-color-3: ag-derived(range-selection-background-color, $self-overlay: 3),
  43. range-selection-background-color-4: ag-derived(range-selection-background-color, $self-overlay: 4),
  44. // Background colour to apply to a cell range when it is copied from or pasted into
  45. range-selection-highlight-color: ag-derived(range-selection-border-color),
  46. // Colour and thickness of the border drawn under selected tabs, including menus and tool panels
  47. selected-tab-underline-color: ag-derived(range-selection-border-color),
  48. selected-tab-underline-width: 0,
  49. selected-tab-underline-transition-speed: null,
  50. // Background colour for cells that provide categories to the current range chart
  51. range-selection-chart-category-background-color: rgba(#00FF84, 0.1),
  52. // Background colour for cells that provide data to the current range chart
  53. range-selection-chart-background-color: rgba(#0058FF, 0.1),
  54. // Rollover colour for header cells
  55. header-cell-hover-background-color: null,
  56. // Colour applied to header cells when the column is being dragged to a new position
  57. header-cell-moving-background-color: ag-derived(header-cell-hover-background-color),
  58. // Colour to apply when a cell value changes and enableCellChangeFlash is enabled
  59. value-change-value-highlight-background-color: rgba(#16A085, 0.5),
  60. // Colours to apply when a value increases or decreases in an agAnimateShowChangeCellRenderer cell
  61. value-change-delta-up-color: #43a047,
  62. value-change-delta-down-color: #e53935,
  63. // Colour for the "chip" that repersents a column that has been dragged onto a drop zone
  64. chip-background-color: null,
  65. // By default, color variables can be overridden at runtime by CSS variables, e.g.
  66. // background-color can be overridden with the CSS var --ag-background-color. Pass true
  67. // to disable this behaviour.
  68. suppress-css-var-overrides: false,
  69. //
  70. // BORDERS
  71. //
  72. // Draw borders around most UI elements
  73. borders: true,
  74. // Draw the few borders that are critical to UX, e.g. between headers and rows.
  75. borders-critical: ag-derived(borders),
  76. // Draw decorative borders separating UI elements within components
  77. borders-secondary: ag-derived(borders),
  78. // Draw borders around sidebar tabs so that the active tab appears connected to the current tool panel
  79. borders-side-button: ag-derived(borders),
  80. border-radius: 0px,
  81. // Colour for border around major UI components like the grid itself, headers, footers and tool panels
  82. border-color: ag-derived(background-color, $mix: foreground-color 25%),
  83. // Colour for borders used to separate elements within a major UI component
  84. secondary-border-color: ag-derived(border-color),
  85. // Colour of the border between grid rows, or null to display no border
  86. row-border-color: ag-derived(secondary-border-color),
  87. // Default border for cells. This can be used to specify the border-style and border-color properties e.g. `dashed red` but the border-width is fixed at 1px.
  88. cell-horizontal-border: solid transparent,
  89. // Separator between columns in the header. Displays between all header cells For best UX, use either this or header-column-resize-handle but not both
  90. header-column-separator: false,
  91. header-column-separator-height: 100%,
  92. header-column-separator-width: 1px,
  93. header-column-separator-color: ag-derived(border-color, $opacity: 0.5),
  94. // Visible marker for resizeable columns. Displays in the same position as the column separator, but only when the column is resizeable. For best UX, use either this or header-column-separator but not both
  95. header-column-resize-handle: false,
  96. header-column-resize-handle-height: 50%,
  97. header-column-resize-handle-width: 1px,
  98. header-column-resize-handle-color: ag-derived(border-color, $opacity: 0.5),
  99. //
  100. // INPUTS
  101. //
  102. // Suppress styling of checkbox/radio/range input elements. If you want to style these yourself, set this to true. If you only want to disable styling for some kinds of input, you can set this to true and e.g. @include ag-native-inputs((checkbox: false)) which will emit styles for all kinds of input except checkboxes.
  103. suppress-native-widget-styling: false,
  104. input-border-color: null,
  105. input-disabled-border-color: ag-derived(input-border-color, $opacity: 0.3),
  106. input-disabled-background-color: null,
  107. checkbox-background-color: null,
  108. checkbox-border-radius: ag-derived(border-radius),
  109. checkbox-checked-color: ag-derived(foreground-color),
  110. checkbox-unchecked-color: ag-derived(foreground-color),
  111. checkbox-indeterminate-color: ag-derived(checkbox-unchecked-color),
  112. toggle-button-off-border-color: ag-derived(checkbox-unchecked-color),
  113. toggle-button-off-background-color: ag-derived(checkbox-unchecked-color),
  114. toggle-button-on-border-color: ag-derived(checkbox-checked-color),
  115. toggle-button-on-background-color: ag-derived(checkbox-checked-color),
  116. toggle-button-switch-background-color: ag-derived(background-color),
  117. toggle-button-switch-border-color: ag-derived(toggle-button-off-border-color),
  118. toggle-button-border-width: 1px,
  119. toggle-button-height: ag-derived(icon-size),
  120. toggle-button-width: ag-derived(toggle-button-height, $times: 2),
  121. input-focus-box-shadow: null,
  122. input-focus-border-color: null,
  123. // CHART SETTINGS
  124. // Color of border around selected chart style
  125. minichart-selected-chart-color: ag-derived(checkbox-checked-color),
  126. // Color of dot representing selected page of chart styles
  127. minichart-selected-page-color: ag-derived(checkbox-checked-color),
  128. //
  129. // SIZING / PADDING / SPACING
  130. //
  131. // grid-size is the main control for affecting how tightly data and UI elements are packed together. All padding and spacing in the grid is defined as a multiple of grid-size, so increasing it will make most components larger by increasing their internal white space while leaving the size of text and icons unchanged.
  132. grid-size: 4px,
  133. // The size of square icons and icon-buttons
  134. icon-size: 12px,
  135. // These 4 variables set the padding around and spacing between widgets in "widget containers" which are parts of the UI that contain many related widgets, like the set filter menu, charts settings tabs etc.
  136. widget-container-horizontal-padding: ag-derived(grid-size, $times: 1.5),
  137. widget-container-vertical-padding: ag-derived(grid-size, $times: 1.5),
  138. widget-horizontal-spacing: ag-derived(grid-size, $times: 1.5),
  139. widget-vertical-spacing: ag-derived(grid-size),
  140. // Horizontal padding for grid and header cells (vertical padding is not set explicitly, but inferred from row-height / header-height
  141. cell-horizontal-padding: ag-derived(grid-size, $times: 3),
  142. // Horizontal spacing between widgets inside cells (e.g. row group expand buttons and row selection checkboxes)
  143. cell-widget-spacing: ag-derived(cell-horizontal-padding),
  144. // Height of grid rows
  145. row-height: ag-derived(grid-size, $times: 6, $plus: 1),
  146. // Height of header rows
  147. header-height: ag-derived(row-height),
  148. // Height of items in lists (example of lists are dropdown select inputs and column menu set filters)
  149. list-item-height: ag-derived(grid-size, $times: 5),
  150. // How much to indent child columns in the column tool panel relative to their parent
  151. column-select-indent-size: ag-derived(grid-size, $plus: icon-size),
  152. // How much to indent child rows in the grid relative to their parent row
  153. row-group-indent-size: ag-derived(cell-widget-spacing, $plus: icon-size),
  154. // How much to indent child columns in the filters tool panel relative to their parent
  155. filter-tool-panel-group-indent: 16px,
  156. // Cause tabs to stretch across the full width of the tab panel header
  157. full-width-tabs: false,
  158. // Fonts
  159. font-family: ("Helvetica Neue", sans-serif),
  160. font-size: 14px,
  161. // The name of the font family you're using
  162. icon-font-family: $ag-theme-base-icon-font-family, // this var exported by ag-theme-base-font-vars.scss
  163. // A URI (data: URI or web URL) to load the icon font from. NOTE: if your icon font is already loaded in the app's HTML page, set this to null to avoid embedding unnecessry font data in the compiled theme.
  164. icons-data: $ag-theme-base-icons-data, // this var exported by ag-theme-base-font-vars.scss
  165. icons-font-codes: $ag-theme-base-icons-font-codes, // this var exported by ag-theme-base-font-vars.scss
  166. // cards are elements that float above the UI
  167. card-radius: ag-derived(border-radius),
  168. // the default card shadow applies to simple cards like column drag indicators and text editors
  169. card-shadow: none,
  170. // override the shadow for popups - cards that contain complex UI, like menus and charts
  171. popup-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3)
  172. );