You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

theming.scss 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /** Calculate luma as it is also used in OCA\Theming\Util::calculateLuma */
  2. @function luma($c) {
  3. $-local-red: red(rgba($c, 1.0));
  4. $-local-green: green(rgba($c, 1.0));
  5. $-local-blue: blue(rgba($c, 1.0));
  6. @return (0.2126 * $-local-red + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
  7. }
  8. .nc-theming-main-background {
  9. background-color: $color-primary;
  10. }
  11. .nc-theming-main-text {
  12. color: $color-primary-text;
  13. }
  14. .nc-theming-contrast {
  15. color: $color-primary-text;
  16. }
  17. @if (luma($color-primary) > 0.6) {
  18. #appmenu:not(.inverted) svg {
  19. filter: invert(1);
  20. }
  21. #appmenu.inverted svg {
  22. filter: none;
  23. }
  24. .searchbox input[type="search"] {
  25. background-repeat: no-repeat;
  26. background-position: 6px center;
  27. background-color: transparent;
  28. @include icon-color('search', 'actions', $color-black, 1, true);
  29. }
  30. #contactsmenu .icon-contacts {
  31. @include icon-color('contacts', 'places', $color-black, 1, true);
  32. }
  33. #settings .icon-settings-white {
  34. @include icon-color('settings', 'actions', $color-black, 1, true);
  35. }
  36. #appmenu .icon-more-white {
  37. @include icon-color('more', 'actions', $color-black, 1, true);
  38. }
  39. #body-login {
  40. input,
  41. #alternative-logins li a {
  42. border: 1px solid nc-lighten($color-primary-text, 50%);
  43. }
  44. input.primary,
  45. #alternative-logins li a {
  46. background-color: $color-primary;
  47. }
  48. a,
  49. label,
  50. p,
  51. #alternative-logins legend {
  52. color: var(--color-primary-text);
  53. }
  54. input[type='checkbox'].checkbox--white + label:before {
  55. border-color: nc-darken($color-primary-element, 40%) !important;
  56. }
  57. input[type='checkbox'].checkbox--white:not(:disabled):not(:checked) + label:hover:before,
  58. input[type='checkbox'].checkbox--white:focus + label:before {
  59. border-color: nc-darken($color-primary-element, 30%) !important;
  60. }
  61. input[type='checkbox'].checkbox--white:checked + label:before {
  62. border-color: nc-darken($color-primary-element, 30%) !important;
  63. background-color: nc-darken($color-primary-element, 30%) !important;
  64. @include icon-color('checkbox-mark', 'actions', $color-white, 1, true);
  65. }
  66. }
  67. #body-user {
  68. .primary {
  69. border: 1px solid transparent;
  70. }
  71. }
  72. } @else {
  73. #appmenu:not(.inverted) svg {
  74. filter: none;
  75. }
  76. #appmenu.inverted svg {
  77. filter: invert(1);
  78. }
  79. }
  80. /* Colorized svg images */
  81. .icon-file, .icon-filetype-text {
  82. background-image: url(./img/core/filetypes/text.svg?v=#{$theming-cachebuster});
  83. }
  84. .icon-folder, .icon-filetype-folder {
  85. background-image: url(./img/core/filetypes/folder.svg?v=#{$theming-cachebuster});
  86. }
  87. .icon-filetype-folder-drag-accept {
  88. background-image: url(./img/core/filetypes/folder-drag-accept.svg?v=#{$theming-cachebuster}) !important;
  89. }
  90. #theming-preview-logo,
  91. #header .logo {
  92. background-image: $image-logo;
  93. }
  94. /* override styles for login screen in guest.css */
  95. @if variable_exists('theming-logo-mime') and $theming-logo-mime != '' {
  96. #theming-preview-logo,
  97. #header .logo {
  98. background-size: contain;
  99. }
  100. #body-login #header .logo {
  101. margin-bottom: 22px;
  102. }
  103. }
  104. @if variable_exists('theming-background-mime') and $theming-background-mime != '' {
  105. #body-login,
  106. #firstrunwizard .firstrunwizard-header,
  107. #theming-preview {
  108. background-image: $image-login-background;
  109. background-color: $color-primary;
  110. }
  111. } @else {
  112. #theming-preview {
  113. background-image: $image-login-background;
  114. background-color: $color-primary;
  115. }
  116. }
  117. @if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' {
  118. #theming .advanced-option-logoheader .image-preview,
  119. body:not(#body-login) #header .logo {
  120. background-image: url(#{$image-logoheader});
  121. }
  122. } @else {
  123. #theming .advanced-option-favicon .image-preview {
  124. background-image: none;
  125. }
  126. }
  127. @if variable_exists('theming-favicon-mime') and $theming-favicon-mime != '' {
  128. #theming .advanced-option-favicon .image-preview {
  129. background-image: url(#{$image-favicon});
  130. }
  131. } @else {
  132. #theming .advanced-option-favicon .image-preview {
  133. background-image: none;
  134. }
  135. }
  136. input.primary,
  137. #alternative-logins li a {
  138. background-color: $color-primary-element;
  139. border: 1px solid $color-primary-text;
  140. color: $color-primary-text;
  141. }
  142. @if (luma($color-primary) > 0.6) {
  143. #body-login #submit-wrapper .icon-confirm-white {
  144. background-image: url('../../../core/img/actions/confirm.svg');
  145. }
  146. }
  147. // plain background color for login page
  148. @if $image-login-plain == 'true' {
  149. #body-login, #firstrunwizard .firstrunwizard-header, #theming-preview {
  150. background-image: none !important;
  151. background-color: $color-primary;
  152. }
  153. #body-login {
  154. a, label, p {
  155. color: var(--color-primary-text);
  156. }
  157. }
  158. } @else {
  159. #body-login {
  160. background-color: $color-primary;
  161. }
  162. }
  163. @if ($color-primary == #ffffff) {
  164. /* show grey border below header */
  165. #body-user #header,
  166. #body-settings #header,
  167. #body-public #header {
  168. border-bottom: 1px solid #ebebeb;
  169. }
  170. /* show triangle in header in grey */
  171. #appmenu li a.active:before,
  172. .header-right #settings #expand:before {
  173. border-bottom-color:#ebebeb;
  174. }
  175. /* show border around quota bar in files app */
  176. .app-files #quota .quota-container {
  177. border: 1px solid #ebebeb;
  178. }
  179. }
  180. @if ($has-legal-links == 'true') {
  181. footer {
  182. height: 92px;
  183. }
  184. }