_tabs.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. $tab-label-height: 50px;
  2. // New JS powered tabs
  3. .form-tabs {
  4. .admin-pages &:first-child {
  5. margin-top: -1rem;
  6. }
  7. .admin-pages & {
  8. &.side-tabs {
  9. .tabs-nav {
  10. margin-right: 0 !important;
  11. }
  12. }
  13. .tabs-nav {
  14. margin-right: 180px;
  15. @include breakpoint(mobile-only) {
  16. margin-right: 0 !important;
  17. }
  18. }
  19. }
  20. .tabs-nav {
  21. @include display(flex);
  22. padding-top: 1px;
  23. a {
  24. @include flex(1);
  25. transition: color 0.5s ease, background 0.5s ease;
  26. cursor: pointer;
  27. min-height: $tab-label-height;
  28. text-align:center;
  29. padding: 4px;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. }
  34. span {
  35. display: inline-block;
  36. line-height: 1.1;
  37. }
  38. }
  39. &.subtle .tabs-nav {
  40. margin-right: 0 !important;
  41. }
  42. .tabs-content {
  43. .tab__content {
  44. display: none;
  45. padding-top: 2rem;
  46. &.active {
  47. display: block;
  48. }
  49. }
  50. }
  51. &.side-tabs {
  52. display: flex;
  53. background: none;
  54. > .tabs-nav {
  55. width: 20%;
  56. display: block;
  57. padding-top: 1.5rem;
  58. a {
  59. text-align: left;
  60. flex: none;
  61. justify-content: left;
  62. padding-left: 15px;
  63. }
  64. }
  65. > .tabs-content {
  66. width: 80%;
  67. }
  68. }
  69. }
  70. // Old tabs here for posterity!
  71. //.tab-bar {
  72. // @include clearfix;
  73. // margin: 0;
  74. // padding: 0;
  75. // list-style: none;
  76. //
  77. // li {
  78. //
  79. // display: block;
  80. // float: left;
  81. // height: $tab-label-height;
  82. //
  83. // @include breakpoint(mobile-only) {
  84. // width: 100%;
  85. // span, a {
  86. // width: 100%;
  87. // text-align: center;
  88. // }
  89. // }
  90. // }
  91. //
  92. // span, a {
  93. // @extend .default-animation;
  94. // display: inline-block;
  95. // padding: 0 4rem;
  96. // line-height: $tab-label-height;
  97. // }
  98. //}