_toggles.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // TOGGLE
  2. // -----------------------------------------------------------------------------
  3. .toggle {
  4. margin: 10px 0 0;
  5. position: relative;
  6. clear: both;
  7. > {
  8. input {
  9. cursor: pointer;
  10. filter: alpha(opacity = 0);
  11. height: 45px;
  12. margin: 0;
  13. opacity: 0;
  14. position: absolute;
  15. width: 100%;
  16. z-index: 2;
  17. }
  18. label {
  19. @include transition (all .15s ease-out);
  20. background: #F4F4F4;
  21. border-left: 3px solid $color-primary;
  22. border-radius: $border-radius;
  23. color: $color-primary;
  24. display: block;
  25. font-size: 1.1em;
  26. min-height: 20px;
  27. padding: 12px 20px 12px 10px;
  28. position: relative;
  29. cursor: pointer;
  30. font-weight: 400;
  31. &:-moz-selection {
  32. background: none;
  33. }
  34. i {
  35. &.fa-minus {
  36. display: none;
  37. }
  38. &.fa-plus {
  39. display: inline;
  40. }
  41. }
  42. &:selection {
  43. background: none;
  44. }
  45. &:before {
  46. border: 6px solid transparent;
  47. border-left-color: inherit;
  48. content: '';
  49. margin-top: -6px;
  50. position: absolute;
  51. right: 4px;
  52. top: 50%;
  53. }
  54. &:hover {
  55. background: #f5f5f5;
  56. }
  57. + p {
  58. display: block;
  59. overflow: hidden;
  60. padding-left: 30px;
  61. text-overflow: ellipsis;
  62. white-space: nowrap;
  63. height: 25px;
  64. }
  65. i {
  66. font-size: 0.7em;
  67. margin-right: 8px;
  68. position: relative;
  69. top: -1px;
  70. }
  71. }
  72. .toggle-content {
  73. display: none;
  74. > p {
  75. margin-bottom: 0;
  76. padding: 10px 0;
  77. }
  78. }
  79. }
  80. &.active {
  81. i {
  82. &.fa-minus {
  83. display: inline;
  84. color: #FFF;
  85. }
  86. &.fa-plus {
  87. display: none;
  88. }
  89. }
  90. > label {
  91. background: $color-primary;
  92. border-color: $color-primary;
  93. color: #FFF;
  94. &:before {
  95. border: 6px solid transparent;
  96. border-top-color: #FFF;
  97. margin-top: -3px;
  98. right: 10px;
  99. }
  100. }
  101. > p {
  102. white-space: normal;
  103. }
  104. }
  105. > p.preview-active {
  106. height: auto;
  107. white-space: normal;
  108. }
  109. }
  110. // DARK
  111. // -----------------------------------------------------------------------------
  112. /* dark */
  113. html.dark {
  114. .toggle > label {
  115. background: $dark-color-3;
  116. }
  117. }