wikimedia-ui-base.less 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /**
  2. * WikimediaUI Base v0.12.0
  3. * Wikimedia Foundation user interface base variables
  4. */
  5. // == Breakpoints ==
  6. // The following numbers are prone to change with new information.
  7. // Minimum available screen width at which a device can be considered a mobile device
  8. // Many older feature phones have screens smaller than this value.
  9. @width-breakpoint-mobile: 320px;
  10. // Minimum available screen width at which a device can be considered a tablet
  11. // The number is currently based on the device width of a Samsung Galaxy S5 mini and is low
  12. // enough to cover iPad (768px).
  13. @width-breakpoint-tablet: 720px;
  14. // Minimum available screen width at which a device can be considered a desktop
  15. @width-breakpoint-desktop: 1000px;
  16. // Wider desktop breakpoint, currently used in Flow.
  17. @width-breakpoint-desktop-wide: 1200px;
  18. // Extra wide desktop breakpoint
  19. @width-breakpoint-desktop-extrawide: 2000px;
  20. // == Colors ==
  21. // WikimediaUI (WMUI) color palette
  22. // Don't use those variables directly, instead define your vars
  23. // referring to them as applied further below
  24. @wmui-color-base0: #000; // = HSB 0°, 0%, 0%
  25. @wmui-color-base10: #222; // = HSB 0°, 0%, 13%
  26. @wmui-color-base20: #54595d; // = HSB 207°, 10%, 36%; WCAG 2.0 level AAA 7.09:1 contrast ratio on `#fff`
  27. @wmui-color-base30: #72777d; // = HSB 210°, 9%, 49%; WCAG 2.0 level AA at 4.52:1 contrast ratio on `#fff`
  28. @wmui-color-base50: #a2a9b1; // = HSB 212°, 8%, 69%
  29. @wmui-color-base70: #c8ccd1; // = HSB 213°, 4%, 82%
  30. @wmui-color-base80: #eaecf0; // = HSB 220°, 3%, 94%
  31. @wmui-color-base90: #f8f9fa; // = HSB 210°, 1%, 98%
  32. @wmui-color-base100: #fff; // = HSB 0°, 0%, 100%
  33. @wmui-color-accent30: #2a4b8d; // = HSB 220°, 70%, 55%
  34. @wmui-color-accent50: #36c; // = HSB 220°, 75%, 80%
  35. @wmui-color-accent90: #eaf3ff; // = HSB 214°, 8%, 100%
  36. @wmui-color-red30: #b32424; // = HSB 360°, 80%, 70%
  37. @wmui-color-red50: #d33; // = HSB 360°, 77%, 87%
  38. @wmui-color-red90: #fee7e6; // = HSB 3°, 9%, 100%
  39. @wmui-color-yellow30: #ac6600; // = HSB 36°, 100%, 67%
  40. @wmui-color-yellow50: #fc3; // = HSB 45°, 80%, 100%
  41. @wmui-color-yellow90: #fef6e7; // = HSB 39°, 9%, 100%
  42. @wmui-color-green30: #14866d; // = HSB 167°, 85%, 53%
  43. @wmui-color-green50: #00af89; // = HSB 167°, 100%, 69%
  44. @wmui-color-green90: #d5fdf4; // = HSB 166°, 16%, 99%
  45. // Background Colors
  46. @background-color-base: @wmui-color-base100;
  47. @background-color-base--hover: @wmui-color-base80;
  48. @background-color-base--disabled: @wmui-color-base80;
  49. @background-color-code: @wmui-color-base90;
  50. // 'Framed' UI elements (Framed Buttons, Dropdowns, ToggleSwitches…)
  51. @background-color-framed: @wmui-color-base90;
  52. @background-color-framed--hover: @wmui-color-base100;
  53. @background-color-framed--active: @wmui-color-base70;
  54. // 'Filled' UI elements (Checkboxes, Radios, ProgressBars…)
  55. @background-color-filled--disabled: @wmui-color-base70;
  56. // Toolbar and Tools
  57. @background-color-toolbar: @background-color-base;
  58. @background-color-tool--hover: @background-color-base--hover;
  59. @background-color-tool--active: @background-color-primary;
  60. @background-color-tool--active-hover: @background-color-primary--hover;
  61. // Tabs Navigation Background Color
  62. @background-color-tabs: @wmui-color-base80;
  63. // Highlight Colors, RGBA Colors include hex fallback on `#fff` for IE 6/7/8
  64. @background-color-highlight: rgba( 255, 182, 13, 0.4 );
  65. @background-color-highlight--fallback: #ffe29e;
  66. // Foreground Colors
  67. @color-base: @wmui-color-base10;
  68. @color-base--hover: #444;
  69. @color-base--active: @wmui-color-base0;
  70. @color-base--inverted: @wmui-color-base100;
  71. @color-base--emphasized: @wmui-color-base0;
  72. @color-base--subtle: @wmui-color-base30;
  73. @color-base--disabled: @wmui-color-base30;
  74. @color-filled--disabled: @color-base--inverted;
  75. @color-placeholder: @wmui-color-base30;
  76. // Primary 'Progressive' Color, Background Color and states
  77. @background-color-primary: @wmui-color-accent90;
  78. @background-color-primary--hover: rgba( 41, 98, 204, 0.1 );
  79. @color-primary: @wmui-color-accent50;
  80. @color-primary--hover: #447ff5; // = `lighten( @color-primary, 3 )`
  81. @color-primary--active: @wmui-color-accent30;
  82. @color-primary--focus: @color-primary;
  83. // 'Destructive' Color, Background Color and states
  84. @background-color-destructive: @wmui-color-red90;
  85. @color-destructive: @wmui-color-red50;
  86. @color-destructive--hover: #ff4242;
  87. @color-destructive--active: @wmui-color-red30;
  88. @color-destructive--focus: @color-destructive;
  89. // Secondary Color and states (links only)
  90. @color-secondary: @wmui-color-green50;
  91. @color-secondary--hover: #1c6665;
  92. @color-secondary--active: @wmui-color-green30;
  93. @color-secondary--focus: @color-secondary;
  94. // Validation error feedback
  95. @color-erroneous: @wmui-color-red50;
  96. // Toolbar and Tools
  97. @color-tool--hover: @color-base--emphasized; // Used here in combination with `:hover` background-color turning light grey
  98. @color-tool--active: @color-primary;
  99. // Opacity
  100. @opacity-base: 1;
  101. @opacity-base--disabled: 0.51; // = `#7d7d7d` on `background-color: #fff`; HSB 0°, 0%, 49%
  102. @opacity-icon-base: 0.87; // = `#222` on `background-color: #fff`
  103. @opacity-icon-base--hover: 0.73; // = `#454545` on `background-color: #fff`, closest to `#444`
  104. @opacity-icon-base--selected: 1;
  105. // == Positioning ==
  106. // Z-Index
  107. @z-index-base: 0;
  108. // == Box Model properties ==
  109. // `@*size` variables are used for `*width` & `*height` properties
  110. @size-base: 32px;
  111. @min-size-icon: 20px; // values used for `min-*` are defined in `px`, see T130691
  112. @min-size-indicator: 12px;
  113. @size-icon: 20px;
  114. @size-indicator: 12px;
  115. @size-tool: 42px;
  116. // Max Widths
  117. @max-width-base: 50em;
  118. @max-width-button: 28.75em; // = `460px` at `16px` base, see T95367
  119. @max-width-input: @max-width-base;
  120. @max-width-input-inline: 100%;
  121. // Border
  122. @border-base: @border-width-base @border-style-base @border-color-base;
  123. @border-dialog: @border-base;
  124. @border-menu: @border-base;
  125. // Border Colors
  126. @border-color-base: @wmui-color-base50;
  127. @border-color-base--hover: @wmui-color-base50;
  128. @border-color-base--active: @wmui-color-base30;
  129. @border-color-base--disabled: @wmui-color-base70;
  130. @border-color-filled--disabled: @color-filled--disabled;
  131. @border-color-primary--active: #859dcc;
  132. @border-color-destructive--active: #b77c79;
  133. @border-color-inset--focus: @color-base--inverted;
  134. @border-color-heading: @wmui-color-base70;
  135. @border-color-wikitable: rgba( 84, 89, 93, 0.3 ); // See T168029
  136. // Border Styles
  137. @border-style-base: solid;
  138. // Border Widths
  139. @border-width-base: 1px;
  140. // Border Radius
  141. @border-radius-base: 2px;
  142. // Box Shadows
  143. @box-shadow-base--focus: inset 0 0 0 1px @wmui-color-accent50;
  144. @box-shadow-primary--focus: inset 0 0 0 1px @color-primary, inset 0 0 0 2px @color-base--inverted;
  145. @box-shadow-inset--inverted: inset 0 0 0 1px @color-base--inverted;
  146. @box-shadow-filled--disabled: inset 0 0 0 1px @color-filled--disabled;
  147. @box-shadow-card: 0 1px 1px rgba( 0, 0, 0, 0.15 );
  148. @box-shadow-dialog: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
  149. @box-shadow-menu: @box-shadow-dialog;
  150. // == Typography incl. print properties ==
  151. // Font Families
  152. @font-family-base: @font-family-sans;
  153. @font-family-heading-main: @font-family-serif;
  154. @font-family-sans: 'Helvetica Neue', 'Helvetica', 'Nimbus Sans L', 'Arial', 'Liberation Sans', sans-serif;
  155. @font-family-sans--fallback: sans-serif;
  156. @font-family-serif: 'Linux Libertine', 'Georgia', 'Times', serif;
  157. @font-family-serif--fallback: serif;
  158. @font-family-monospace: monospace, monospace; // See T176636
  159. // Line Heights
  160. @line-height-base: 1.6;
  161. @line-height-heading: 1.25;
  162. @text-decoration-link--hover: none;
  163. // Text Shadows
  164. @text-shadow-base: 0 1px 1px @color-base--inverted; // 'coined' effect
  165. @text-shadow-base--disabled: @text-shadow-base;
  166. // == Other Properties ==
  167. // Cursors
  168. @cursor-base--disabled: default;
  169. // == Animation & Transition ==
  170. // Transitions
  171. @transition-base: @transition-duration-base; // `ease` is the initial value
  172. @transition-ease-medium: @transition-duration-medium;
  173. // `ease-out` is preferably used on human initiated transitions, for example dialogs
  174. @transition-ease-out-medium: ease-out @transition-duration-medium;
  175. // Transitions > Durations
  176. @transition-duration-base: 100ms;
  177. @transition-duration-medium: 250ms;