_global.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. //Default styles
  2. html {
  3. box-sizing: border-box;
  4. }
  5. *, *:before, *:after {
  6. box-sizing: inherit;
  7. }
  8. body {
  9. // display: flex;
  10. // min-height: 100vh;
  11. // flex-direction: column;
  12. }
  13. main {
  14. // flex: 1 0 auto;
  15. }
  16. button,
  17. input,
  18. optgroup,
  19. select,
  20. textarea {
  21. font-family: $font-stack;
  22. }
  23. ul {
  24. &:not(.browser-default) {
  25. padding-left: 0;
  26. list-style-type: none;
  27. & > li {
  28. list-style-type: none;
  29. }
  30. }
  31. }
  32. a {
  33. color: $link-color;
  34. text-decoration: none;
  35. // Gets rid of tap active state
  36. -webkit-tap-highlight-color: transparent;
  37. }
  38. // Positioning
  39. .valign-wrapper {
  40. display: flex;
  41. align-items: center;
  42. }
  43. // classic clearfix
  44. .clearfix {
  45. clear: both;
  46. }
  47. // Z-levels
  48. .z-depth-0 {
  49. box-shadow: none !important;
  50. }
  51. /* 2dp elevation modified*/
  52. .z-depth-1 {
  53. box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
  54. 0 3px 1px -2px rgba(0,0,0,0.12),
  55. 0 1px 5px 0 rgba(0,0,0,0.2);
  56. }
  57. .z-depth-1-half {
  58. box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
  59. }
  60. /* 6dp elevation modified*/
  61. .z-depth-2 {
  62. box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14),
  63. 0 1px 10px 0 rgba(0,0,0,0.12),
  64. 0 2px 4px -1px rgba(0,0,0,0.3);
  65. }
  66. /* 12dp elevation modified*/
  67. .z-depth-3 {
  68. box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14),
  69. 0 3px 14px 2px rgba(0,0,0,0.12),
  70. 0 5px 5px -3px rgba(0, 0, 0, 0.2);
  71. }
  72. /* 16dp elevation */
  73. .z-depth-4 {
  74. box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14),
  75. 0 6px 30px 5px rgba(0,0,0,0.12),
  76. 0 8px 10px -7px rgba(0,0,0,0.2);
  77. }
  78. /* 24dp elevation */
  79. .z-depth-5 {
  80. box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),
  81. 0 9px 46px 8px rgba(0,0,0,0.12),
  82. 0 11px 15px -7px rgba(0,0,0,0.2);
  83. }
  84. .hoverable {
  85. transition: box-shadow .25s;
  86. &:hover {
  87. box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  88. }
  89. }
  90. // Dividers
  91. .divider {
  92. height: 1px;
  93. overflow: hidden;
  94. background-color: color("grey", "lighten-2");
  95. }
  96. // Blockquote
  97. blockquote {
  98. margin: 20px 0;
  99. padding-left: 1.5rem;
  100. border-left: 5px solid $primary-color;
  101. }
  102. // Icon Styles
  103. i {
  104. line-height: inherit;
  105. &.left {
  106. float: left;
  107. margin-right: 15px;
  108. }
  109. &.right {
  110. float: right;
  111. margin-left: 15px;
  112. }
  113. &.tiny {
  114. font-size: 1rem;
  115. }
  116. &.small {
  117. font-size: 2rem;
  118. }
  119. &.medium {
  120. font-size: 4rem;
  121. }
  122. &.large {
  123. font-size: 6rem;
  124. }
  125. }
  126. // Images
  127. img.responsive-img,
  128. video.responsive-video {
  129. max-width: 100%;
  130. height: auto;
  131. }
  132. // Pagination
  133. .pagination {
  134. li {
  135. display: inline-block;
  136. border-radius: 2px;
  137. text-align: center;
  138. vertical-align: top;
  139. height: 30px;
  140. a {
  141. color: #444;
  142. display: inline-block;
  143. font-size: 1.2rem;
  144. padding: 0 10px;
  145. line-height: 30px;
  146. }
  147. &.active a { color: #fff; }
  148. &.active { background-color: $primary-color; }
  149. &.disabled a {
  150. cursor: default;
  151. color: #999;
  152. }
  153. i {
  154. font-size: 2rem;
  155. }
  156. }
  157. li.pages ul li {
  158. display: inline-block;
  159. float: none;
  160. }
  161. }
  162. @media #{$medium-and-down} {
  163. .pagination {
  164. width: 100%;
  165. li.prev,
  166. li.next {
  167. width: 10%;
  168. }
  169. li.pages {
  170. width: 80%;
  171. overflow: hidden;
  172. white-space: nowrap;
  173. }
  174. }
  175. }
  176. // Breadcrumbs
  177. .breadcrumb {
  178. font-size: 18px;
  179. color: rgba(255,255,255, .7);
  180. i,
  181. [class^="mdi-"], [class*="mdi-"],
  182. i.material-icons {
  183. display: inline-block;
  184. float: left;
  185. font-size: 24px;
  186. }
  187. &:before {
  188. content: '\E5CC';
  189. color: rgba(255,255,255, .7);
  190. vertical-align: top;
  191. display: inline-block;
  192. font-family: 'Material Icons';
  193. font-weight: normal;
  194. font-style: normal;
  195. font-size: 25px;
  196. margin: 0 10px 0 8px;
  197. -webkit-font-smoothing: antialiased;
  198. }
  199. &:first-child:before {
  200. display: none;
  201. }
  202. &:last-child {
  203. color: #fff;
  204. }
  205. }
  206. // Parallax
  207. .parallax-container {
  208. position: relative;
  209. overflow: hidden;
  210. height: 500px;
  211. .parallax {
  212. position: absolute;
  213. top: 0;
  214. left: 0;
  215. right: 0;
  216. bottom: 0;
  217. z-index: -1;
  218. img {
  219. opacity: 0;
  220. position: absolute;
  221. left: 50%;
  222. bottom: 0;
  223. min-width: 100%;
  224. min-height: 100%;
  225. transform: translate3d(0,0,0);
  226. transform: translateX(-50%);
  227. }
  228. }
  229. }
  230. // Pushpin
  231. .pin-top, .pin-bottom {
  232. position: relative;
  233. }
  234. .pinned {
  235. position: fixed !important;
  236. }
  237. /*********************
  238. Transition Classes
  239. **********************/
  240. ul.staggered-list li {
  241. opacity: 0;
  242. }
  243. .fade-in {
  244. opacity: 0;
  245. transform-origin: 0 50%;
  246. }
  247. /*********************
  248. Media Query Classes
  249. **********************/
  250. .hide-on-small-only, .hide-on-small-and-down {
  251. @media #{$small-and-down} {
  252. display: none !important;
  253. }
  254. }
  255. .hide-on-med-and-down {
  256. @media #{$medium-and-down} {
  257. display: none !important;
  258. }
  259. }
  260. .hide-on-med-and-up {
  261. @media #{$medium-and-up} {
  262. display: none !important;
  263. }
  264. }
  265. .hide-on-med-only {
  266. @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) {
  267. display: none !important;
  268. }
  269. }
  270. .hide-on-large-only {
  271. @media #{$large-and-up} {
  272. display: none !important;
  273. }
  274. }
  275. .hide-on-extra-large-only {
  276. @media #{$extra-large-and-up} {
  277. display: none !important;
  278. }
  279. }
  280. .show-on-extra-large {
  281. @media #{$extra-large-and-up} {
  282. display: block !important;
  283. }
  284. }
  285. .show-on-large {
  286. @media #{$large-and-up} {
  287. display: block !important;
  288. }
  289. }
  290. .show-on-medium {
  291. @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) {
  292. display: block !important;
  293. }
  294. }
  295. .show-on-small {
  296. @media #{$small-and-down} {
  297. display: block !important;
  298. }
  299. }
  300. .show-on-medium-and-up {
  301. @media #{$medium-and-up} {
  302. display: block !important;
  303. }
  304. }
  305. .show-on-medium-and-down {
  306. @media #{$medium-and-down} {
  307. display: block !important;
  308. }
  309. }
  310. // Center text on mobile
  311. .center-on-small-only {
  312. @media #{$small-and-down} {
  313. text-align: center;
  314. }
  315. }
  316. // Footer
  317. .page-footer {
  318. padding-top: 20px;
  319. color: $footer-font-color;
  320. background-color: $footer-bg-color;
  321. .footer-copyright {
  322. overflow: hidden;
  323. min-height: 50px;
  324. display: flex;
  325. align-items: center;
  326. justify-content: space-between;
  327. padding: 10px 0px;
  328. color: $footer-copyright-font-color;
  329. background-color: $footer-copyright-bg-color;
  330. }
  331. }
  332. // Tables
  333. table, th, td {
  334. border: none;
  335. }
  336. table {
  337. width:100%;
  338. display: table;
  339. border-collapse: collapse;
  340. border-spacing: 0;
  341. &.striped {
  342. tr {
  343. border-bottom: none;
  344. }
  345. > tbody {
  346. > tr:nth-child(odd) {
  347. background-color: $table-striped-color;
  348. }
  349. > tr > td {
  350. border-radius: 0;
  351. }
  352. }
  353. }
  354. &.highlight > tbody > tr {
  355. transition: background-color .25s ease;
  356. &:hover {
  357. background-color: $table-striped-color;
  358. }
  359. }
  360. &.centered {
  361. thead tr th, tbody tr td {
  362. text-align: center;
  363. }
  364. }
  365. }
  366. tr {
  367. border-bottom: 1px solid $table-border-color;
  368. }
  369. td, th{
  370. padding: 15px 5px;
  371. display: table-cell;
  372. text-align: left;
  373. vertical-align: middle;
  374. border-radius: 2px;
  375. }
  376. // Responsive Table
  377. @media #{$medium-and-down} {
  378. table.responsive-table {
  379. width: 100%;
  380. border-collapse: collapse;
  381. border-spacing: 0;
  382. display: block;
  383. position: relative;
  384. td:empty:before {
  385. content: '\00a0';
  386. }
  387. th,
  388. td {
  389. margin: 0;
  390. vertical-align: top;
  391. }
  392. th { text-align: left; }
  393. thead {
  394. display: block;
  395. float: left;
  396. tr {
  397. display: block;
  398. padding: 0 10px 0 0;
  399. th::before {
  400. content: "\00a0";
  401. }
  402. }
  403. }
  404. tbody {
  405. display: block;
  406. width: auto;
  407. position: relative;
  408. overflow-x: auto;
  409. white-space: nowrap;
  410. tr {
  411. display: inline-block;
  412. vertical-align: top;
  413. }
  414. }
  415. th {
  416. display: block;
  417. text-align: right;
  418. }
  419. td {
  420. display: block;
  421. min-height: 1.25em;
  422. text-align: left;
  423. }
  424. tr {
  425. border-bottom: none;
  426. padding: 0 10px;
  427. }
  428. /* sort out borders */
  429. thead {
  430. border: 0;
  431. border-right: 1px solid $table-border-color;
  432. }
  433. }
  434. }
  435. // Collections
  436. .collection {
  437. margin: $element-top-margin 0 $element-bottom-margin 0;
  438. border: 1px solid $collection-border-color;
  439. border-radius: 2px;
  440. overflow: hidden;
  441. position: relative;
  442. .collection-item {
  443. background-color: $collection-bg-color;
  444. line-height: $collection-line-height;
  445. padding: 10px 20px;
  446. margin: 0;
  447. border-bottom: 1px solid $collection-border-color;
  448. // Avatar Collection
  449. &.avatar {
  450. min-height: 84px;
  451. padding-left: 72px;
  452. position: relative;
  453. // Don't style circles inside preloader classes.
  454. &:not(.circle-clipper) > .circle,
  455. :not(.circle-clipper) > .circle {
  456. position: absolute;
  457. width: 42px;
  458. height: 42px;
  459. overflow: hidden;
  460. left: 15px;
  461. display: inline-block;
  462. vertical-align: middle;
  463. }
  464. i.circle {
  465. font-size: 18px;
  466. line-height: 42px;
  467. color: #fff;
  468. background-color: #999;
  469. text-align: center;
  470. }
  471. .title {
  472. font-size: 16px;
  473. }
  474. p {
  475. margin: 0;
  476. }
  477. .secondary-content {
  478. position: absolute;
  479. top: 16px;
  480. right: 16px;
  481. }
  482. }
  483. &:last-child {
  484. border-bottom: none;
  485. }
  486. &.active {
  487. background-color: $collection-active-bg-color;
  488. color: $collection-active-color;
  489. .secondary-content {
  490. color: #fff;
  491. }
  492. }
  493. }
  494. a.collection-item{
  495. display: block;
  496. transition: .25s;
  497. color: $collection-link-color;
  498. &:not(.active) {
  499. &:hover {
  500. background-color: $collection-hover-bg-color;
  501. }
  502. }
  503. }
  504. &.with-header {
  505. .collection-header {
  506. background-color: $collection-bg-color;
  507. border-bottom: 1px solid $collection-border-color;
  508. padding: 10px 20px;
  509. }
  510. .collection-item {
  511. padding-left: 30px;
  512. }
  513. .collection-item.avatar {
  514. padding-left: 72px;
  515. }
  516. }
  517. }
  518. // Made less specific to allow easier overriding
  519. .secondary-content {
  520. float: right;
  521. color: $secondary-color;
  522. }
  523. .collapsible .collection {
  524. margin: 0;
  525. border: none;
  526. }
  527. // Responsive Videos
  528. .video-container {
  529. position: relative;
  530. padding-bottom: 56.25%;
  531. height: 0;
  532. overflow: hidden;
  533. iframe, object, embed {
  534. position: absolute;
  535. top: 0;
  536. left: 0;
  537. width: 100%;
  538. height: 100%;
  539. }
  540. }
  541. // Progress Bar
  542. .progress {
  543. position: relative;
  544. height: 4px;
  545. display: block;
  546. width: 100%;
  547. background-color: lighten($progress-bar-color, 40%);
  548. border-radius: 2px;
  549. margin: $element-top-margin 0 $element-bottom-margin 0;
  550. overflow: hidden;
  551. .determinate {
  552. position: absolute;
  553. top: 0;
  554. left: 0;
  555. bottom: 0;
  556. background-color: $progress-bar-color;
  557. transition: width .3s linear;
  558. }
  559. .indeterminate {
  560. background-color: $progress-bar-color;
  561. &:before {
  562. content: '';
  563. position: absolute;
  564. background-color: inherit;
  565. top: 0;
  566. left:0;
  567. bottom: 0;
  568. will-change: left, right;
  569. // Custom bezier
  570. animation: indeterminate 2.1s cubic-bezier(0.650, 0.815, 0.735, 0.395) infinite;
  571. }
  572. &:after {
  573. content: '';
  574. position: absolute;
  575. background-color: inherit;
  576. top: 0;
  577. left:0;
  578. bottom: 0;
  579. will-change: left, right;
  580. // Custom bezier
  581. animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite;
  582. animation-delay: 1.15s;
  583. }
  584. }
  585. }
  586. @keyframes indeterminate {
  587. 0% {
  588. left: -35%;
  589. right:100%;
  590. }
  591. 60% {
  592. left: 100%;
  593. right: -90%;
  594. }
  595. 100% {
  596. left: 100%;
  597. right: -90%;
  598. }
  599. }
  600. @keyframes indeterminate-short {
  601. 0% {
  602. left: -200%;
  603. right: 100%;
  604. }
  605. 60% {
  606. left: 107%;
  607. right: -8%;
  608. }
  609. 100% {
  610. left: 107%;
  611. right: -8%;
  612. }
  613. }
  614. /*******************
  615. Utility Classes
  616. *******************/
  617. .hide {
  618. display: none !important;
  619. }
  620. // Text Align
  621. .left-align {
  622. text-align: left;
  623. }
  624. .right-align {
  625. text-align: right
  626. }
  627. .center, .center-align {
  628. text-align: center;
  629. }
  630. .left {
  631. float: left !important;
  632. }
  633. .right {
  634. float: right !important;
  635. }
  636. // No Text Select
  637. .no-select {
  638. user-select: none;
  639. }
  640. .circle {
  641. border-radius: 50%;
  642. }
  643. .center-block {
  644. display: block;
  645. margin-left: auto;
  646. margin-right: auto;
  647. }
  648. .truncate {
  649. display: block;
  650. white-space: nowrap;
  651. overflow: hidden;
  652. text-overflow: ellipsis;
  653. }
  654. .no-padding {
  655. padding: 0 !important;
  656. }