basics.scss 5.3 KB

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