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.

337 lines
6.5 KiB

  1. /*
  2. * # Semantic - Steps
  3. * http://github.com/jlukic/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 : 'step';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Step
  19. *******************************/
  20. .ui.steps .step {
  21. display: inline-block;
  22. position: relative;
  23. margin: @verticalMargin @horizontalMargin;
  24. padding: @verticalPadding @horizontalPadding @verticalPadding @leftPadding;
  25. vertical-align: top;
  26. background: @background;
  27. color: @textColor;
  28. box-shadow: @boxShadow;
  29. border-radius: @borderRadius;
  30. }
  31. .ui.steps .step:after {
  32. position: absolute;
  33. z-index: 2;
  34. content: '';
  35. top: @arrowTopOffset;
  36. right: @arrowRightOffset;
  37. border: medium none;
  38. background-color: @arrowBackgroundColor;
  39. width: @arrowSize;
  40. height: @arrowSize;
  41. border-bottom: 1px solid @arrowBorderColor;
  42. border-right: 1px solid @arrowBorderColor;
  43. transform: translateY(-50%) translateX(50%) rotate(-45deg);
  44. }
  45. .ui.steps .step,
  46. .ui.steps .step:after {
  47. transition: @transition;
  48. }
  49. /*******************************
  50. Content
  51. *******************************/
  52. /* Title */
  53. .ui.steps .step .title {
  54. font-family: @titleFontFamily;
  55. font-size: @titleFontSize;
  56. font-weight: @titleFontWeight;
  57. }
  58. /* Description */
  59. .ui.steps .step .description {
  60. font-weight: @descriptionFontWeight;
  61. font-size: @descriptionFontSize;
  62. color: @descriptionColor;
  63. }
  64. .ui.steps .step .title ~ .description {
  65. margin-top: @descriptionDistance;
  66. }
  67. /* Icon */
  68. .ui.steps .step > .icon,
  69. .ui.steps .step > .icon ~ .content {
  70. display: table-cell;
  71. vertical-align: top;
  72. }
  73. .ui.steps .step > .icon {
  74. font-size: @iconSize;
  75. margin: 0em;
  76. padding-right: @iconDistance;
  77. vertical-align: @iconVerticalAlign;
  78. }
  79. /* Link */
  80. .ui.steps .link.step,
  81. .ui.steps a.step {
  82. cursor: pointer;
  83. }
  84. /*******************************
  85. Types
  86. *******************************/
  87. /*--------------
  88. Ordered
  89. ---------------*/
  90. .ui.ordered.steps {
  91. counter-reset: ordered;
  92. }
  93. .ui.ordered.steps .step:before {
  94. display: table-cell;
  95. position: static;
  96. padding-right: @iconDistance;
  97. font-size: @iconSize;
  98. counter-increment: ordered;
  99. content: counters(ordered, ".");
  100. }
  101. .ui.ordered.steps .step > * {
  102. display: table-cell;
  103. vertical-align: top;
  104. }
  105. /*--------------
  106. Vertical
  107. ---------------*/
  108. .ui.vertical.steps {
  109. overflow: visible;
  110. }
  111. .ui.vertical.steps .step {
  112. display: block;
  113. border-radius: @borderRadius;
  114. padding: @verticalPadding @horizontalPadding;
  115. }
  116. .ui.vertical.steps .step:first-child {
  117. padding: @verticalPadding @horizontalPadding;
  118. border-top-left-radius: @stepsBorderRadius;
  119. border-top-right-radius: @stepsBorderRadius;
  120. }
  121. .ui.vertical.steps .step:last-child {
  122. border-bottom-left-radius: @stepsBorderRadius;
  123. border-bottom-right-radius: @stepsBorderRadius;
  124. }
  125. /* Arrow */
  126. .ui.vertical.steps .step:after {
  127. display: none;
  128. }
  129. /* Active Arrow */
  130. .ui.vertical.steps .active.step:after {
  131. display: block;
  132. }
  133. /*******************************
  134. Group
  135. *******************************/
  136. .ui.steps {
  137. display: inline-block;
  138. font-size: 0em;
  139. background: @stepsBackground;
  140. box-shadow: @stepsBoxShadow;
  141. line-height: @lineHeight;
  142. box-sizing: border-box;
  143. border-radius: @stepsBorderRadius;
  144. }
  145. .ui.steps .step:first-child {
  146. padding-left: @horizontalPadding;
  147. border-radius: @stepsBorderRadius 0em 0em @stepsBorderRadius;
  148. }
  149. .ui.steps .step:last-child {
  150. border-radius: 0em @stepsBorderRadius @stepsBorderRadius 0em;
  151. }
  152. .ui.steps .step:only-child {
  153. -webkit-border-radius: @stepsBorderRadius;
  154. -moz-border-radius: @stepsBorderRadius;
  155. border-radius: @stepsBorderRadius;
  156. }
  157. .ui.steps .step:last-child {
  158. margin-right: 0em;
  159. }
  160. .ui.steps .step:last-child:after {
  161. display: none;
  162. }
  163. /*******************************
  164. States
  165. *******************************/
  166. /* Link Hover */
  167. .ui.steps .link.step:hover::after,
  168. .ui.steps .link.step:hover,
  169. .ui.steps a.step:hover::after,
  170. .ui.steps a.step:hover {
  171. background: @hoverBackground;
  172. color: @hoverColor;
  173. }
  174. /* Link Down */
  175. .ui.steps .link.step:active::after,
  176. .ui.steps .link.step:active,
  177. .ui.steps a.step:active::after,
  178. .ui.steps a.step:active {
  179. background: @downBackground;
  180. color: @downColor;
  181. }
  182. /* Active */
  183. .ui.steps .step.active {
  184. cursor: auto;
  185. background: @activeBackground;
  186. }
  187. .ui.steps .step.active:after {
  188. background: @activeBackground;
  189. }
  190. .ui.steps .step.active .title {
  191. color: @activeColor;
  192. }
  193. .ui.ordered.steps .step.active:before,
  194. .ui.steps .active.step .icon {
  195. color: @activeIconColor;
  196. }
  197. /* Completed */
  198. .ui.steps .step.completed > .icon:before,
  199. .ui.ordered.steps .step.completed:before {
  200. color: @completedColor;
  201. }
  202. /* Disabled */
  203. .ui.steps .disabled.step {
  204. cursor: auto;
  205. background: @disabledBackground;
  206. }
  207. .ui.steps .disabled.step,
  208. .ui.steps .disabled.step .title,
  209. .ui.steps .disabled.step .description {
  210. color: @disabledColor;
  211. }
  212. .ui.steps .disabled.step:after {
  213. background: @disabledBackground;
  214. }
  215. /*******************************
  216. Variations
  217. *******************************/
  218. /* Attached */
  219. .attached.ui.steps {
  220. margin: 0em;
  221. border-radius: @stepsBorderRadius @stepsBorderRadius 0em 0em;
  222. }
  223. .attached.ui.steps .step:first-child {
  224. border-radius: @stepsBorderRadius 0em 0em 0em;
  225. }
  226. .attached.ui.steps .step:last-child {
  227. border-radius: 0em @stepsBorderRadius 0em 0em;
  228. }
  229. /* Bottom Side */
  230. .bottom.attached.ui.steps {
  231. margin-top: -1px;
  232. border-radius: 0em 0em @stepsBorderRadius @stepsBorderRadius;
  233. }
  234. .bottom.attached.ui.steps .step:first-child {
  235. border-radius: 0em 0em 0em @stepsBorderRadius;
  236. }
  237. .bottom.attached.ui.steps .step:last-child {
  238. border-radius: 0em 0em @stepsBorderRadius 0em;
  239. }
  240. /* Evenly divided */
  241. .ui.one.steps,
  242. .ui.two.steps,
  243. .ui.three.steps,
  244. .ui.four.steps,
  245. .ui.five.steps,
  246. .ui.six.steps,
  247. .ui.seven.steps,
  248. .ui.eight.steps {
  249. display: block;
  250. }
  251. .ui.one.steps > .step {
  252. width: 100%;
  253. }
  254. .ui.two.steps > .step {
  255. width: 50%;
  256. }
  257. .ui.three.steps > .step {
  258. width: 33.333%;
  259. }
  260. .ui.four.steps > .step {
  261. width: 25%;
  262. }
  263. .ui.five.steps > .step {
  264. width: 20%;
  265. }
  266. .ui.six.steps > .step {
  267. width: 16.666%;
  268. }
  269. .ui.seven.steps > .step {
  270. width: 14.285%;
  271. }
  272. .ui.eight.steps > .step {
  273. width: 12.500%;
  274. }
  275. /*******************************
  276. Sizes
  277. *******************************/
  278. .ui.small.step,
  279. .ui.small.steps .step {
  280. font-size: @small;
  281. }
  282. .ui.step,
  283. .ui.steps .step {
  284. font-size: @medium;
  285. }
  286. .ui.large.step,
  287. .ui.large.steps .step {
  288. font-size: @large;
  289. }
  290. .loadUIOverrides();