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.

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