variables.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @use 'sass:color';
  2. /*!
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. // SCSS darken/lighten function override
  7. @function nc-darken($color, $value) {
  8. @return color.adjust($color, $lightness: -$value, $space: hsl);
  9. }
  10. @function nc-lighten($color, $value) {
  11. @return color.adjust($color, $lightness: $value, $space: hsl);
  12. }
  13. // SCSS variables
  14. // DEPRECATED, please use CSS4 vars
  15. $color-main-text: #222 !default; // Not #000 for better readability
  16. $color-main-background: #fff !default;
  17. $color-main-background-translucent: rgba($color-main-background, .97) !default;
  18. // used for different active/hover/focus/disabled states
  19. $color-background-hover: nc-darken($color-main-background, 4%) !default;
  20. $color-background-dark: nc-darken($color-main-background, 7%) !default;
  21. $color-background-darker: nc-darken($color-main-background, 14%) !default;
  22. $color-placeholder-light: nc-darken($color-main-background, 10%) !default;
  23. $color-placeholder-dark: nc-darken($color-main-background, 20%) !default;
  24. $color-primary: #0082c9 !default;
  25. $color-primary-hover: mix($color-primary, $color-main-background, 80%) !default;
  26. $color-primary-light: mix($color-primary, $color-main-background, 10%) !default;
  27. $color-primary-light-text: $color-primary !default;
  28. $color-primary-light-hover: mix($color-primary-light, $color-main-text, 95%) !default;
  29. $color-primary-text: #ffffff !default;
  30. // do not use nc-darken/lighten in case of overriding because
  31. // primary-text is independent of color-main-text
  32. $color-primary-element-text-dark: color.adjust($color-primary-text, $lightness: -7%, $space: hsl) !default;
  33. $color-primary-element: $color-primary !default;
  34. $color-primary-element-hover: mix($color-primary-element, $color-main-background, 80%) !default;
  35. $color-primary-element-light: color.adjust($color-primary-element, $lightness: 15%, $space: hsl) !default;
  36. $color-error: #e9322d;
  37. $color-error-hover: mix($color-error, $color-main-background, 80%) !default;
  38. $color-warning: #eca700;
  39. $color-warning-hover: mix($color-warning, $color-main-background, 80%) !default;
  40. $color-success: #46ba61;
  41. $color-success-hover: mix($color-success, $color-main-background, 80%) !default;
  42. // used for svg
  43. $color-white: #fff;
  44. $color-black: #000;
  45. $color-yellow: #FC0;
  46. // rgb(118, 118, 118) / #767676
  47. // min. color contrast for normal text on white background according to WCAG AA
  48. // (Works as well: color: #000; opacity: 0.57;)
  49. $color-text-maxcontrast: nc-lighten($color-main-text, 33%) !default;
  50. $color-text-light: $color-main-text !default;
  51. $color-text-lighter: $color-text-maxcontrast !default;
  52. $image-logo: url('../img/logo/logo.svg?v=1') !default;
  53. $image-login-background: url('../img/background.png?v=2') !default;
  54. $image-logoheader: url('../img/logo/logo.svg?v=1') !default;
  55. $image-favicon: url('../img/logo/logo.svg?v=1') !default;
  56. $color-loading-light: #ccc !default;
  57. $color-loading-dark: #444 !default;
  58. $color-box-shadow: color.adjust(nc-darken($color-main-background, 70%), $alpha: -0.5, $space: hsl) !default;
  59. // light border like file table or app-content list
  60. $color-border: nc-darken($color-main-background, 7%) !default;
  61. // darker border like inputs or very visible elements
  62. $color-border-dark: nc-darken($color-main-background, 14%) !default;
  63. $border-radius: 3px !default;
  64. $border-radius-large: 10px !default;
  65. // Pill-style button, value is large so big buttons also have correct roundness
  66. $border-radius-pill: 100px !default;
  67. $font-face: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, Ubuntu, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
  68. $default-font-size: 15px;
  69. $default-line-height: 24px;
  70. $animation-quick: 100ms;
  71. $animation-slow: 300ms;
  72. // various structure data
  73. $header-height: 50px;
  74. $navigation-width: 300px;
  75. $sidebar-min-width: 300px;
  76. $sidebar-max-width: 500px;
  77. $list-min-width: 200px;
  78. $list-max-width: 300px;
  79. $header-menu-item-height: 44px;
  80. $header-menu-profile-item-height: 66px;
  81. // mobile. Keep in sync with core/js/js.js
  82. $breakpoint-mobile: 1024px;