_helpers.scss 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Helper classes
  4. *
  5. * Custom helper classes used in the template.
  6. *
  7. * ---------------------------------------------------------------------------- */
  8. // Content helpers
  9. // -------------------------
  10. // Font size
  11. .font-size-lg {
  12. font-size: $font-size-lg;
  13. }
  14. .font-size-base {
  15. font-size: $font-size-base;
  16. }
  17. .font-size-sm {
  18. font-size: $font-size-sm;
  19. }
  20. .font-size-xs {
  21. font-size: $font-size-xs;
  22. }
  23. // Line height
  24. .line-height-lg {
  25. line-height: $line-height-lg;
  26. }
  27. .line-height-base {
  28. line-height: $line-height-base;
  29. }
  30. .line-height-sm {
  31. line-height: $line-height-sm;
  32. }
  33. .line-height-xs {
  34. line-height: $line-height-xs;
  35. }
  36. .line-height-1 {
  37. line-height: 1;
  38. }
  39. // Opacity
  40. .opacity-75 {
  41. opacity: 0.75;
  42. }
  43. .opacity-50 {
  44. opacity: 0.5;
  45. }
  46. .opacity-25 {
  47. opacity: 0.25;
  48. }
  49. .opacity-0 {
  50. opacity: 0;
  51. }
  52. // Edges
  53. .top {
  54. &-0 {
  55. top: 0;
  56. }
  57. &-auto {
  58. top: auto;
  59. }
  60. }
  61. .bottom {
  62. &-0 {
  63. bottom: 0;
  64. }
  65. &-auto {
  66. bottom: auto;
  67. }
  68. }
  69. .left {
  70. &-0 {
  71. left: 0;
  72. }
  73. &-auto {
  74. left: auto;
  75. }
  76. }
  77. .right {
  78. &-0 {
  79. right: 0;
  80. }
  81. &-auto {
  82. right: auto;
  83. }
  84. }
  85. // Cursors
  86. .cursor-pointer {
  87. cursor: pointer;
  88. }
  89. .cursor-move {
  90. cursor: move;
  91. }
  92. .cursor-default {
  93. cursor: default;
  94. }
  95. .cursor-disabled {
  96. cursor: $cursor-disabled;
  97. }
  98. // Overflow
  99. .overflow-hidden {
  100. overflow: hidden;
  101. }
  102. .overflow-visible {
  103. overflow: visible;
  104. }
  105. .overflow-auto {
  106. overflow: auto;
  107. }
  108. // Borders
  109. // -------------------------
  110. // Set border width to 0
  111. .border-width-0 {
  112. border-width: 0;
  113. }
  114. // Vertical borders
  115. .border-y-0 {
  116. border-top: 0 !important;
  117. border-bottom: 0 !important;
  118. }
  119. // Horizontal borders
  120. .border-x-0 {
  121. border-left: 0 !important;
  122. border-right: 0 !important;
  123. }
  124. //
  125. // Border widths
  126. //
  127. // Default border width
  128. .border-1 {
  129. border: $border-width solid;
  130. }
  131. .border-top-1 {
  132. border-top: $border-width solid;
  133. }
  134. .border-bottom-1 {
  135. border-bottom: $border-width solid;
  136. }
  137. .border-left-1 {
  138. border-left: $border-width solid;
  139. }
  140. .border-right-1 {
  141. border-right: $border-width solid;
  142. }
  143. .border-y-1 {
  144. border-top: $border-width solid;
  145. border-bottom: $border-width solid;
  146. }
  147. .border-x-1 {
  148. border-left: $border-width solid;
  149. border-right: $border-width solid;
  150. }
  151. // Double border
  152. .border-2 {
  153. border: ($border-width * 2) solid;
  154. }
  155. .border-top-2 {
  156. border-top: ($border-width * 2) solid;
  157. }
  158. .border-bottom-2 {
  159. border-bottom: ($border-width * 2) solid;
  160. }
  161. .border-left-2 {
  162. border-left: ($border-width * 2) solid;
  163. }
  164. .border-right-2 {
  165. border-right: ($border-width * 2) solid;
  166. }
  167. .border-y-2 {
  168. border-top: ($border-width * 2) solid;
  169. border-bottom: ($border-width * 2) solid;
  170. }
  171. .border-x-2 {
  172. border-left: ($border-width * 2) solid;
  173. border-right: ($border-width * 2) solid;
  174. }
  175. // Tripple border
  176. .border-3 {
  177. border: ($border-width * 3) solid;
  178. }
  179. .border-top-3 {
  180. border-top: ($border-width * 3) solid;
  181. }
  182. .border-bottom-3 {
  183. border-bottom: ($border-width * 3) solid;
  184. }
  185. .border-left-3 {
  186. border-left: ($border-width * 3) solid;
  187. }
  188. .border-right-3 {
  189. border-right: ($border-width * 3) solid;
  190. }
  191. .border-y-3 {
  192. border-top: ($border-width * 3) solid;
  193. border-bottom: ($border-width * 3) solid;
  194. }
  195. .border-x-3 {
  196. border-left: ($border-width * 3) solid;
  197. border-right: ($border-width * 3) solid;
  198. }
  199. // Border style
  200. .border {
  201. // Dashed
  202. &-dashed {
  203. border-style: dashed;
  204. }
  205. &-top-dashed {
  206. border-top-style: dashed;
  207. }
  208. &-bottom-dashed {
  209. border-bottom-style: dashed;
  210. }
  211. &-left-dashed {
  212. border-left-style: dashed;
  213. }
  214. &-right-dashed {
  215. border-right-style: dashed;
  216. }
  217. // Dotted
  218. &-dotted {
  219. border-style: dotted;
  220. }
  221. }
  222. // Rounded corners
  223. // -------------------------
  224. // Fully rounded borders
  225. .rounded-round {
  226. @include border-radius($border-radius-round !important);
  227. }
  228. .rounded-top-round {
  229. @include border-top-radius($border-radius-round !important);
  230. }
  231. .rounded-bottom-round {
  232. @include border-bottom-radius($border-radius-round !important);
  233. }
  234. .rounded-left-round {
  235. @include border-left-radius($border-radius-round !important);
  236. }
  237. .rounded-right-round {
  238. @include border-right-radius($border-radius-round !important);
  239. }
  240. //
  241. // Remove rounded corners from specific side
  242. //
  243. .rounded-top-0 {
  244. @include border-top-radius(0 !important);
  245. }
  246. .rounded-bottom-0 {
  247. @include border-bottom-radius(0 !important);
  248. }
  249. .rounded-left-0 {
  250. @include border-left-radius(0 !important);
  251. }
  252. .rounded-right-0 {
  253. @include border-right-radius(0 !important);
  254. }
  255. // Transforms
  256. // -------------------------
  257. //
  258. // Rotation
  259. //
  260. // Basic direction
  261. .rotate-45 {
  262. transform: rotate(45deg);
  263. }
  264. .rotate-90 {
  265. transform: rotate(90deg);
  266. }
  267. .rotate-180 {
  268. transform: rotate(180deg);
  269. }
  270. // Inversed
  271. .rotate-45-inverse {
  272. transform: rotate(-45deg);
  273. }
  274. .rotate-90-inverse {
  275. transform: rotate(-90deg);
  276. }
  277. .rotate-180-inverse {
  278. transform: rotate(-180deg);
  279. }
  280. //
  281. // Spinner animation
  282. //
  283. // Default
  284. .spinner {
  285. display: inline-block;
  286. animation: rotation 1s linear infinite;
  287. }
  288. // Reversed
  289. .spinner-reverse {
  290. display: inline-block;
  291. animation: rotation_reverse 1s linear infinite;
  292. }
  293. // Default rotation
  294. @-webkit-keyframes rotation {
  295. 0% {-webkit-transform: rotate(0deg);}
  296. 100% {-webkit-transform: rotate(360deg);}
  297. }
  298. @-moz-keyframes rotation {
  299. 0% {-moz-transform: rotate(0deg);}
  300. 100% {-moz-transform: rotate(360deg);}
  301. }
  302. @-ms-keyframes rotation {
  303. 0% {-ms-transform: rotate(0deg);}
  304. 100% {-ms-transform: rotate(360deg);}
  305. }
  306. @-o-keyframes rotation {
  307. 0% {-o-transform: rotate(0deg);}
  308. 100% {-o-transform: rotate(360deg);}
  309. }
  310. @keyframes rotation {
  311. 0% {transform: rotate(0deg);}
  312. 100% {transform: rotate(360deg);}
  313. }
  314. // Inversed rotation
  315. @-webkit-keyframes rotation_reverse {
  316. 0% {-webkit-transform: rotate(0deg);}
  317. 100% {-webkit-transform: rotate(-360deg);}
  318. }
  319. @-moz-keyframes rotation_reverse {
  320. 0% {-moz-transform: rotate(0deg);}
  321. 100% {-moz-transform: rotate(-360deg);}
  322. }
  323. @-ms-keyframes rotation_reverse {
  324. 0% {-ms-transform: rotate(0deg);}
  325. 100% {-ms-transform: rotate(-360deg);}
  326. }
  327. @-o-keyframes rotation_reverse {
  328. 0% {-o-transform: rotate(0deg);}
  329. 100% {-o-transform: rotate(-360deg);}
  330. }
  331. @keyframes rotation_reverse {
  332. 0% {transform: rotate(0deg);}
  333. 100% {transform: rotate(-360deg);}
  334. }
  335. // Sizing
  336. // -------------------------
  337. // Auto height
  338. .h-auto {
  339. height: auto;
  340. }
  341. // Element widths
  342. @each $breakpoint in map-keys($grid-breakpoints) {
  343. @include media-breakpoint-up($breakpoint) {
  344. $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
  345. .w#{$infix}-auto { width: auto !important; }
  346. .w#{$infix}-25 { width: 25% !important; }
  347. .w#{$infix}-50 { width: 50% !important; }
  348. .w#{$infix}-75 { width: 75% !important; }
  349. .w#{$infix}-100 { width: 100% !important; }
  350. .wmin#{$infix}-0 { min-width: 0 !important; }
  351. .wmin#{$infix}-200 { min-width: 200px !important; }
  352. .wmin#{$infix}-250 { min-width: 250px !important; }
  353. .wmin#{$infix}-300 { min-width: 300px !important; }
  354. .wmin#{$infix}-350 { min-width: 350px !important; }
  355. .wmin#{$infix}-400 { min-width: 400px !important; }
  356. .wmin#{$infix}-450 { min-width: 450px !important; }
  357. .wmin#{$infix}-500 { min-width: 500px !important; }
  358. .wmin#{$infix}-550 { min-width: 550px !important; }
  359. .wmin#{$infix}-600 { min-width: 600px !important; }
  360. .flex#{$infix}-1 { flex: 1; }
  361. }
  362. }
  363. // Misc
  364. // -------------------------
  365. // Disable all transitions
  366. .no-transitions * {
  367. &,
  368. &:before,
  369. &:after {
  370. @include transition(none !important);
  371. }
  372. }
  373. // Remove caret from .dropdown-toggle element
  374. .caret-0 {
  375. &::before,
  376. &::after {
  377. content: none;
  378. }
  379. }
  380. // Remove box shadow
  381. .shadow-0 {
  382. box-shadow: none !important;
  383. }
  384. // Remove outline
  385. .outline-0 {
  386. @include plain-hover-focus {
  387. outline: 0;
  388. }
  389. }
  390. // Text shadow
  391. .text-shadow-dark {
  392. text-shadow: 0 0 0.1875rem rgba($black, 0.5);
  393. }
  394. .text-shadow-light {
  395. text-shadow: 0 0 0.1875rem rgba($white, 0.5);
  396. }
  397. /* ------------------------------
  398. *
  399. * Theme specific styles
  400. *
  401. * ------------------------------ */
  402. // Material theme
  403. @if $theme == 'material' {
  404. // Shadows
  405. .shadow-1 {
  406. box-shadow: $shadow-depth1;
  407. }
  408. .shadow-2 {
  409. box-shadow: $shadow-depth2;
  410. }
  411. .shadow-3 {
  412. box-shadow: $shadow-depth3;
  413. }
  414. .shadow-4 {
  415. box-shadow: $shadow-depth4;
  416. }
  417. .shadow-5 {
  418. box-shadow: $shadow-depth5;
  419. }
  420. }