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.

245 lines
4.4 KiB

10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Divider
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributor
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'element';
  15. @element : 'divider';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Divider
  19. *******************************/
  20. .ui.divider {
  21. margin: @margin;
  22. line-height: 1;
  23. height: 0em;
  24. font-weight: @fontWeight;
  25. text-transform: @textTransform;
  26. color: @color;
  27. user-select: none;
  28. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  29. }
  30. /*--------------
  31. Basic
  32. ---------------*/
  33. .ui.divider:not(.vertical):not(.horizontal) {
  34. border-top: @shadowWidth solid @shadowColor;
  35. border-bottom: @highlightWidth solid @highlightColor;
  36. }
  37. /*--------------
  38. Coupling
  39. ---------------*/
  40. .ui.grid > .ui.divider {
  41. font-size: 1rem;
  42. }
  43. /*--------------
  44. Horizontal
  45. ---------------*/
  46. .ui.horizontal.divider {
  47. position: relative;
  48. height: auto;
  49. margin: @horizontalMargin;
  50. overflow: hidden;
  51. line-height: 1;
  52. text-align: center;
  53. }
  54. .ui.horizontal.divider:before,
  55. .ui.horizontal.divider:after {
  56. position: absolute;
  57. top: 50%;
  58. content: '';
  59. z-index: 3;
  60. width: 50%;
  61. top: 50%;
  62. height: 0px;
  63. border-top: @shadowWidth solid @shadowColor;
  64. border-bottom: @highlightWidth solid @highlightColor;
  65. }
  66. .ui.horizontal.divider:before {
  67. margin-left: -(50% + @horizontalDividerMargin);
  68. }
  69. .ui.horizontal.divider:after {
  70. margin-left: @horizontalDividerMargin;
  71. }
  72. /*--------------
  73. Vertical
  74. ---------------*/
  75. .ui.vertical.divider {
  76. position: absolute;
  77. z-index: 2;
  78. top: 50%;
  79. left: 50%;
  80. margin: 0rem;
  81. padding: 0em;
  82. width: auto;
  83. height: 50%;
  84. line-height: 0em;
  85. text-align: center;
  86. }
  87. .ui.vertical.divider:before,
  88. .ui.vertical.divider:after {
  89. position: absolute;
  90. left: 50%;
  91. content: '';
  92. z-index: 3;
  93. border-left: @shadowWidth solid @shadowColor;
  94. border-right: @highlightWidth solid @highlightColor;
  95. width: 0%;
  96. height: @verticalDividerHeight;
  97. }
  98. .ui.vertical.divider:before {
  99. top: -100%;
  100. }
  101. .ui.vertical.divider:after {
  102. top: auto;
  103. bottom: 0px;
  104. }
  105. /* Inside grid */
  106. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  107. .ui.stackable.grid .ui.vertical.divider,
  108. .ui.grid .stackable.row .ui.vertical.divider {
  109. position: relative;
  110. margin: @margin;
  111. left: 0;
  112. height: auto;
  113. overflow: hidden;
  114. line-height: 1;
  115. text-align: center;
  116. }
  117. .ui.stackable.grid .ui.vertical.divider:before,
  118. .ui.grid .stackable.row .ui.vertical.divider:before,
  119. .ui.stackable.grid .ui.vertical.divider:after,
  120. .ui.grid .stackable.row .ui.vertical.divider:after {
  121. position: absolute;
  122. top: 50%;
  123. left: auto;
  124. content: '';
  125. z-index: 3;
  126. width: 50%;
  127. top: 50%;
  128. height: 0px;
  129. border-top: @shadowWidth solid @shadowColor;
  130. border-bottom: @highlightWidth solid @highlightColor;
  131. }
  132. .ui.stackable.grid .ui.vertical.divider:before,
  133. .ui.grid .stackable.row .ui.vertical.divider:before {
  134. margin-left: -(50% + @horizontalDividerMargin);
  135. }
  136. .ui.stackable.grid .ui.vertical.divider:after,
  137. .ui.grid .stackable.row .ui.vertical.divider:after {
  138. margin-left: @horizontalDividerMargin;
  139. }
  140. }
  141. /*--------------
  142. Icon
  143. ---------------*/
  144. .ui.divider > .icon {
  145. margin: @dividerIconMargin;
  146. font-size: @dividerIconSize;
  147. height: 1em;
  148. vertical-align: middle;
  149. }
  150. /*******************************
  151. Variations
  152. *******************************/
  153. /*--------------
  154. Hidden
  155. ---------------*/
  156. .ui.hidden.divider {
  157. border-color: transparent !important;
  158. }
  159. /*--------------
  160. Inverted
  161. ---------------*/
  162. .ui.divider.inverted {
  163. color: @invertedTextColor;
  164. }
  165. .ui.vertical.inverted.divider,
  166. .ui.horizontal.inverted.divider {
  167. color: @invertedTextColor;
  168. }
  169. .ui.divider.inverted,
  170. .ui.divider.inverted:after,
  171. .ui.divider.inverted:before {
  172. border-top-color: @invertedShadowColor !important;
  173. border-bottom-color: @invertedHighlightColor !important;
  174. border-left-color: @invertedShadowColor !important;
  175. border-right-color: @invertedHighlightColor !important;
  176. }
  177. /*--------------
  178. Fitted
  179. ---------------*/
  180. .ui.fitted.divider {
  181. margin: 0em;
  182. }
  183. /*--------------
  184. Clearing
  185. ---------------*/
  186. .ui.clearing.divider {
  187. clear: both;
  188. }
  189. /*--------------
  190. Section
  191. ---------------*/
  192. .ui.section.divider {
  193. margin-top: @sectionMargin;
  194. margin-bottom: @sectionMargin;
  195. }
  196. .loadUIOverrides();