icons.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*!
  2. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. @use 'variables';
  6. @import 'functions';
  7. /* GLOBAL ------------------------------------------------------------------- */
  8. [class^='icon-'], [class*=' icon-'] {
  9. background-repeat: no-repeat;
  10. background-position: center;
  11. min-width: 16px;
  12. min-height: 16px;
  13. }
  14. .icon-breadcrumb {
  15. background-image: url('../img/breadcrumb.svg?v=1');
  16. }
  17. /* LOADING ------------------------------------------------------------------ */
  18. .loading,
  19. .loading-small,
  20. .icon-loading,
  21. .icon-loading-dark,
  22. .icon-loading-small,
  23. .icon-loading-small-dark {
  24. position: relative;
  25. &:after {
  26. z-index: 2;
  27. content: '';
  28. height: 28px;
  29. width: 28px;
  30. margin: -16px 0 0 -16px;
  31. position: absolute;
  32. top: 50%;
  33. left: 50%;
  34. border-radius: 100%;
  35. -webkit-animation: rotate .8s infinite linear;
  36. animation: rotate .8s infinite linear;
  37. -webkit-transform-origin: center;
  38. -ms-transform-origin: center;
  39. transform-origin: center;
  40. border: 2px solid var(--color-loading-light);
  41. border-top-color: var(--color-loading-dark);
  42. // revert if background is too bright
  43. filter: var(--background-invert-if-dark);
  44. .primary &,
  45. .primary + & {
  46. // revert if primary is too bright
  47. filter: var(--primary-invert-if-bright);
  48. }
  49. }
  50. }
  51. .icon-loading-dark:after,
  52. .icon-loading-small-dark:after {
  53. border: 2px solid var(--color-loading-dark);
  54. border-top-color: var(--color-loading-light);
  55. }
  56. .icon-loading-small:after,
  57. .icon-loading-small-dark:after {
  58. height: 12px;
  59. width: 12px;
  60. margin: -8px 0 0 -8px;
  61. }
  62. /* Css replaced elements don't have ::after nor ::before */
  63. audio, canvas, embed, iframe, img, input, object, video {
  64. &.icon-loading {
  65. background-image: url('../img/loading.gif');
  66. }
  67. &.icon-loading-dark {
  68. background-image: url('../img/loading-dark.gif');
  69. }
  70. &.icon-loading-small {
  71. background-image: url('../img/loading-small.gif');
  72. }
  73. &.icon-loading-small-dark {
  74. background-image: url('../img/loading-small-dark.gif');
  75. }
  76. }
  77. @keyframes rotate {
  78. from {
  79. transform: rotate(0deg);
  80. }
  81. to {
  82. transform: rotate(360deg);
  83. }
  84. }
  85. .icon-32 {
  86. background-size: 32px !important;
  87. }
  88. .icon-white.icon-shadow,
  89. .icon-audio-white,
  90. .icon-audio-off-white,
  91. .icon-fullscreen-white,
  92. .icon-screen-white,
  93. .icon-screen-off-white,
  94. .icon-video-white,
  95. .icon-video-off-white {
  96. filter: drop-shadow(1px 1px 4px var(--color-box-shadow));
  97. }
  98. /* ICONS -------------------------------------------------------------------
  99. * These icon classes are generated automatically with the following pattern
  100. * .icon-close (black icon)
  101. * .icon-close-white (white icon)
  102. * .icon-close.icon-white (white icon)
  103. *
  104. * Some class definitions are kept as before, since they don't follow the pattern
  105. * or have some additional styling like drop shadows
  106. */
  107. @import url('../../dist/icons.css');