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.

470 lines
9.0 KiB

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