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.

449 lines
8.1 KiB

10 years ago
10 years ago
  1. /*
  2. * # Semantic - Segment
  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 : 'segment';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Segment
  19. *******************************/
  20. .ui.segment {
  21. position: relative;
  22. background-color: @white;
  23. box-shadow: @boxShadow;
  24. margin: @margin 0em;
  25. padding: @verticalPadding @horizontalPadding;
  26. border-radius: @borderRadius;
  27. border: @border;
  28. box-sizing: border-box;
  29. }
  30. .ui.segment:first-child {
  31. margin-top: 0em;
  32. }
  33. .ui.segment:last-child {
  34. margin-bottom: 0em;
  35. }
  36. .ui.segment:after {
  37. content: '';
  38. display: block;
  39. height: 0px;
  40. clear: both;
  41. visibility: hidden;
  42. }
  43. .ui.vertical.segment {
  44. margin: 0em;
  45. padding-left: 0em;
  46. padding-right: 0em;
  47. background-color: transparent;
  48. border-radius: 0px;
  49. border: none;
  50. box-shadow: 0px 1px 0px @borderColor;
  51. }
  52. .ui.vertical.segment:first-child {
  53. padding-top: 0em;
  54. }
  55. .ui.horizontal.segment {
  56. margin: 0em;
  57. padding-top: 0em;
  58. padding-bottom: 0em;
  59. background-color: transparent;
  60. border-radius: 0px;
  61. border: none;
  62. box-shadow: 1px 0px 0px @borderColor;
  63. }
  64. .ui.horizontal.segment:first-child {
  65. padding-left: 0em;
  66. }
  67. /*-------------------
  68. Loose Coupling
  69. --------------------*/
  70. .ui.pointing.menu + .ui.attached.segment {
  71. top: 1px;
  72. }
  73. .ui.page.grid.segment,
  74. .ui.grid .ui.segment.column {
  75. padding-top: @pageGridMargin;
  76. padding-bottom: @pageGridMargin;
  77. }
  78. .ui.grid.segment,
  79. .ui.grid .ui.segment.row,
  80. .ui.grid .ui.segment.column {
  81. border-radius: 0em;
  82. box-shadow: none;
  83. border: none;
  84. }
  85. /* No padding on edge content */
  86. .ui.segment > :first-child {
  87. margin-top: 0em;
  88. }
  89. .ui.segment > :last-child {
  90. margin-bottom: 0em;
  91. }
  92. /*******************************
  93. Types
  94. *******************************/
  95. /*-------------------
  96. Piled
  97. --------------------*/
  98. .ui.piled.segment {
  99. margin: @piledMargin 0em;
  100. box-shadow: @piledBoxShadow
  101. }
  102. .ui.piled.segment:first-child {
  103. margin-top: 0em;
  104. }
  105. .ui.piled.segment:last-child {
  106. margin-bottom: 0em;
  107. }
  108. .ui.piled.segment:after,
  109. .ui.piled.segment:before {
  110. background-color: @white;
  111. visibility: visible;
  112. content: "";
  113. display: block;
  114. height: 100%;
  115. left: -1px;
  116. position: absolute;
  117. width: 100%;
  118. box-shadow: @piledBoxShadow
  119. }
  120. .ui.piled.segment:after {
  121. transform: rotate(@piledDegrees);
  122. top: 0;
  123. z-index: -1;
  124. }
  125. .ui.piled.segment:before {
  126. transform: rotate(-@piledDegrees);
  127. top: 0;
  128. z-index: -2;
  129. }
  130. /*-------------------
  131. Stacked
  132. --------------------*/
  133. .ui.stacked.segment {
  134. padding-bottom: @stackedPadding;
  135. }
  136. .ui.stacked.segment:after,
  137. .ui.stacked.segment:before {
  138. content: '';
  139. position: absolute;
  140. bottom: -3px;
  141. left: 0%;
  142. border-top: 1px solid @borderColor;
  143. background-color: @subtleTransparentBlack;
  144. width: 100%;
  145. height: @stackedHeight;
  146. visibility: visible;
  147. }
  148. .ui.stacked.segment:before {
  149. bottom: 0px;
  150. }
  151. /* Inverted */
  152. .ui.stacked.inverted.segment:after,
  153. .ui.stacked.inverted.segment:before {
  154. background-color: @subtleTransparentBlack;
  155. border-top: 1px solid @selectedBorderColor;
  156. }
  157. /*-------------------
  158. Circular
  159. --------------------*/
  160. .ui.circular.segment {
  161. display: table-cell;
  162. padding: @circularPadding;
  163. text-align: center;
  164. vertical-align: middle;
  165. border-radius: 500em;
  166. }
  167. /*-------------------
  168. Raised
  169. --------------------*/
  170. .ui.raised.segment {
  171. box-shadow: @raisedBoxShadow;
  172. }
  173. /*******************************
  174. States
  175. *******************************/
  176. .ui.disabled.segment {
  177. opacity: @disabledOpacity;
  178. color: @disabledTextColor;
  179. }
  180. /*******************************
  181. Variations
  182. *******************************/
  183. /*-------------------
  184. Basic
  185. --------------------*/
  186. .ui.basic.segment {
  187. position: relative;
  188. background-color: transparent;
  189. box-shadow: none;
  190. border-radius: 0px;
  191. }
  192. .ui.basic.segment:first-child {
  193. padding-top: 0em;
  194. }
  195. .ui.basic.segment:last-child {
  196. padding-bottom: 0em;
  197. }
  198. /*-------------------
  199. Fittted
  200. --------------------*/
  201. .ui.fitted.segment {
  202. padding: 0em;
  203. }
  204. /*-------------------
  205. Colors
  206. --------------------*/
  207. .ui.black.segment {
  208. border-top: @coloredBorderSize solid @black;
  209. border-radius: @coloredBorderRadius;
  210. }
  211. .ui.blue.segment {
  212. border-top: @coloredBorderSize solid @blue;
  213. border-radius: @coloredBorderRadius;
  214. }
  215. .ui.green.segment {
  216. border-top: @coloredBorderSize solid @green;
  217. border-radius: @coloredBorderRadius;
  218. }
  219. .ui.orange.segment {
  220. border-top: @coloredBorderSize solid @orange;
  221. border-radius: @coloredBorderRadius;
  222. }
  223. .ui.pink.segment {
  224. border-top: @coloredBorderSize solid @pink;
  225. border-radius: @coloredBorderRadius;
  226. }
  227. .ui.purple.segment {
  228. border-top: @coloredBorderSize solid @purple;
  229. border-radius: @coloredBorderRadius;
  230. }
  231. .ui.red.segment {
  232. border-top: @coloredBorderSize solid @red;
  233. border-radius: @coloredBorderRadius;
  234. }
  235. .ui.teal.segment {
  236. border-top: @coloredBorderSize solid @teal;
  237. border-radius: @coloredBorderRadius;
  238. }
  239. .ui.yellow.segment {
  240. border-top: @coloredBorderSize solid @yellow;
  241. border-radius: @coloredBorderRadius;
  242. }
  243. /*-------------------
  244. Inverted Colors
  245. --------------------*/
  246. .ui.inverted.segment,
  247. .ui.inverted.black.segment {
  248. background-color: @black !important;
  249. color: @white !important;
  250. }
  251. .ui.inverted.blue.segment {
  252. background-color: @blue !important;
  253. color: @white !important;
  254. }
  255. .ui.inverted.green.segment {
  256. background-color: @green !important;
  257. color: @white !important;
  258. }
  259. .ui.inverted.orange.segment {
  260. background-color: @orange !important;
  261. color: @white !important;
  262. }
  263. .ui.inverted.pink.segment {
  264. background-color: @pink !important;
  265. color: @white !important;
  266. }
  267. .ui.inverted.purple.segment {
  268. background-color: @purple !important;
  269. color: @white !important;
  270. }
  271. .ui.inverted.red.segment {
  272. background-color: @red !important;
  273. color: @white !important;
  274. }
  275. .ui.inverted.teal.segment {
  276. background-color: @teal !important;
  277. color: @white !important;
  278. }
  279. .ui.inverted.yellow.segment {
  280. background-color: @yellow !important;
  281. color: @white !important;
  282. }
  283. /*-------------------
  284. Aligned
  285. --------------------*/
  286. .ui.left.aligned.segment {
  287. text-align: left;
  288. }
  289. .ui.right.aligned.segment {
  290. text-align: right;
  291. }
  292. .ui.center.aligned.segment {
  293. text-align: center;
  294. }
  295. .ui.justified.segment {
  296. text-align: justify;
  297. hyphens: auto;
  298. }
  299. /*-------------------
  300. Floated
  301. --------------------*/
  302. .ui.floated.segment,
  303. .ui.left.floated.segment {
  304. float: left;
  305. }
  306. .ui.right.floated.segment {
  307. float: right;
  308. }
  309. /*-------------------
  310. Inverted
  311. --------------------*/
  312. .ui.inverted.segment {
  313. border: none;
  314. -webkit-box-shadow: none;
  315. -moz-box-shadow: none;
  316. box-shadow: none;
  317. }
  318. .ui.inverted.segment .segment {
  319. color: @textColor;
  320. }
  321. .ui.inverted.segment .inverted.segment {
  322. color: @white;
  323. }
  324. .ui.inverted.segment,
  325. .ui.primary.inverted.segment {
  326. background-color: @black;
  327. color: @white;
  328. }
  329. /*-------------------
  330. Ordinality
  331. --------------------*/
  332. .ui.secondary.segment {
  333. background-color: @secondaryBackground;
  334. color: @secondaryColor;
  335. }
  336. .ui.tertiary.segment {
  337. background-color: @tertiaryBackground;
  338. color: @textColor;
  339. }
  340. .ui.secondary.inverted.segment {
  341. background-color: @black;
  342. background-image: @secondaryInvertedBackground;
  343. color: @secondaryInvertedColor;
  344. }
  345. .ui.tertiary.inverted.segment {
  346. background-color: @black;
  347. background-image: @tertiaryInvertedColor;
  348. color: @tertiaryInvertedColor;
  349. }
  350. /*-------------------
  351. Attached
  352. --------------------*/
  353. .ui.segment.attached {
  354. top: -1px;
  355. bottom: -1px;
  356. margin: 0em;
  357. border-radius: 0px;
  358. box-shadow: 0px 0px 0px 1px @solidBorderColor;
  359. }
  360. .ui.top.attached.segment {
  361. top: 0px;
  362. bottom: -1px;
  363. margin-top: @margin;
  364. margin-bottom: 0em;
  365. border-radius: @borderRadius @borderRadius 0em 0em;
  366. }
  367. .ui.segment.top.attached:first-child {
  368. margin-top: 0em;
  369. }
  370. .ui.segment.bottom.attached {
  371. top: -1px;
  372. bottom: 0px;
  373. margin-top: 0em;
  374. margin-bottom: @margin;
  375. border-radius: 0px 0px @borderRadius @borderRadius;
  376. }
  377. .ui.segment.bottom.attached:last-child {
  378. margin-bottom: 0em;
  379. }
  380. .loadUIOverrides();