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.

255 lines
4.5 KiB

10 years ago
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. transform: translateX(-50%);
  87. }
  88. .ui.vertical.divider:before,
  89. .ui.vertical.divider:after {
  90. position: absolute;
  91. left: 50%;
  92. content: '';
  93. z-index: 3;
  94. border-left: @shadowWidth solid @shadowColor;
  95. border-right: @highlightWidth solid @highlightColor;
  96. width: 0%;
  97. height: @verticalDividerHeight;
  98. }
  99. .ui.vertical.divider:before {
  100. top: -100%;
  101. }
  102. .ui.vertical.divider:after {
  103. top: auto;
  104. bottom: 0px;
  105. }
  106. /* Inside grid */
  107. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  108. .ui.stackable.grid .ui.vertical.divider,
  109. .ui.grid .stackable.row .ui.vertical.divider {
  110. position: relative;
  111. margin: @margin;
  112. left: 50%;
  113. height: auto;
  114. overflow: hidden;
  115. line-height: 1;
  116. text-align: center;
  117. }
  118. .ui.stackable.grid .ui.vertical.divider:before,
  119. .ui.grid .stackable.row .ui.vertical.divider:before,
  120. .ui.stackable.grid .ui.vertical.divider:after,
  121. .ui.grid .stackable.row .ui.vertical.divider:after {
  122. position: absolute;
  123. top: 50%;
  124. left: auto;
  125. content: '';
  126. z-index: 3;
  127. width: 50%;
  128. top: 50%;
  129. height: 0px;
  130. border-top: @shadowWidth solid @shadowColor;
  131. border-bottom: @highlightWidth solid @highlightColor;
  132. }
  133. .ui.stackable.grid .ui.vertical.divider:before,
  134. .ui.grid .stackable.row .ui.vertical.divider:before {
  135. margin-left: -(50% + @horizontalDividerMargin);
  136. }
  137. .ui.stackable.grid .ui.vertical.divider:after,
  138. .ui.grid .stackable.row .ui.vertical.divider:after {
  139. margin-left: @horizontalDividerMargin;
  140. }
  141. }
  142. /*--------------
  143. Icon
  144. ---------------*/
  145. .ui.divider > .icon {
  146. margin: @dividerIconMargin;
  147. font-size: @dividerIconSize;
  148. height: 1em;
  149. vertical-align: middle;
  150. }
  151. /*******************************
  152. Variations
  153. *******************************/
  154. /*--------------
  155. Hidden
  156. ---------------*/
  157. .ui.hidden.divider {
  158. border-color: transparent !important;
  159. }
  160. /*--------------
  161. Inverted
  162. ---------------*/
  163. .ui.divider.inverted {
  164. color: @invertedTextColor;
  165. }
  166. .ui.vertical.inverted.divider,
  167. .ui.horizontal.inverted.divider {
  168. color: @invertedTextColor;
  169. }
  170. .ui.divider.inverted,
  171. .ui.divider.inverted:after,
  172. .ui.divider.inverted:before {
  173. border-top-color: @invertedShadowColor !important;
  174. border-bottom-color: @invertedHighlightColor !important;
  175. border-left-color: @invertedShadowColor !important;
  176. border-right-color: @invertedHighlightColor !important;
  177. }
  178. /*--------------
  179. Fitted
  180. ---------------*/
  181. .ui.fitted.divider {
  182. margin: 0em;
  183. }
  184. /*--------------
  185. Clearing
  186. ---------------*/
  187. .ui.clearing.divider {
  188. clear: both;
  189. }
  190. /*--------------
  191. Section
  192. ---------------*/
  193. .ui.section.divider {
  194. margin-top: @sectionMargin;
  195. margin-bottom: @sectionMargin;
  196. }
  197. /*--------------
  198. Sizes
  199. ---------------*/
  200. .ui.divider {
  201. font-size: @medium;
  202. }
  203. .loadUIOverrides();