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.

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