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.

469 lines
9.0 KiB

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