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.

439 lines
8.2 KiB

11 years ago
11 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. /*******************************
  86. Types
  87. *******************************/
  88. /*-------------------
  89. Piled
  90. --------------------*/
  91. .ui.piled.segment {
  92. margin: @piledMargin 0em;
  93. box-shadow: @piledBoxShadow
  94. }
  95. .ui.piled.segment:first-child {
  96. margin-top: 0em;
  97. }
  98. .ui.piled.segment:last-child {
  99. margin-bottom: 0em;
  100. }
  101. .ui.piled.segment:after,
  102. .ui.piled.segment:before {
  103. background-color: @white;
  104. visibility: visible;
  105. content: "";
  106. display: block;
  107. height: 100%;
  108. left: -1px;
  109. position: absolute;
  110. width: 100%;
  111. box-shadow: @piledBoxShadow
  112. }
  113. .ui.piled.segment:after {
  114. transform: rotate(@piledDegrees);
  115. top: 0;
  116. z-index: -1;
  117. }
  118. .ui.piled.segment:before {
  119. transform: rotate(-@piledDegrees);
  120. top: 0;
  121. z-index: -2;
  122. }
  123. /*-------------------
  124. Stacked
  125. --------------------*/
  126. .ui.stacked.segment {
  127. padding-bottom: @stackedPadding;
  128. }
  129. .ui.stacked.segment:after,
  130. .ui.stacked.segment:before {
  131. content: '';
  132. position: absolute;
  133. bottom: -3px;
  134. left: 0%;
  135. border-top: 1px solid @borderColor;
  136. background-color: @subtleTransparentBlack;
  137. width: 100%;
  138. height: @stackedHeight;
  139. visibility: visible;
  140. }
  141. .ui.stacked.segment:before {
  142. bottom: 0px;
  143. }
  144. /* Inverted */
  145. .ui.stacked.inverted.segment:after,
  146. .ui.stacked.inverted.segment:before {
  147. background-color: @subtleTransparentBlack;
  148. border-top: 1px solid @selectedBorderColor;
  149. }
  150. /*-------------------
  151. Circular
  152. --------------------*/
  153. .ui.circular.segment {
  154. display: table-cell;
  155. padding: @circularPadding;
  156. text-align: center;
  157. vertical-align: middle;
  158. border-radius: 500em;
  159. }
  160. /*-------------------
  161. Raised
  162. --------------------*/
  163. .ui.raised.segment {
  164. box-shadow: @raisedBoxShadow;
  165. }
  166. /*******************************
  167. States
  168. *******************************/
  169. .ui.disabled.segment {
  170. opacity: @disabledOpacity;
  171. color: @disabledTextColor;
  172. }
  173. /*******************************
  174. Variations
  175. *******************************/
  176. /*-------------------
  177. Basic
  178. --------------------*/
  179. .ui.basic.segment {
  180. position: relative;
  181. background-color: transparent;
  182. box-shadow: none;
  183. border-radius: 0px;
  184. }
  185. .ui.basic.segment:first-child {
  186. padding-top: 0em;
  187. }
  188. .ui.basic.segment:last-child {
  189. padding-bottom: 0em;
  190. }
  191. /*-------------------
  192. Fittted
  193. --------------------*/
  194. .ui.fitted.segment {
  195. padding: 0em;
  196. }
  197. /*-------------------
  198. Colors
  199. --------------------*/
  200. .ui.black.segment:not(.inverted) {
  201. border-top: @coloredBorderSize solid @black;
  202. border-radius: @coloredBorderRadius !important;
  203. }
  204. .ui.blue.segment:not(.inverted) {
  205. border-top: @coloredBorderSize solid @blue;
  206. border-radius: @coloredBorderRadius !important;
  207. }
  208. .ui.green.segment:not(.inverted) {
  209. border-top: @coloredBorderSize solid @green;
  210. border-radius: @coloredBorderRadius !important;
  211. }
  212. .ui.orange.segment:not(.inverted) {
  213. border-top: @coloredBorderSize solid @orange;
  214. border-radius: @coloredBorderRadius !important;
  215. }
  216. .ui.pink.segment:not(.inverted) {
  217. border-top: @coloredBorderSize solid @pink;
  218. border-radius: @coloredBorderRadius !important;
  219. }
  220. .ui.purple.segment:not(.inverted) {
  221. border-top: @coloredBorderSize solid @purple;
  222. border-radius: @coloredBorderRadius !important;
  223. }
  224. .ui.red.segment:not(.inverted) {
  225. border-top: @coloredBorderSize solid @red;
  226. border-radius: @coloredBorderRadius !important;
  227. }
  228. .ui.teal.segment:not(.inverted) {
  229. border-top: @coloredBorderSize solid @teal;
  230. border-radius: @coloredBorderRadius !important;
  231. }
  232. .ui.yellow.segment:not(.inverted) {
  233. border-top: @coloredBorderSize solid @yellow;
  234. border-radius: @coloredBorderRadius !important;
  235. }
  236. /*-------------------
  237. Inverted Colors
  238. --------------------*/
  239. .ui.inverted.segment,
  240. .ui.inverted.black.segment {
  241. background-color: @black !important;
  242. color: @white !important;
  243. }
  244. .ui.inverted.blue.segment {
  245. background-color: @blue !important;
  246. color: @white !important;
  247. }
  248. .ui.inverted.green.segment {
  249. background-color: @green !important;
  250. color: @white !important;
  251. }
  252. .ui.inverted.orange.segment {
  253. background-color: @orange !important;
  254. color: @white !important;
  255. }
  256. .ui.inverted.pink.segment {
  257. background-color: @pink !important;
  258. color: @white !important;
  259. }
  260. .ui.inverted.purple.segment {
  261. background-color: @purple !important;
  262. color: @white !important;
  263. }
  264. .ui.inverted.red.segment {
  265. background-color: @red !important;
  266. color: @white !important;
  267. }
  268. .ui.inverted.teal.segment {
  269. background-color: @teal !important;
  270. color: @white !important;
  271. }
  272. .ui.inverted.yellow.segment {
  273. background-color: @yellow !important;
  274. color: @white !important;
  275. }
  276. /*-------------------
  277. Aligned
  278. --------------------*/
  279. .ui.left.aligned.segment {
  280. text-align: left;
  281. }
  282. .ui.right.aligned.segment {
  283. text-align: right;
  284. }
  285. .ui.center.aligned.segment {
  286. text-align: center;
  287. }
  288. /*-------------------
  289. Floated
  290. --------------------*/
  291. .ui.floated.segment,
  292. .ui.left.floated.segment {
  293. float: left;
  294. }
  295. .ui.right.floated.segment {
  296. float: right;
  297. }
  298. /*-------------------
  299. Inverted
  300. --------------------*/
  301. .ui.inverted.segment {
  302. border: none;
  303. -webkit-box-shadow: none;
  304. -moz-box-shadow: none;
  305. box-shadow: none;
  306. }
  307. .ui.inverted.segment .segment {
  308. color: @textColor;
  309. }
  310. .ui.inverted.segment .inverted.segment {
  311. color: @white;
  312. }
  313. .ui.inverted.segment,
  314. .ui.primary.inverted.segment {
  315. background-color: @black;
  316. color: @white;
  317. }
  318. .ui.inverted.block.segment,
  319. .ui.inverted.attached.segment {
  320. box-shadow: none !important;
  321. }
  322. /*-------------------
  323. Ordinality
  324. --------------------*/
  325. .ui.secondary.segment {
  326. background: @secondaryBackground;
  327. color: @secondaryColor;
  328. }
  329. .ui.tertiary.segment {
  330. background: @tertiaryBackground;
  331. color: @textColor;
  332. }
  333. .ui.secondary.inverted.segment {
  334. background: @secondaryInvertedBackground;
  335. color: @secondaryInvertedColor;
  336. }
  337. .ui.tertiary.inverted.segment {
  338. background: @tertiaryInvertedBackground;
  339. color: @tertiaryInvertedColor;
  340. }
  341. /*-------------------
  342. Attached
  343. --------------------*/
  344. .ui.segment.attached {
  345. top: 0px;
  346. bottom: 0px;
  347. margin: 0em;
  348. border-radius: 0px;
  349. box-shadow: @attachedBoxShadow;
  350. }
  351. .ui.top.attached.segment {
  352. top: @attachedTopOffset;
  353. bottom: 0px;
  354. margin-top: @margin;
  355. margin-bottom: 0em;
  356. border-radius: @borderRadius @borderRadius 0em 0em;
  357. }
  358. .ui.segment.top.attached:first-child {
  359. margin-top: 0em;
  360. }
  361. .ui.segment.bottom.attached {
  362. top: @attachedBottomOffset;
  363. bottom: 0px;
  364. margin-top: 0em;
  365. margin-bottom: @margin;
  366. box-shadow: @attachedBottomBoxShadow;
  367. border-radius: 0em 0em @borderRadius @borderRadius;
  368. }
  369. .ui.segment.bottom.attached:last-child {
  370. margin-bottom: 0em;
  371. }
  372. .loadUIOverrides();