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.

481 lines
9.2 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Sidebar
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'module';
  15. @element : 'sidebar';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Sidebar
  19. *******************************/
  20. /* Sidebar Menu */
  21. .ui.sidebar {
  22. position: fixed;
  23. top: 0;
  24. left: 0;
  25. visibility: hidden;
  26. background: @sidebarBackground;
  27. backface-visibility: hidden;
  28. height: 100% !important;
  29. width: @sidebarWidth !important;
  30. border-radius: 0em !important;
  31. margin: 0 !important;
  32. transition: none;
  33. will-change: transform;
  34. overflow-y: auto !important;
  35. backface-visibility: hidden;
  36. }
  37. /*--------------
  38. Body
  39. ---------------*/
  40. /* Sets 3D Perspective */
  41. .pushable {
  42. background: @canvasBackground !important;
  43. position: relative;
  44. height: 100%;
  45. overflow-x: hidden;
  46. }
  47. /*--------------
  48. Fixed
  49. ---------------*/
  50. .pushable > .ui.fixed {
  51. position: fixed;
  52. transition: transform @duration @easing;
  53. z-index: @fixedLayer;
  54. }
  55. /*--------------
  56. Pusher
  57. ---------------*/
  58. .pushable > .pusher {
  59. background: @canvasBackground;
  60. height: 100%;
  61. z-index: @middleLayer;
  62. transition: transform @duration @easing;
  63. }
  64. /*--------------
  65. Page
  66. ---------------*/
  67. .pushable > .pusher > .page {
  68. position: relative;
  69. min-height: 100%;
  70. background: @bodyBackground;
  71. }
  72. /*--------------
  73. Dimmer
  74. ---------------*/
  75. .pushable > .pusher > .page:after {
  76. position: absolute;
  77. top: 0px;
  78. right: 0px;
  79. content: '';
  80. background-color: @dimmerColor;
  81. width: 0px;
  82. height: 0px;
  83. overflow: hidden;
  84. opacity: 0;
  85. z-index: @dimmerLayer;
  86. transition: opacity @duration;
  87. will-change: opacity;
  88. }
  89. /*******************************
  90. States
  91. *******************************/
  92. /*--------------
  93. Pushed
  94. ---------------*/
  95. .pushable.pushed {
  96. overflow-x: hidden;
  97. }
  98. /* Show Dimmer */
  99. .pushable.pushed > .pusher > .page:after {
  100. width: 100% !important;
  101. height: 100% !important;
  102. opacity: 1 !important;
  103. }
  104. .pushable.pushed > .fixed,
  105. .pushable.pushed > .pusher {
  106. backface-visibility: hidden;
  107. -webkit-overflow-scrolling: touch;
  108. }
  109. .pushable.active > .visible.sidebar {
  110. -webkit-overflow-scrolling: touch;
  111. backface-visibility: hidden;
  112. z-index: 9999;
  113. }
  114. /*--------------
  115. Animation
  116. ---------------*/
  117. .pushable.show > .pusher,
  118. .pushable.hide > .pusher {
  119. backface-visibility: hidden;
  120. }
  121. .pushable.show > .visible.sidebar,
  122. .pushable.hide > .visible.sidebar {
  123. backface-visibility: hidden;
  124. }
  125. /*.pushable.hide > .pusher > .page *,
  126. .pushable.show > .pusher > .page *,
  127. .pushable.pushed > .pusher > .page * {
  128. transition: none !important;
  129. }*/
  130. /*--------------
  131. Visible
  132. ---------------*/
  133. .pushable > .visible.ui.sidebar {
  134. visibility: visible;
  135. }
  136. /*******************************
  137. Variations
  138. *******************************/
  139. /*--------------
  140. Styled
  141. ---------------*/
  142. .ui.styled.sidebar {
  143. background-color: #FFFFFF;
  144. padding: 1em 1.25em;
  145. border-right: 1px solid #DDDDDD;
  146. }
  147. /*******************************
  148. Animations
  149. *******************************/
  150. /*--------------
  151. Overlay
  152. ---------------*/
  153. /* Set-up */
  154. .pushable.overlay > .visible.ui.sidebar {
  155. transform: translate3d(-100%, 0, 0);
  156. z-index: @topLayer;
  157. }
  158. /* Pushed */
  159. .pushable.overlay.pushed .visible.ui.sidebar {
  160. transform: translate3d(0%, 0, 0);
  161. }
  162. /* Animation */
  163. .pushable.overlay.show > .visible.ui.sidebar,
  164. .pushable.overlay.hide > .visible.ui.sidebar {
  165. transition: transform @duration @easing;
  166. }
  167. /*--------------
  168. Safe Mode
  169. ---------------*/
  170. /* Set-Up */
  171. .pushable.safe > .pusher {
  172. position: relative;
  173. transform: none !important;
  174. transition: none !important;
  175. }
  176. .pushable.safe > .pusher {
  177. transform: none !important;
  178. transition: none !important;
  179. }
  180. /* Pushed */
  181. .pushable.safe.pushed {
  182. margin-left: @sidebarWidth !important;
  183. }
  184. .pushable.safe.show,
  185. .pushable.safe.hide {
  186. transition: margin @duration @easing !important;
  187. }
  188. /*--------------
  189. Push
  190. ---------------*/
  191. /* Set-Up */
  192. .pushable.push > .fixed,
  193. .pushable.push > .pusher {
  194. transform: translate3d(0px, 0, 0);
  195. }
  196. .pushable.push > .visible.ui.sidebar {
  197. transform: translate3d(-100%, 0, 0);
  198. }
  199. /* Pushed */
  200. .pushable.push.pushed > .visible.ui.sidebar {
  201. transform: translate3d(0%, 0, 0);
  202. }
  203. .pushable.push.pushed > .fixed,
  204. .pushable.push.pushed > .pusher {
  205. transform: translate3d(@sidebarWidth, 0, 0);
  206. }
  207. .pushable.push.show > .visible.ui.sidebar,
  208. .pushable.push.hide > .visible.ui.sidebar {
  209. transition: transform @duration @easing;
  210. }
  211. /*--------------
  212. Reveal
  213. ---------------*/
  214. /* Set-up */
  215. .pushable.reveal > .fixed,
  216. .pushable.reveal > .pusher {
  217. transform: translate3d(0px, 0, 0);
  218. }
  219. .pushable.reveal > .pusher {
  220. z-index: @bottomLayer;
  221. }
  222. .pushable.reveal > .visible.ui.sidebar {
  223. transition: none;
  224. }
  225. /* Pushed */
  226. .pushable.reveal.pushed > .fixed,
  227. .pushable.reveal.pushed > .pusher {
  228. transform: translate3d(@sidebarWidth, 0, 0);
  229. }
  230. /*--------------
  231. Slide Along
  232. ---------------*/
  233. /* Set-up */
  234. .pushable.slide.along > .fixed,
  235. .pushable.slide.along > .pusher {
  236. transform: translate3d(0px, 0, 0);
  237. }
  238. .pushable.slide.along > .pusher {
  239. z-index: @bottomLayer;
  240. }
  241. .pushable.slide.along > .visible.ui.sidebar {
  242. transform: translate3d(-50%, 0, 0);
  243. }
  244. /* Pushed */
  245. .pushable.slide.along.pushed > .fixed,
  246. .pushable.slide.along.pushed > .pusher {
  247. transform: translate3d(@sidebarWidth, 0, 0);
  248. }
  249. .pushable.slide.along.pushed > .visible.ui.sidebar {
  250. transform: translate3d(0%, 0, 0);
  251. }
  252. .pushable.slide.along.show > .visible.ui.sidebar,
  253. .pushable.slide.along.hide > .visible.ui.sidebar {
  254. transition: transform @duration @easing;
  255. }
  256. /*--------------
  257. Slide Out
  258. ---------------*/
  259. /* Set-up */
  260. .pushable.slide.out > .fixed,
  261. .pushable.slide.out > .pusher {
  262. transform: translate3d(0px, 0, 0);
  263. }
  264. .pushable.slide.out > .visible.ui.sidebar {
  265. transform: translate3d(50%, 0, 0);
  266. }
  267. /* Pushed */
  268. .pushable.slide.out.pushed > .fixed,
  269. .pushable.slide.out.pushed > .pusher {
  270. transform: translate3d(@sidebarWidth, 0, 0);
  271. }
  272. .pushable.slide.out.pushed .visible.ui.sidebar {
  273. transform: translate3d(0%, 0, 0);
  274. }
  275. .pushable.slide.out.show > .visible.ui.sidebar,
  276. .pushable.slide.out.hide > .visible.ui.sidebar {
  277. transition: transform @duration @easing;
  278. }
  279. /*--------------
  280. Scale Down
  281. ---------------*/
  282. /* Set-up */
  283. .pushable.scale.down > .fixed {
  284. transform: translate3d(0px, 0, 0);
  285. }
  286. .pushable.scale.down > .pusher {
  287. z-index: @bottomLayer;
  288. transform-origin: 75% 50%;
  289. overflow: hidden;
  290. }
  291. .pushable.scale.down > .visible.ui.sidebar {
  292. transform: translate3d(-100%, 0, 0);
  293. z-index: @topLayer;
  294. }
  295. /* Pushed */
  296. .pushable.scale.down.pushed > .pusher {
  297. transform: scale(0.75);
  298. }
  299. .pushable.scale.down.pushed > .visible.ui.sidebar {
  300. transform: translate3d(0, 0, 0);
  301. }
  302. .pushable.scale.down.pushed > .fixed {
  303. transform: translate3d(@sidebarWidth, 0, 0);
  304. }
  305. /* 3D transition cant have duration set until animation */
  306. .pushable.scale.down.show > .visible.ui.sidebar,
  307. .pushable.scale.down.hide > .visible.ui.sidebar {
  308. transition: transform @duration @easing;
  309. }
  310. /*--------------
  311. Scale Up
  312. ---------------*/
  313. /* Set-up */
  314. .pushable.scale.up {
  315. perspective: @perspective;
  316. perspective-origin: 0% 50%;
  317. }
  318. .pushable.scale.up > .ui.sidebar {
  319. transform: translate3d(0, 0, -@sidebarWidth);
  320. }
  321. /* Pushed */
  322. .pushable.scale.up.pushed > .fixed,
  323. .pushable.scale.up.pushed > .pusher {
  324. transform: translate3d(@sidebarWidth, 0, 0);
  325. }
  326. .pushable.scale.up.pushed > .visible.ui.sidebar {
  327. transform: translate3d(0, 0, 0);
  328. }
  329. /* Animation */
  330. .pushable.scale.up.show > .ui.sidebar,
  331. .pushable.scale.up.hide > .ui.sidebar {
  332. transition: transform @duration @easing;
  333. }
  334. /*--------------
  335. Open Door
  336. ---------------*/
  337. /* Set-up */
  338. .pushable.open.door {
  339. perspective: @perspective;
  340. }
  341. .pushable.open.door > .ui.sidebar {
  342. opacity: 1;
  343. transform: translate3d(-100%, 0, 0);
  344. z-index: @topLayer;
  345. }
  346. .pushable.open.door > .pusher {
  347. transform-origin: 100% 50%;
  348. transform: rotateY(0deg);
  349. }
  350. /* Pushed */
  351. .pushable.open.door.pushed > .pusher {
  352. transform: rotateY(-10deg);
  353. }
  354. .pushable.open.door.pushed > .visible.ui.sidebar {
  355. transform: translate3d(0, 0, 0);
  356. }
  357. /* Animation */
  358. .pushable.open.door.show > .ui.sidebar,
  359. .pushable.open.door.hide > .ui.sidebar {
  360. transition: transform @duration;
  361. }
  362. /*--------------
  363. Rotate In
  364. ---------------*/
  365. /* Set-up */
  366. .pushable.rotate.in {
  367. perspective: @perspective;
  368. perspective-origin: 0% 50%;
  369. }
  370. .pushable.rotate.in > .pusher {
  371. perspective: none;
  372. }
  373. .pushable.rotate.in > .ui.sidebar {
  374. transform: translate3d(-100%, 0, 0) rotateY(90deg);
  375. transform-origin: 50% 100% 0;
  376. transform-style: preserve-3d;
  377. }
  378. /* Pushed */
  379. .pushable.rotate.in.pushed > .pusher {
  380. transform: translate3d(@sidebarWidth, 0, 0);
  381. }
  382. .pushable.rotate.in.pushed .visible.ui.sidebar {
  383. transform: translate3d(0%, 0, 0) rotateY(0deg);
  384. }
  385. /* Return Animation */
  386. .pushable.rotate.in.hide > .visible.ui.sidebar {
  387. transform: translate3d(-100%, 0, 0) rotateY(0deg);
  388. transition: transform @duration ease 0s;
  389. }
  390. .pushable.rotate.in.active,
  391. .pushable.rotate.in.hide {
  392. overflow-y: hidden;
  393. }
  394. /* Animation */
  395. .pushable.rotate.in.show > .ui.sidebar,
  396. .pushable.rotate.in.hide > .ui.sidebar {
  397. transition: transform @duration ease-in-out 0s;
  398. }