application.scss 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
  2. @use 'sass:math';
  3. @use '_variables' as *;
  4. @use '_mixins' as *;
  5. @use '_fonts';
  6. @use './classes';
  7. @use './custom-markup';
  8. @use './ng-select';
  9. // Needs an import because we extends glyphicon icons in primeng
  10. @import './bootstrap';
  11. @import './primeng-custom';
  12. @import './z-index';
  13. [hidden] {
  14. display: none !important;
  15. }
  16. body {
  17. /*** theme ***/
  18. // now beware sass requires interpolation
  19. // for css custom properties #{$var}
  20. --mainColor: #{$main-color};
  21. --mainColorLighter: #{$main-color-lighter};
  22. --mainColorLightest: #{$main-color-lightest};
  23. --mainHoverColor: #{$main-hover-color};
  24. --mainBackgroundHoverColor: #{$main-background-hover-color};
  25. --mainBackgroundColor: #{$bg-color};
  26. --mainForegroundColor: #{$fg-color};
  27. --secondaryColor: #{$secondary-color};
  28. --greyForegroundColor: #{$grey-foreground-color};
  29. --greyBackgroundColor: #{$grey-background-color};
  30. --greySecondaryBackgroundColor: #{$grey-background-hover-color};
  31. --menuBackgroundColor: #{$menu-background};
  32. --menuForegroundColor: #{$menu-color};
  33. --submenuBackgroundColor: #{$sub-menu-background-color};
  34. --channelBackgroundColor: #{$channel-background-color};
  35. --inputForegroundColor: #{$input-foreground-color};
  36. --inputBackgroundColor: #{$input-background-color};
  37. --inputPlaceholderColor: #{$input-placeholder-color};
  38. --textareaForegroundColor: #{$textarea-foreground-color};
  39. --textareaBackgroundColor: #{$textarea-background-color};
  40. --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
  41. --actionButtonColor: #{$grey-foreground-color};
  42. --supportButtonBackgroundColor: #{transparent};
  43. --supportButtonColor: #{pvar(--actionButtonColor)};
  44. --supportButtonHeartColor: #{$support-button-heart};
  45. --activatedActionButtonColor: #{$activated-action-button-color};
  46. --horizontalMarginContent: #{$not-expanded-horizontal-margins};
  47. --videosHorizontalMarginContent: 6vw;
  48. --mainColWidth: calc(100vw - #{$menu-width});
  49. font-family: $main-fonts;
  50. font-weight: $font-regular;
  51. color: pvar(--mainForegroundColor);
  52. background-color: pvar(--mainBackgroundColor);
  53. font-size: 14px;
  54. // On desktop browsers, make sure vertical scroll bar is always visible
  55. // Allow to disable the scrollbar instead of hide it when the content fit the body
  56. // And not move the content and header horizontally sticked to right when the content is updating
  57. overflow-y: scroll;
  58. // Fix "reboot" style that set text-align: left
  59. text-align: start;
  60. }
  61. ::selection {
  62. color: pvar(--mainBackgroundColor);
  63. background-color: pvar(--mainHoverColor);
  64. }
  65. noscript,
  66. #incompatible-browser {
  67. display: block;
  68. font-size: 1.2rem;
  69. max-width: 600px;
  70. margin: 1rem auto;
  71. }
  72. strong {
  73. font-weight: $font-semibold;
  74. }
  75. input[readonly] {
  76. /* Force blank on readonly inputs */
  77. background-color: pvar(--inputBackgroundColor) !important;
  78. }
  79. input,
  80. textarea {
  81. outline: none;
  82. color: pvar(--inputForegroundColor);
  83. }
  84. button {
  85. @include disable-outline;
  86. background: unset;
  87. }
  88. label {
  89. font-weight: $font-bold;
  90. font-size: 15px;
  91. }
  92. code {
  93. background-color: pvar(--greyBackgroundColor);
  94. color: pvar(--greyForegroundColor);
  95. border-radius: 3px;
  96. padding: .2em .4em;
  97. margin: auto .4em;
  98. font-size: 75%;
  99. display: inline-block;
  100. vertical-align: middle;
  101. }
  102. .form-error,
  103. .form-warning {
  104. display: block;
  105. margin-top: 5px;
  106. }
  107. .form-error {
  108. color: $red;
  109. }
  110. .input-error,
  111. my-input-toggle-hidden ::ng-deep input {
  112. border-color: $red !important;
  113. }
  114. .full-width {
  115. width: 100%;
  116. margin: 0 auto;
  117. max-width: initial;
  118. }
  119. .glyphicon-black {
  120. color: #000;
  121. }
  122. .row {
  123. margin: 0 !important;
  124. }
  125. .main-col {
  126. @include margin-left($menu-width);
  127. width: calc(100% - #{$menu-width});
  128. outline: none;
  129. .margin-content {
  130. margin: 0 pvar(--horizontalMarginContent);
  131. flex-grow: 1;
  132. }
  133. .sub-menu {
  134. background-color: pvar(--submenuBackgroundColor);
  135. width: 100%;
  136. display: flex;
  137. align-items: center;
  138. padding: 0 pvar(--horizontalMarginContent);
  139. height: $sub-menu-height;
  140. margin-bottom: $sub-menu-margin-bottom;
  141. overflow-x: auto;
  142. &.sub-menu-fixed {
  143. position: fixed;
  144. z-index: #{z('sub-menu') - 1};
  145. max-width: pvar(--mainColWidth);
  146. }
  147. }
  148. // Use an appropriate offset top when sub-menu fixed
  149. .margin-content.offset-content {
  150. padding-top: $sub-menu-height + $sub-menu-margin-bottom;
  151. }
  152. // Override some properties if the main content is expanded (no menu on the left)
  153. &.expanded {
  154. --horizontalMarginContent: #{$expanded-horizontal-margins};
  155. --mainColWidth: 100vw;
  156. @include margin-left(0);
  157. width: 100%;
  158. }
  159. &.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */
  160. // Lock and hide body scrollbars
  161. position: fixed;
  162. // Lock and hide sub-menu scrollbars
  163. .sub-menu { /* stylelint-disable-line */
  164. overflow-x: hidden;
  165. }
  166. }
  167. }
  168. .title-page {
  169. @include disable-default-a-behaviour;
  170. @include margin-right(55px);
  171. opacity: 0.6;
  172. color: pvar(--mainForegroundColor);
  173. font-size: 16px;
  174. display: inline-block;
  175. font-weight: $font-semibold;
  176. border-bottom: 2px solid transparent;
  177. &.title-page-single {
  178. margin-top: 30px;
  179. margin-bottom: 25px;
  180. }
  181. &.active {
  182. border-bottom-color: pvar(--mainColor);
  183. }
  184. &.title-page-single {
  185. font-size: 125%;
  186. }
  187. &:hover,
  188. &:active,
  189. &:focus {
  190. color: pvar(--mainForegroundColor);
  191. }
  192. &.active,
  193. &:hover,
  194. &:active,
  195. &:focus,
  196. &.title-page-single {
  197. opacity: 1;
  198. outline: 0 hidden !important;
  199. }
  200. @media screen and (max-width: $mobile-view) {
  201. @include margin-left(15px);
  202. }
  203. }
  204. .title-page-about,
  205. .title-page-settings {
  206. white-space: nowrap;
  207. font-size: 115%;
  208. }
  209. .admin-sub-header {
  210. display: flex;
  211. align-items: center;
  212. margin-bottom: 30px;
  213. }
  214. // In tables, don't have a hover different background
  215. table {
  216. .action-button-edit,
  217. .action-button-delete {
  218. &:hover,
  219. &:active,
  220. &:focus,
  221. &[disabled],
  222. &.disabled {
  223. background-color: $grey-background-color !important;
  224. }
  225. }
  226. }
  227. .no-results {
  228. height: 40vh;
  229. max-height: 500px;
  230. display: flex;
  231. flex-direction: column;
  232. align-items: center;
  233. justify-content: center;
  234. font-size: 16px;
  235. font-weight: $font-semibold;
  236. }
  237. .dropdown-item {
  238. @include dropdown-with-icon-item;
  239. my-global-icon {
  240. width: 22px;
  241. height: 22px;
  242. }
  243. }
  244. /* offsetTop for scrollToAnchor */
  245. .anchor {
  246. position: relative;
  247. top: #{-($header-height + 20px)};
  248. }
  249. .offset-content { // if sub-menu fixed
  250. .anchor {
  251. top: #{-($header-height + $sub-menu-height + 20px)};
  252. }
  253. }
  254. .form-group-description {
  255. @extend .muted !optional;
  256. font-size: 90%;
  257. margin-top: 10px;
  258. }
  259. @media screen and (max-width: #{breakpoint(xxl)}) {
  260. .main-col {
  261. --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)};
  262. --videosHorizontalMarginContent: 30px;
  263. &.expanded {
  264. --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)};
  265. }
  266. }
  267. }
  268. @media screen and (max-width: #{breakpoint(lg)}) {
  269. .main-col {
  270. --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)};
  271. }
  272. /* the following applies from 500px to 900px and is partially overridden from 500px to 800px by changes below to $small-view */
  273. .main-col,
  274. .main-col.expanded {
  275. --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)};
  276. .sub-menu {
  277. padding: 0 50px;
  278. .title-page {
  279. font-size: 17px;
  280. }
  281. }
  282. }
  283. }
  284. @media screen and (min-width: $mobile-view) and (max-width: $small-view) {
  285. .main-col {
  286. width: 100%;
  287. }
  288. }
  289. @media screen and (max-width: $small-view) {
  290. .main-col,
  291. .main-col.expanded {
  292. --horizontalMarginContent: 15px;
  293. @include margin-left(0);
  294. .sub-menu {
  295. width: 100vw;
  296. padding: 0 15px;
  297. margin-bottom: $sub-menu-margin-bottom-small-view;
  298. overflow-x: auto;
  299. }
  300. // Use an appropriate offset top when sub-menu fixed
  301. .margin-content.offset-content {
  302. padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
  303. }
  304. .admin-sub-header {
  305. flex-direction: column;
  306. }
  307. my-markdown-textarea {
  308. .root {
  309. max-width: 100% !important;
  310. }
  311. }
  312. input[type=text],
  313. input[type=password],
  314. input[type=email],
  315. textarea,
  316. .peertube-select-container {
  317. flex-grow: 1;
  318. }
  319. .caption input[type=text] {
  320. width: unset !important;
  321. flex-grow: 1;
  322. }
  323. }
  324. }