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.

350 lines
6.8 KiB

10 years ago
10 years ago
  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: @iconVerticalAlign;
  72. }
  73. .ui.steps .step > .icon {
  74. font-size: @iconSize;
  75. margin: 0em;
  76. padding-right: @iconDistance;
  77. }
  78. /* Link */
  79. .ui.steps .link.step,
  80. .ui.steps a.step {
  81. cursor: pointer;
  82. }
  83. /*******************************
  84. Types
  85. *******************************/
  86. /*--------------
  87. Ordered
  88. ---------------*/
  89. .ui.ordered.steps {
  90. counter-reset: ordered;
  91. }
  92. .ui.ordered.steps .step:before {
  93. display: table-cell;
  94. position: static;
  95. padding-right: @iconDistance;
  96. font-size: @iconSize;
  97. counter-increment: ordered;
  98. content: counters(ordered, ".");
  99. }
  100. .ui.ordered.steps .step > * {
  101. display: table-cell;
  102. vertical-align: @iconVerticalAlign;
  103. }
  104. /*--------------
  105. Vertical
  106. ---------------*/
  107. .ui.vertical.steps {
  108. overflow: visible;
  109. }
  110. .ui.vertical.steps .step {
  111. display: block;
  112. border-radius: @borderRadius;
  113. padding: @verticalPadding @horizontalPadding;
  114. }
  115. .ui.vertical.steps .step:first-child {
  116. padding: @verticalPadding @horizontalPadding;
  117. border-radius: @stepsBorderRadius @stepsBorderRadius 0em 0em;
  118. }
  119. .ui.vertical.steps .step:last-child {
  120. border-radius: 0em 0em @stepsBorderRadius @stepsBorderRadius;
  121. }
  122. /* Arrow */
  123. .ui.vertical.steps .step:after {
  124. display: none;
  125. }
  126. /* Active Arrow */
  127. .ui.vertical.steps .active.step:after {
  128. display: block;
  129. }
  130. /*******************************
  131. Group
  132. *******************************/
  133. .ui.steps {
  134. display: inline-block;
  135. font-size: 0em;
  136. background: @stepsBackground;
  137. box-shadow: @stepsBoxShadow;
  138. line-height: @lineHeight;
  139. box-sizing: border-box;
  140. border-radius: @stepsBorderRadius;
  141. }
  142. .ui.steps .step:first-child {
  143. padding-left: @horizontalPadding;
  144. border-radius: @stepsBorderRadius 0em 0em @stepsBorderRadius;
  145. }
  146. .ui.steps .step:last-child {
  147. border-radius: 0em @stepsBorderRadius @stepsBorderRadius 0em;
  148. }
  149. .ui.steps .step:only-child {
  150. -webkit-border-radius: @stepsBorderRadius;
  151. -moz-border-radius: @stepsBorderRadius;
  152. border-radius: @stepsBorderRadius;
  153. }
  154. .ui.steps .step:last-child {
  155. margin-right: 0em;
  156. }
  157. .ui.steps .step:last-child:after {
  158. display: none;
  159. }
  160. /*******************************
  161. States
  162. *******************************/
  163. /* Link Hover */
  164. .ui.steps .link.step:hover::after,
  165. .ui.steps .link.step:hover,
  166. .ui.steps a.step:hover::after,
  167. .ui.steps a.step:hover {
  168. background: @hoverBackground;
  169. color: @hoverColor;
  170. }
  171. /* Link Down */
  172. .ui.steps .link.step:active::after,
  173. .ui.steps .link.step:active,
  174. .ui.steps a.step:active::after,
  175. .ui.steps a.step:active {
  176. background: @downBackground;
  177. color: @downColor;
  178. }
  179. /* Active */
  180. .ui.steps .step.active {
  181. cursor: auto;
  182. background: @activeBackground;
  183. }
  184. .ui.steps .step.active:after {
  185. background: @activeBackground;
  186. }
  187. .ui.steps .step.active .title {
  188. color: @activeColor;
  189. }
  190. .ui.ordered.steps .step.active:before,
  191. .ui.steps .active.step .icon {
  192. color: @activeIconColor;
  193. }
  194. /* Active Hover */
  195. .ui.steps .link.active.step:hover::after,
  196. .ui.steps .link.active.step:hover,
  197. .ui.steps a.active.step:hover::after,
  198. .ui.steps a.active.step:hover {
  199. cursor: pointer;
  200. background: @activeHoverBackground;
  201. color: @activeHoverColor;
  202. }
  203. /* Completed */
  204. .ui.steps .step.completed > .icon:before,
  205. .ui.ordered.steps .step.completed:before {
  206. color: @completedColor;
  207. }
  208. /* Disabled */
  209. .ui.steps .disabled.step {
  210. cursor: auto;
  211. background: @disabledBackground;
  212. pointer-events: none;
  213. }
  214. .ui.steps .disabled.step,
  215. .ui.steps .disabled.step .title,
  216. .ui.steps .disabled.step .description {
  217. color: @disabledColor;
  218. }
  219. .ui.steps .disabled.step:after {
  220. background: @disabledBackground;
  221. }
  222. /*******************************
  223. Variations
  224. *******************************/
  225. /* Fluid */
  226. .ui.fluid.steps {
  227. width: 100%;
  228. }
  229. /* Attached */
  230. .attached.ui.steps {
  231. margin: 0em;
  232. border-radius: @stepsBorderRadius @stepsBorderRadius 0em 0em;
  233. }
  234. .attached.ui.steps .step:first-child {
  235. border-radius: @stepsBorderRadius 0em 0em 0em;
  236. }
  237. .attached.ui.steps .step:last-child {
  238. border-radius: 0em @stepsBorderRadius 0em 0em;
  239. }
  240. /* Bottom Side */
  241. .bottom.attached.ui.steps {
  242. margin-top: -1px;
  243. border-radius: 0em 0em @stepsBorderRadius @stepsBorderRadius;
  244. }
  245. .bottom.attached.ui.steps .step:first-child {
  246. border-radius: 0em 0em 0em @stepsBorderRadius;
  247. }
  248. .bottom.attached.ui.steps .step:last-child {
  249. border-radius: 0em 0em @stepsBorderRadius 0em;
  250. }
  251. /* Evenly divided */
  252. .ui.one.steps,
  253. .ui.two.steps,
  254. .ui.three.steps,
  255. .ui.four.steps,
  256. .ui.five.steps,
  257. .ui.six.steps,
  258. .ui.seven.steps,
  259. .ui.eight.steps {
  260. display: block;
  261. }
  262. .ui.one.steps > .step {
  263. width: 100%;
  264. }
  265. .ui.two.steps > .step {
  266. width: 50%;
  267. }
  268. .ui.three.steps > .step {
  269. width: 33.333%;
  270. }
  271. .ui.four.steps > .step {
  272. width: 25%;
  273. }
  274. .ui.five.steps > .step {
  275. width: 20%;
  276. }
  277. .ui.six.steps > .step {
  278. width: 16.666%;
  279. }
  280. .ui.seven.steps > .step {
  281. width: 14.285%;
  282. }
  283. .ui.eight.steps > .step {
  284. width: 12.500%;
  285. }
  286. /*******************************
  287. Sizes
  288. *******************************/
  289. .ui.small.step,
  290. .ui.small.steps .step {
  291. font-size: @small;
  292. }
  293. .ui.step,
  294. .ui.steps .step {
  295. font-size: @medium;
  296. }
  297. .ui.large.step,
  298. .ui.large.steps .step {
  299. font-size: @large;
  300. }
  301. .loadUIOverrides();