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.

284 lines
5.1 KiB

  1. @function hex-color($color) {
  2. @if type-of($color) == 'color' {
  3. $color: str-slice(ie-hex-str($color), 4);
  4. }
  5. @return '%23' + unquote($color);
  6. }
  7. body {
  8. font-family: $font-sans-serif, sans-serif;
  9. background: darken($ui-base-color, 7%);
  10. font-size: 13px;
  11. line-height: 18px;
  12. font-weight: 400;
  13. color: $primary-text-color;
  14. text-rendering: optimizelegibility;
  15. font-feature-settings: 'kern';
  16. text-size-adjust: none;
  17. -webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
  18. -webkit-tap-highlight-color: transparent;
  19. &.system-font {
  20. // system-ui => standard property (Chrome/Android WebView 56+, Opera 43+, Safari 11+)
  21. // -apple-system => Safari <11 specific
  22. // BlinkMacSystemFont => Chrome <56 on macOS specific
  23. // Segoe UI => Windows 7/8/10
  24. // Oxygen => KDE
  25. // Ubuntu => Unity/Ubuntu
  26. // Cantarell => GNOME
  27. // Fira Sans => Firefox OS
  28. // Droid Sans => Older Androids (<4.0)
  29. // Helvetica Neue => Older macOS <10.11
  30. // $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
  31. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
  32. Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
  33. $font-sans-serif, sans-serif;
  34. }
  35. &.app-body {
  36. padding: 0;
  37. &.layout-single-column {
  38. height: auto;
  39. min-height: 100vh;
  40. overflow-y: scroll;
  41. }
  42. &.layout-multiple-columns {
  43. position: absolute;
  44. width: 100%;
  45. height: 100%;
  46. }
  47. &.with-modals--active {
  48. overflow-y: hidden;
  49. }
  50. }
  51. &.lighter {
  52. background: $ui-base-color;
  53. }
  54. &.with-modals {
  55. overflow-x: hidden;
  56. overflow-y: scroll;
  57. &--active {
  58. overflow-y: hidden;
  59. }
  60. }
  61. &.player {
  62. padding: 0;
  63. margin: 0;
  64. position: absolute;
  65. width: 100%;
  66. height: 100%;
  67. overflow: hidden;
  68. & > div {
  69. height: 100%;
  70. }
  71. .video-player video {
  72. width: 100%;
  73. height: 100%;
  74. max-height: 100vh;
  75. }
  76. .media-gallery {
  77. margin-top: 0;
  78. height: 100% !important;
  79. border-radius: 0;
  80. }
  81. .media-gallery__item {
  82. border-radius: 0;
  83. }
  84. }
  85. &.embed {
  86. background: lighten($ui-base-color, 4%);
  87. margin: 0;
  88. padding-bottom: 0;
  89. .container {
  90. position: absolute;
  91. width: 100%;
  92. height: 100%;
  93. overflow: hidden;
  94. }
  95. }
  96. &.admin {
  97. background: darken($ui-base-color, 4%);
  98. padding: 0;
  99. }
  100. &.error {
  101. position: absolute;
  102. text-align: center;
  103. color: $darker-text-color;
  104. background: $ui-base-color;
  105. width: 100%;
  106. height: 100%;
  107. padding: 0;
  108. display: flex;
  109. justify-content: center;
  110. align-items: center;
  111. .dialog {
  112. vertical-align: middle;
  113. margin: 20px;
  114. &__illustration {
  115. img {
  116. display: block;
  117. max-width: 470px;
  118. width: 100%;
  119. height: auto;
  120. margin-top: -120px;
  121. }
  122. }
  123. h1 {
  124. font-size: 20px;
  125. line-height: 28px;
  126. font-weight: 400;
  127. }
  128. }
  129. }
  130. }
  131. button {
  132. font-family: inherit;
  133. cursor: pointer;
  134. &:focus {
  135. outline: none;
  136. }
  137. }
  138. .app-holder {
  139. &,
  140. & > div,
  141. & > noscript {
  142. display: flex;
  143. width: 100%;
  144. align-items: center;
  145. justify-content: center;
  146. outline: 0 !important;
  147. }
  148. & > noscript {
  149. height: 100vh;
  150. }
  151. }
  152. .layout-single-column .app-holder {
  153. &,
  154. & > div {
  155. min-height: 100vh;
  156. }
  157. }
  158. .layout-multiple-columns .app-holder {
  159. &,
  160. & > div {
  161. height: 100%;
  162. }
  163. }
  164. .error-boundary,
  165. .app-holder noscript {
  166. flex-direction: column;
  167. font-size: 16px;
  168. font-weight: 400;
  169. line-height: 1.7;
  170. color: lighten($error-red, 4%);
  171. text-align: center;
  172. & > div {
  173. max-width: 500px;
  174. }
  175. p {
  176. margin-bottom: 0.85em;
  177. &:last-child {
  178. margin-bottom: 0;
  179. }
  180. }
  181. a {
  182. color: $highlight-text-color;
  183. &:hover,
  184. &:focus,
  185. &:active {
  186. text-decoration: none;
  187. }
  188. }
  189. &__footer {
  190. color: $dark-text-color;
  191. font-size: 13px;
  192. a {
  193. color: $dark-text-color;
  194. }
  195. }
  196. button {
  197. display: inline;
  198. border: 0;
  199. background: transparent;
  200. color: $dark-text-color;
  201. font: inherit;
  202. padding: 0;
  203. margin: 0;
  204. line-height: inherit;
  205. cursor: pointer;
  206. outline: 0;
  207. transition: color 300ms linear;
  208. text-decoration: underline;
  209. &:hover,
  210. &:focus,
  211. &:active {
  212. text-decoration: none;
  213. }
  214. &.copied {
  215. color: $valid-value-color;
  216. transition: none;
  217. }
  218. }
  219. }
  220. .logo-resources {
  221. // Not using display: none because of https://bugs.chromium.org/p/chromium/issues/detail?id=258029
  222. visibility: hidden;
  223. user-select: none;
  224. pointer-events: none;
  225. width: 0;
  226. height: 0;
  227. overflow: hidden;
  228. position: absolute;
  229. top: 0;
  230. left: 0;
  231. z-index: -1000;
  232. }
  233. // NoScript adds a __ns__pop2top class to the full ancestry of blocked elements,
  234. // to set the z-index to a high value, which messes with modals and dropdowns.
  235. // Blocked elements can in theory only be media and frames/embeds, so they
  236. // should only appear in statuses, under divs and articles.
  237. body,
  238. div,
  239. article {
  240. .__ns__pop2top {
  241. z-index: unset !important;
  242. }
  243. }