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.

716 lines
15 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - List
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'element';
  15. @element : 'list';
  16. @import '../../semantic.config';
  17. /*******************************
  18. List
  19. *******************************/
  20. ul.ui.list,
  21. ol.ui.list,
  22. .ui.list {
  23. list-style-type: @listStyleType;
  24. margin: @margin;
  25. padding: @verticalPadding @horizontalPadding;
  26. }
  27. ul.ui.list:first-child,
  28. ol.ui.list:first-child,
  29. .ui.list:first-child {
  30. margin-top: 0em;
  31. padding-top: 0em;
  32. }
  33. ul.ui.list:last-child,
  34. ol.ui.list:last-child,
  35. .ui.list:last-child {
  36. margin-bottom: 0em;
  37. padding-bottom: 0em;
  38. }
  39. /*******************************
  40. Content
  41. *******************************/
  42. /* List Item */
  43. ul.ui.list li,
  44. ol.ui.list li,
  45. .ui.list .item {
  46. display: list-item;
  47. table-layout: fixed;
  48. list-style-type: @listStyleType;
  49. list-style-position: @listStylePosition;
  50. padding: @itemVerticalPadding @itemHorizontalPadding;
  51. line-height: @itemLineHeight;
  52. }
  53. ul.ui.list > li:first-child:after,
  54. ol.ui.list > li:first-child:after,
  55. .ui.list .item:after {
  56. content: '';
  57. display: block;
  58. height: 0;
  59. clear: both;
  60. visibility: hidden;
  61. }
  62. ul.ui.list li:first-child,
  63. ol.ui.list li:first-child,
  64. .ui.list .item:first-child {
  65. padding-top: 0em;
  66. }
  67. ul.ui.list li:last-child,
  68. ol.ui.list li:last-child,
  69. .ui.list .item:last-child {
  70. padding-bottom: 0em;
  71. }
  72. /* Child List */
  73. ul.ui.list ul,
  74. ol.ui.list ol,
  75. .ui.list .list {
  76. clear: both;
  77. margin: 0em;
  78. padding: @childListPadding;
  79. }
  80. /* Icon */
  81. .ui.list .item > .icon {
  82. display: table-cell;
  83. margin: 0em;
  84. padding-top: @iconOffset;
  85. padding-right: @iconDistance;
  86. vertical-align: @iconContentVerticalAlign;
  87. transition: @iconTransition;
  88. }
  89. .ui.list .item > .top.aligned.icon {
  90. vertical-align: top;
  91. }
  92. .ui.list .item > .icon:only-child {
  93. display: inline-block;
  94. vertical-align: @iconVerticalAlign;
  95. }
  96. /* Image */
  97. .ui.list .item > .image {
  98. display: table-cell;
  99. background-color: transparent;
  100. margin: 0em;
  101. padding-right: @imageDistance;
  102. vertical-align: @imageAlign;
  103. }
  104. .ui.list .item > .top.aligned.image {
  105. vertical-align: top;
  106. }
  107. .ui.list .item > .image img {
  108. vertical-align: @imageAlign;
  109. }
  110. .ui.list .item > img.image,
  111. .ui.list .item > .image:only-child {
  112. display: inline-block;
  113. padding-right: 0em;
  114. }
  115. /* Content */
  116. .ui.list .item > .content {
  117. line-height: @contentLineHeight;
  118. }
  119. .ui.list .item > .image + .content,
  120. .ui.list .item > .icon + .content {
  121. display: table-cell;
  122. padding-left: @contentDistance;
  123. vertical-align: @contentVerticalAlign;
  124. }
  125. .ui.list .item > .image + .content,
  126. .ui.list .item > .icon + .content {
  127. display: table-cell;
  128. padding-left: @contentDistance;
  129. vertical-align: @contentVerticalAlign;
  130. }
  131. .ui.list .item > img.image + .content {
  132. display: inline-block;
  133. }
  134. .ui.list .item > .content > .list {
  135. margin-left: 0em;
  136. padding-left: 0em;
  137. }
  138. /* Link */
  139. .ui.list a {
  140. cursor: pointer;
  141. color: @itemLinkColor;
  142. }
  143. .ui.list a:hover {
  144. color: @itemLinkHoverColor;
  145. }
  146. .ui.list a .icon {
  147. color: @itemLinkIconColor;
  148. }
  149. /* Header */
  150. .ui.list .header {
  151. display: block;
  152. margin: 0em;
  153. font-family: @itemHeaderFontFamily;
  154. font-weight: @itemHeaderFontWeight;
  155. color: @itemHeaderColor;
  156. }
  157. .ui.list .description {
  158. display: block;
  159. color: @itemDescriptionColor;
  160. }
  161. /* Floated Content */
  162. .ui.list .item > .left.floated {
  163. float: left;
  164. margin-right: @floatMargin;
  165. }
  166. .ui.list .item > .right.floated {
  167. float: right;
  168. margin-left: @floatMargin;
  169. }
  170. /*******************************
  171. Coupling
  172. *******************************/
  173. .ui.menu .ui.list .item:before {
  174. border: none;
  175. background: none;
  176. }
  177. /*******************************
  178. Types
  179. *******************************/
  180. /*-------------------
  181. Horizontal
  182. --------------------*/
  183. .ui.horizontal.list {
  184. display: inline-block;
  185. font-size: 0em;
  186. }
  187. .ui.horizontal.list > .item {
  188. display: inline-block;
  189. margin-left: @horizontalSpacing;
  190. font-size: 1rem;
  191. }
  192. .ui.horizontal.list > .item:first-child {
  193. margin-left: 0em !important;
  194. padding-left: 0em !important;
  195. }
  196. .ui.horizontal.list .list {
  197. padding-left: 0em;
  198. padding-bottom: 0em;
  199. }
  200. /* Padding on all elements */
  201. .ui.horizontal.list > .item:first-child,
  202. .ui.horizontal.list > .item:last-child {
  203. padding-top: @itemVerticalPadding;
  204. padding-bottom: @itemVerticalPadding;
  205. }
  206. /* Horizontal List */
  207. .ui.horizontal.list .item > .icon {
  208. margin: 0em;
  209. padding: 0em @horizontalIconDistance 0em 0em;
  210. }
  211. .ui.horizontal.list .item > .icon,
  212. .ui.horizontal.list .item > .icon + .content {
  213. float: none;
  214. display: inline-block;
  215. }
  216. /*******************************
  217. States
  218. *******************************/
  219. /*-------------------
  220. Hover
  221. --------------------*/
  222. .ui.list a:hover .icon {
  223. color: @itemLinkIconHoverColor;
  224. }
  225. /*******************************
  226. Variations
  227. *******************************/
  228. /*-------------------
  229. Inverted
  230. --------------------*/
  231. .ui.inverted.list a .icon {
  232. color: @invertedIconLinkColor;
  233. }
  234. .ui.inverted.list .header {
  235. color: @invertedHeaderColor;
  236. }
  237. .ui.inverted.list .description {
  238. color: @invertedDescriptionColor;
  239. }
  240. /*-------------------
  241. Link
  242. --------------------*/
  243. .ui.link.list .item,
  244. .ui.link.list a.item,
  245. .ui.link.list .item a {
  246. color: @linkListItemColor;
  247. }
  248. .ui.link.list a.item:hover,
  249. .ui.link.list .item a:hover {
  250. color:@linkListItemHoverColor;
  251. }
  252. .ui.link.list a.item:active,
  253. .ui.link.list .item a:active {
  254. color:@linkListItemDownColor;
  255. }
  256. .ui.link.list .active.item,
  257. .ui.link.list .active.item a {
  258. color: @linkListItemActiveColor;
  259. }
  260. /* Inverted */
  261. .ui.inverted.link.list .item,
  262. .ui.inverted.link.list a.item,
  263. .ui.inverted.link.list .item a {
  264. color: @invertedLinkListItemColor;
  265. }
  266. .ui.inverted.link.list a.item:hover,
  267. .ui.inverted.link.list .item a:hover {
  268. color: @invertedLinkListItemHoverColor;
  269. }
  270. .ui.inverted.link.list a.item:active,
  271. .ui.inverted.link.list .item a:active {
  272. color: @invertedLinkListItemDownColor;
  273. }
  274. .ui.inverted.link.list a.active.item,
  275. .ui.inverted.link.list .active.item a {
  276. color: @invertedLinkListItemActiveColor;
  277. }
  278. /*-------------------
  279. Selection
  280. --------------------*/
  281. .ui.selection.list .item {
  282. cursor: pointer;
  283. background: @selectionListBackground;
  284. padding: @selectionListItemVerticalPadding @selectionListItemHorizontalPadding;
  285. color: @selectionListColor;
  286. transition: @selectionListTransition;
  287. }
  288. .ui.selection.list .item:hover {
  289. background: @selectionListHoverBackground;
  290. color: @selectionListHoverColor;
  291. }
  292. .ui.selection.list .item:active {
  293. background: @selectionListDownBackground;
  294. color: @selectionListDownColor;
  295. }
  296. .ui.selection.list .item.active {
  297. background: @selectionListActiveBackground;
  298. color: @selectionListActiveColor;
  299. }
  300. /* Inverted */
  301. .ui.inverted.selection.list .item {
  302. background: @invertedSelectionListBackground;
  303. color: @selectionListColor;
  304. }
  305. .ui.inverted.selection.list .item:hover {
  306. background: @invertedSelectionListHoverBackground;
  307. color: @invertedSelectionListHoverColor;
  308. }
  309. .ui.inverted.selection.list .item:active {
  310. background: @invertedSelectionListDownBackground;
  311. color: @invertedSelectionListDownColor;
  312. }
  313. .ui.inverted.selection.list .item.active {
  314. background: @invertedSelectionListActiveBackground;
  315. color: @invertedSelectionListActiveColor;
  316. }
  317. /*-------------------
  318. Animated
  319. --------------------*/
  320. .ui.animated.list .item {
  321. transition: @animatedListTransition;
  322. }
  323. .ui.animated.list:not(.horizontal) .item:hover {
  324. padding-left: @animatedListIndent;
  325. }
  326. .ui.animated.list:not(.horizontal) .item:hover .item:hover {
  327. padding-left: @animatedListChildIndent;
  328. }
  329. /*-------------------
  330. Fitted
  331. --------------------*/
  332. .ui.fitted.list:not(.selection) .item {
  333. padding-left: 0em;
  334. padding-right: 0em;
  335. }
  336. .ui.fitted.selection.list .item {
  337. margin-left: -@selectionListItemHorizontalPadding;
  338. margin-right: -@selectionListItemHorizontalPadding;
  339. }
  340. /*-------------------
  341. Bulleted
  342. --------------------*/
  343. ul.ui.list,
  344. .ui.bulleted.list {
  345. margin-left: @bulletDistance;
  346. }
  347. ul.ui.list li,
  348. .ui.bulleted.list .item {
  349. position: relative;
  350. }
  351. ul.ui.list li:before,
  352. .ui.bulleted.list .item:before {
  353. position: absolute;
  354. left: @bulletOffset;
  355. content: @bulletCharacter;
  356. opacity: @bulletOpacity;
  357. color: @bulletColor;
  358. vertical-align: @bulletVerticalAlign;
  359. }
  360. ul.ui.list ul,
  361. .ui.bulleted.list .list {
  362. padding-left: @bulletChildDistance;
  363. }
  364. /* Horizontal Bulleted */
  365. ul.ui.horizontal.bulleted.list,
  366. .ui.horizontal.bulleted.list {
  367. margin-left: 0em;
  368. }
  369. ul.ui.horizontal.bulleted.list li,
  370. .ui.horizontal.bulleted.list .item {
  371. margin-left: @horizontalBulletSpacing;
  372. }
  373. ul.ui.horizontal.bulleted.list li:before,
  374. .ui.horizontal.bulleted.list .item:before {
  375. left: @horizontalBulletOffset;
  376. }
  377. ul.ui.horizontal.bulleted.list li:first-child,
  378. .ui.horizontal.bulleted.list .item:first-child {
  379. margin-left: 0em;
  380. }
  381. ul.ui.horizontal.bulleted.list li:first-child::before,
  382. .ui.horizontal.bulleted.list .item:first-child::before {
  383. display: none;
  384. }
  385. /*-------------------
  386. Ordered
  387. --------------------*/
  388. ol.ui.list,
  389. .ui.ordered.list,
  390. .ui.ordered.list .list,
  391. ol.ui.list ol {
  392. counter-reset: ordered;
  393. margin-left: @orderedCountDistance;
  394. list-style-type: none;
  395. }
  396. ol.ui.list li,
  397. .ui.ordered.list .item {
  398. list-style-type: none;
  399. position: relative;
  400. }
  401. ol.ui.list li:before,
  402. .ui.ordered.list .item:before {
  403. position: absolute;
  404. left: -(@orderedCountDistance);
  405. counter-increment: @orderedCountName;
  406. content: @orderedCountContent;
  407. text-align: @orderedCountTextAlign;
  408. color: @orderedCountColor;
  409. vertical-align: @orderedCountVerticalAlign;
  410. opacity: @orderedCountOpacity;
  411. }
  412. /* Child Lists */
  413. ol.ui.list ol,
  414. .ui.ordered.list .list {
  415. margin-left: @orderedChildCountDistance;
  416. }
  417. ol.ui.list ol li:before,
  418. .ui.ordered.list .list .item:before {
  419. left: @orderedChildCountOffset;
  420. }
  421. /* Horizontal Ordered */
  422. ol.ui.horizontal.list,
  423. .ui.ordered.horizontal.list {
  424. margin-left: 0em;
  425. }
  426. ol.ui.horizontal.list li:before,
  427. .ui.ordered.horizontal.list .item:before {
  428. position: static;
  429. margin: 0em @horizontalOrderedCountDistance 0em 0em;
  430. }
  431. /*-------------------
  432. Divided
  433. --------------------*/
  434. .ui.divided.list .item {
  435. border-top: @dividedBorder;
  436. }
  437. .ui.divided.list .list .item {
  438. border-top: @dividedChildListBorder;
  439. }
  440. .ui.divided.list .item .menu .item {
  441. border-top: @dividedChildItemBorder;
  442. }
  443. .ui.divided.list .item:first-child {
  444. border-top: none;
  445. }
  446. /* Sub Menu */
  447. .ui.divided.list:not(.horizontal) .list .item:first-child {
  448. border-top-width: @dividedBorderWidth;
  449. }
  450. /* Divided bulleted */
  451. .ui.divided.bulleted.list:not(.horizontal),
  452. .ui.divided.bulleted.list .list {
  453. margin-left: 0em;
  454. padding-left: 0em;
  455. }
  456. .ui.divided.bulleted.list .item:not(.horizontal) {
  457. padding-left: @bulletDistance;
  458. }
  459. .ui.divided.bulleted.list .item:before {
  460. left: 0em;
  461. }
  462. /* Divided Ordered */
  463. .ui.divided.ordered.list {
  464. margin-left: 0em;
  465. }
  466. .ui.divided.ordered.list .item {
  467. padding-left: @orderedCountDistance;
  468. }
  469. .ui.divided.ordered.list .item:before {
  470. left: 0em;
  471. }
  472. .ui.divided.ordered.list .item .list {
  473. margin-left: 0em;
  474. margin-right: 0em;
  475. padding-bottom: @itemVerticalPadding;
  476. }
  477. .ui.divided.ordered.list .item .list .item {
  478. padding-left: @orderedChildCountDistance;
  479. }
  480. /* Divided horizontal */
  481. .ui.divided.horizontal.list {
  482. margin-left: 0em;
  483. }
  484. .ui.divided.horizontal.list > .item {
  485. border-top: none;
  486. border-left: @dividedBorder;
  487. margin: 0em;
  488. padding-left: @horizontalDividedSpacing;
  489. padding-right: @horizontalDividedSpacing;
  490. line-height: @horizontalDividedLineHeight;
  491. }
  492. .ui.horizontal.divided.list > .item:first-child {
  493. border-left: none;
  494. }
  495. /* Inverted */
  496. .ui.divided.inverted.list > .item,
  497. .ui.divided.inverted.list > .list,
  498. .ui.divided.inverted.horizontal.list .item {
  499. border-color: @dividedInvertedBorderColor;
  500. }
  501. /*-------------------
  502. Celled
  503. --------------------*/
  504. .ui.celled.list > .item,
  505. .ui.celled.list > .list {
  506. border-top: @celledBorder;
  507. padding-left: @celledHorizontalPadding;
  508. padding-right: @celledHorizontalPadding;
  509. }
  510. .ui.celled.list > .item:last-child {
  511. border-bottom: @celledBorder;
  512. }
  513. /* Padding on all elements */
  514. .ui.celled.list > .item:first-child,
  515. .ui.celled.list > .item:last-child {
  516. padding-top: @itemVerticalPadding;
  517. padding-bottom: @itemVerticalPadding;
  518. }
  519. /* Sub Menu */
  520. .ui.celled.list .item .list .item {
  521. border-width: 0px;
  522. }
  523. .ui.celled.list .list .item:first-child {
  524. border-top-width: 0px;
  525. }
  526. /* Celled Bulleted */
  527. .ui.celled.bulleted.list {
  528. margin-left: 0em;
  529. }
  530. .ui.celled.bulleted.list .item {
  531. padding-left: (@bulletDistance);
  532. }
  533. .ui.celled.bulleted.list .item:before {
  534. left: 0em;
  535. }
  536. .ui.celled.bulleted.list .item .list {
  537. margin-left: -(@bulletDistance);
  538. margin-right: -(@bulletDistance);
  539. padding-bottom: @itemVerticalPadding;
  540. }
  541. /* Celled Ordered */
  542. .ui.celled.ordered.list {
  543. margin-left: 0em;
  544. }
  545. .ui.celled.ordered.list .item {
  546. padding-left: @orderedCountDistance;
  547. }
  548. .ui.celled.ordered.list .item:before {
  549. left: 0em;
  550. }
  551. .ui.celled.ordered.list .item .list {
  552. margin-left: 0em;
  553. margin-right: 0em;
  554. padding-bottom: @itemVerticalPadding;
  555. }
  556. .ui.celled.ordered.list .item .list .item {
  557. padding-left: @orderedChildCountDistance;
  558. }
  559. /* Celled Horizontal */
  560. .ui.horizontal.celled.list {
  561. margin-left: 0em;
  562. }
  563. .ui.horizontal.celled.list .item {
  564. border-top: none;
  565. border-left: @celledBorder;
  566. margin: 0em;
  567. padding-left: @horizontalCelledSpacing;
  568. padding-right: @horizontalCelledSpacing;
  569. line-height: @horizontalCelledLineHeight;
  570. }
  571. .ui.horizontal.celled.list .item:last-child {
  572. border-bottom: none;
  573. border-right: @celledBorder;
  574. }
  575. /* Inverted */
  576. .ui.celled.inverted.list > .item,
  577. .ui.celled.inverted.list > .list {
  578. border-color: @celledInvertedBorder;
  579. }
  580. .ui.celled.inverted.horizontal.list .item {
  581. border-color: @celledInvertedBorder;
  582. }
  583. /*-------------------
  584. Relaxed
  585. --------------------*/
  586. .ui.relaxed.list:not(.horizontal) .item {
  587. padding-top: @relaxedVerticalPadding;
  588. padding-bottom: @relaxedVerticalPadding;
  589. }
  590. .ui.relaxed.list .header {
  591. /*margin-bottom: @relaxedHeaderMargin;*/
  592. }
  593. .ui.horizontal.relaxed.list .item {
  594. padding-left: @relaxedHorizontalPadding;
  595. padding-right: @relaxedHorizontalPadding;
  596. }
  597. .ui.very.relaxed.list:not(.horizontal) .item {
  598. padding-top: @veryRelaxedVerticalPadding;
  599. padding-bottom: @veryRelaxedVerticalPadding;
  600. }
  601. .ui.very.relaxed.list .header {
  602. /*margin-bottom: @veryRelaxedHeaderMargin;*/
  603. }
  604. .ui.horizontal.very.relaxed.list .item {
  605. padding-left: @veryRelaxedHorizontalPadding;
  606. padding-right: @veryRelaxedHorizontalPadding;
  607. }
  608. /*-------------------
  609. Sizes
  610. --------------------*/
  611. .ui.mini.list .item {
  612. font-size: @mini;
  613. }
  614. .ui.tiny.list .item {
  615. font-size: @tiny;
  616. }
  617. .ui.small.list .item {
  618. font-size: @small;
  619. }
  620. .ui.list .item {
  621. font-size: @medium;
  622. }
  623. .ui.large.list .item {
  624. font-size: @large;
  625. }
  626. .ui.big.list .item {
  627. font-size: @big;
  628. }
  629. .ui.huge.list .item {
  630. font-size: @huge;
  631. }
  632. .ui.massive.list .item {
  633. font-size: @massive;
  634. }
  635. .loadUIOverrides();