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.

447 lines
8.4 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
  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. Pusher
  49. ---------------*/
  50. .pushable > .pusher {
  51. background: @canvasBackground;
  52. height: 100%;
  53. z-index: 1002;
  54. transition: transform @duration @easing;
  55. }
  56. /*--------------
  57. Page
  58. ---------------*/
  59. .pushable > .pusher > .page {
  60. position: relative;
  61. min-height: 100%;
  62. background: @bodyBackground;
  63. }
  64. /*--------------
  65. Dimmer
  66. ---------------*/
  67. .pushable > .pusher > .page:after {
  68. position: absolute;
  69. top: 0px;
  70. right: 0px;
  71. content: '';
  72. background-color: @dimmerColor;
  73. width: 0px;
  74. height: 0px;
  75. overflow: hidden;
  76. opacity: 0;
  77. z-index: @dimmerLayer;
  78. transition: opacity @duration;
  79. will-change: opacity;
  80. }
  81. /*******************************
  82. States
  83. *******************************/
  84. /*--------------
  85. Pushed
  86. ---------------*/
  87. .pushable.pushed {
  88. overflow-x: hidden;
  89. }
  90. /* Show Dimmer */
  91. .pushable.pushed > .pusher > .page:after {
  92. width: 100% !important;
  93. height: 100% !important;
  94. opacity: 1 !important;
  95. }
  96. .pushable.pushed > .pusher {
  97. backface-visibility: hidden;
  98. -webkit-overflow-scrolling: touch;
  99. }
  100. .pushable.active > .visible.sidebar {
  101. -webkit-overflow-scrolling: touch;
  102. backface-visibility: hidden;
  103. z-index: 9999;
  104. }
  105. /*--------------
  106. Animation
  107. ---------------*/
  108. .pushable.show > .pusher,
  109. .pushable.hide > .pusher {
  110. backface-visibility: hidden;
  111. }
  112. .pushable.show > .visible.sidebar,
  113. .pushable.hide > .visible.sidebar {
  114. backface-visibility: hidden;
  115. }
  116. /*.pushable.hide > .pusher > .page *,
  117. .pushable.show > .pusher > .page *,
  118. .pushable.pushed > .pusher > .page * {
  119. transition: none !important;
  120. }*/
  121. /*--------------
  122. Visible
  123. ---------------*/
  124. .pushable > .visible.ui.sidebar {
  125. visibility: visible;
  126. }
  127. /*******************************
  128. Variations
  129. *******************************/
  130. /*--------------
  131. Styled
  132. ---------------*/
  133. .ui.styled.sidebar {
  134. background-color: #FFFFFF;
  135. padding: 1em 1.25em;
  136. border-right: 1px solid #DDDDDD;
  137. }
  138. /*******************************
  139. Animations
  140. *******************************/
  141. /*--------------
  142. Overlay
  143. ---------------*/
  144. /* Set-up */
  145. .pushable.overlay > .visible.ui.sidebar {
  146. transform: translate3d(-100%, 0, 0);
  147. z-index: @topLayer;
  148. }
  149. /* Pushed */
  150. .pushable.overlay.pushed .visible.ui.sidebar {
  151. transform: translate3d(0%, 0, 0);
  152. }
  153. /* Animation */
  154. .pushable.overlay.show > .visible.ui.sidebar,
  155. .pushable.overlay.hide > .visible.ui.sidebar {
  156. transition: transform @duration @easing;
  157. }
  158. /*--------------
  159. Push
  160. ---------------*/
  161. /* Set-Up */
  162. .pushable.push > .pusher {
  163. transform: translate3d(0px, 0, 0);
  164. }
  165. .pushable.push > .visible.ui.sidebar {
  166. transform: translate3d(-100%, 0, 0);
  167. }
  168. /* Pushed */
  169. .pushable.push.pushed > .visible.ui.sidebar {
  170. transform: translate3d(0%, 0, 0);
  171. }
  172. .pushable.push.pushed > .pusher {
  173. transform: translate3d(@sidebarWidth, 0, 0);
  174. }
  175. .pushable.push.show > .visible.ui.sidebar,
  176. .pushable.push.hide > .visible.ui.sidebar {
  177. transition: transform @duration @easing;
  178. }
  179. /*--------------
  180. Safe Mode
  181. ---------------*/
  182. /* Set-Up */
  183. .pushable.safe > .pusher {
  184. position: relative;
  185. transform: none !important;
  186. transition: none !important;
  187. }
  188. .pushable.safe > .pusher {
  189. transform: none !important;
  190. transition: none !important;
  191. }
  192. /* Pushed */
  193. .pushable.safe.pushed {
  194. margin-left: @sidebarWidth !important;
  195. }
  196. .pushable.safe.show,
  197. .pushable.safe.hide {
  198. transition: margin @duration @easing !important;
  199. }
  200. /*--------------
  201. Reveal
  202. ---------------*/
  203. /* Set-up */
  204. .pushable.reveal > .pusher {
  205. transform: translate3d(0px, 0, 0);
  206. z-index: @bottomLayer;
  207. }
  208. .pushable.reveal > .visible.ui.sidebar {
  209. transition: none;
  210. }
  211. /* Pushed */
  212. .pushable.reveal.pushed > .pusher {
  213. transform: translate3d(@sidebarWidth, 0, 0);
  214. }
  215. /*--------------
  216. Slide Along
  217. ---------------*/
  218. /* Set-up */
  219. .pushable.slide.along > .pusher {
  220. transform: translate3d(0px, 0, 0);
  221. z-index: @bottomLayer;
  222. }
  223. .pushable.slide.along > .visible.ui.sidebar {
  224. transform: translate3d(-50%, 0, 0);
  225. }
  226. /* Pushed */
  227. .pushable.slide.along.pushed > .pusher {
  228. transform: translate3d(@sidebarWidth, 0, 0);
  229. }
  230. .pushable.slide.along.pushed > .visible.ui.sidebar {
  231. transform: translate3d(0%, 0, 0);
  232. }
  233. .pushable.slide.along.show > .visible.ui.sidebar,
  234. .pushable.slide.along.hide > .visible.ui.sidebar {
  235. transition: transform @duration @easing;
  236. }
  237. /*--------------
  238. Slide Out
  239. ---------------*/
  240. /* Set-up */
  241. .pushable.slide.out > .pusher {
  242. transform: translate3d(0px, 0, 0);
  243. }
  244. .pushable.slide.out > .visible.ui.sidebar {
  245. transform: translate3d(50%, 0, 0);
  246. }
  247. /* Pushed */
  248. .pushable.slide.out.pushed > .pusher {
  249. transform: translate3d(@sidebarWidth, 0, 0);
  250. }
  251. .pushable.slide.out.pushed .visible.ui.sidebar {
  252. transform: translate3d(0%, 0, 0);
  253. }
  254. .pushable.slide.out.show > .visible.ui.sidebar,
  255. .pushable.slide.out.hide > .visible.ui.sidebar {
  256. transition: transform @duration @easing;
  257. }
  258. /*--------------
  259. Scale Down
  260. ---------------*/
  261. /* Set-up */
  262. .pushable.scale.down > .pusher {
  263. z-index: @bottomLayer;
  264. transform-origin: 75% 50%;
  265. overflow: hidden;
  266. }
  267. .pushable.scale.down > .visible.ui.sidebar {
  268. transform: translate3d(-100%, 0, 0);
  269. z-index: @topLayer;
  270. }
  271. /* Pushed */
  272. .pushable.scale.down.pushed > .pusher {
  273. transform: scale(0.75);
  274. }
  275. .pushable.scale.down.pushed > .visible.ui.sidebar {
  276. transform: translate3d(0, 0, 0);
  277. }
  278. /* 3D transition cant have duration set until animation */
  279. .pushable.scale.down.show > .visible.ui.sidebar,
  280. .pushable.scale.down.hide > .visible.ui.sidebar {
  281. transition: transform @duration @easing;
  282. }
  283. /*--------------
  284. Scale Up
  285. ---------------*/
  286. /* Set-up */
  287. .pushable.scale.up {
  288. perspective: @perspective;
  289. perspective-origin: 0% 50%;
  290. }
  291. .pushable.scale.up > .ui.sidebar {
  292. transform: translate3d(0, 0, -@sidebarWidth);
  293. }
  294. /* Pushed */
  295. .pushable.scale.up.pushed > .pusher {
  296. transform: translate3d(@sidebarWidth, 0, 0);
  297. }
  298. .pushable.scale.up.pushed > .visible.ui.sidebar {
  299. transform: translate3d(0, 0, 0);
  300. }
  301. /* Animation */
  302. .pushable.scale.up.show > .ui.sidebar,
  303. .pushable.scale.up.hide > .ui.sidebar {
  304. transition: transform @duration @easing;
  305. }
  306. /*--------------
  307. Open Door
  308. ---------------*/
  309. /* Set-up */
  310. .pushable.open.door {
  311. perspective: @perspective;
  312. }
  313. .pushable.open.door > .ui.sidebar {
  314. opacity: 1;
  315. transform: translate3d(-100%, 0, 0);
  316. z-index: @topLayer;
  317. }
  318. .pushable.open.door > .pusher {
  319. transform-origin: 100% 50%;
  320. transform: rotateY(0deg);
  321. }
  322. /* Pushed */
  323. .pushable.open.door.pushed > .pusher {
  324. transform: rotateY(-10deg);
  325. }
  326. .pushable.open.door.pushed > .visible.ui.sidebar {
  327. transform: translate3d(0, 0, 0);
  328. }
  329. /* Animation */
  330. .pushable.open.door.show > .ui.sidebar,
  331. .pushable.open.door.hide > .ui.sidebar {
  332. transition: transform @duration;
  333. }
  334. /*--------------
  335. Rotate In
  336. ---------------*/
  337. /* Set-up */
  338. .pushable.rotate.in {
  339. perspective: @perspective;
  340. perspective-origin: 0% 50%;
  341. }
  342. .pushable.rotate.in > .pusher {
  343. perspective: none;
  344. }
  345. .pushable.rotate.in > .ui.sidebar {
  346. transform: translate3d(-100%, 0, 0) rotateY(90deg);
  347. transform-origin: 50% 100% 0;
  348. transform-style: preserve-3d;
  349. }
  350. /* Pushed */
  351. .pushable.rotate.in.pushed > .pusher {
  352. transform: translate3d(@sidebarWidth, 0, 0);
  353. }
  354. .pushable.rotate.in.pushed .visible.ui.sidebar {
  355. transform: translate3d(0%, 0, 0) rotateY(0deg);
  356. }
  357. /* Return Animation */
  358. .pushable.rotate.in.hide > .visible.ui.sidebar {
  359. transform: translate3d(-100%, 0, 0) rotateY(0deg);
  360. transition: transform @duration ease 0s;
  361. }
  362. /* Animation */
  363. .pushable.rotate.in.show > .ui.sidebar,
  364. .pushable.rotate.in.hide > .ui.sidebar {
  365. transition: transform @duration ease-in-out 0s;
  366. }