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.

744 lines
16 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
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
10 years ago
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 > [class*="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 > [class*="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. Disabled
  221. --------------------*/
  222. .ui.list .disabled.item {
  223. pointer-events: none;
  224. color: @disabledColor !important;
  225. }
  226. .ui.inverted.list .disabled.item {
  227. color: @invertedDisabledColor !important;
  228. }
  229. /*-------------------
  230. Hover
  231. --------------------*/
  232. .ui.list a:hover .icon {
  233. color: @itemLinkIconHoverColor;
  234. }
  235. /*******************************
  236. Variations
  237. *******************************/
  238. /*-------------------
  239. Inverted
  240. --------------------*/
  241. .ui.inverted.list a .icon {
  242. color: @invertedIconLinkColor;
  243. }
  244. .ui.inverted.list .header {
  245. color: @invertedHeaderColor;
  246. }
  247. .ui.inverted.list .description {
  248. color: @invertedDescriptionColor;
  249. }
  250. /*-------------------
  251. Link
  252. --------------------*/
  253. .ui.link.list .item,
  254. .ui.link.list a.item,
  255. .ui.link.list .item a {
  256. color: @linkListItemColor;
  257. transition: @linkListTransition;
  258. }
  259. .ui.link.list a.item:hover,
  260. .ui.link.list .item a:hover {
  261. color: @linkListItemHoverColor;
  262. }
  263. .ui.link.list a.item:active,
  264. .ui.link.list .item a:active {
  265. color: @linkListItemDownColor;
  266. }
  267. .ui.link.list .active.item,
  268. .ui.link.list .active.item a {
  269. color: @linkListItemActiveColor;
  270. }
  271. /* Inverted */
  272. .ui.inverted.link.list .item,
  273. .ui.inverted.link.list a.item,
  274. .ui.inverted.link.list .item a {
  275. color: @invertedLinkListItemColor;
  276. }
  277. .ui.inverted.link.list a.item:hover,
  278. .ui.inverted.link.list .item a:hover {
  279. color: @invertedLinkListItemHoverColor;
  280. }
  281. .ui.inverted.link.list a.item:active,
  282. .ui.inverted.link.list .item a:active {
  283. color: @invertedLinkListItemDownColor;
  284. }
  285. .ui.inverted.link.list a.active.item,
  286. .ui.inverted.link.list .active.item a {
  287. color: @invertedLinkListItemActiveColor;
  288. }
  289. /*-------------------
  290. Selection
  291. --------------------*/
  292. .ui.selection.list .item {
  293. cursor: pointer;
  294. background: @selectionListBackground;
  295. padding: @selectionListItemVerticalPadding @selectionListItemHorizontalPadding;
  296. margin: @selectionListItemMargin;
  297. color: @selectionListColor;
  298. border-radius: @selectionListItemBorderRadius;
  299. transition: @selectionListTransition;
  300. }
  301. .ui.selection.list .item:last-child {
  302. margin-bottom: 0em;
  303. }
  304. .ui.selection.list .item:hover {
  305. background: @selectionListHoverBackground;
  306. color: @selectionListHoverColor;
  307. }
  308. .ui.selection.list .item:active {
  309. background: @selectionListDownBackground;
  310. color: @selectionListDownColor;
  311. }
  312. .ui.selection.list .item.active {
  313. background: @selectionListActiveBackground;
  314. color: @selectionListActiveColor;
  315. }
  316. /* Inverted */
  317. .ui.inverted.selection.list .item {
  318. background: @invertedSelectionListBackground;
  319. color: @invertedSelectionListColor;
  320. }
  321. .ui.inverted.selection.list .item:hover {
  322. background: @invertedSelectionListHoverBackground;
  323. color: @invertedSelectionListHoverColor;
  324. }
  325. .ui.inverted.selection.list .item:active {
  326. background: @invertedSelectionListDownBackground;
  327. color: @invertedSelectionListDownColor;
  328. }
  329. .ui.inverted.selection.list .item.active {
  330. background: @invertedSelectionListActiveBackground;
  331. color: @invertedSelectionListActiveColor;
  332. }
  333. /* Celled / Divided Selection List */
  334. .ui.celled.selection.list .item,
  335. .ui.divided.selection.list .item {
  336. border-radius: 0em;
  337. }
  338. /*-------------------
  339. Animated
  340. --------------------*/
  341. .ui.animated.list .item {
  342. transition: @animatedListTransition;
  343. }
  344. .ui.animated.list:not(.horizontal) .item:hover {
  345. padding-left: @animatedListIndent;
  346. }
  347. .ui.animated.list:not(.horizontal) .item:hover .item:hover {
  348. padding-left: @animatedListChildIndent;
  349. }
  350. /*-------------------
  351. Fitted
  352. --------------------*/
  353. .ui.fitted.list:not(.selection) .item {
  354. padding-left: 0em;
  355. padding-right: 0em;
  356. }
  357. .ui.fitted.selection.list .item {
  358. margin-left: -@selectionListItemHorizontalPadding;
  359. margin-right: -@selectionListItemHorizontalPadding;
  360. }
  361. /*-------------------
  362. Bulleted
  363. --------------------*/
  364. ul.ui.list,
  365. .ui.bulleted.list {
  366. margin-left: @bulletDistance;
  367. }
  368. ul.ui.list li,
  369. .ui.bulleted.list .item {
  370. position: relative;
  371. }
  372. ul.ui.list li:before,
  373. .ui.bulleted.list .item:before {
  374. position: absolute;
  375. left: @bulletOffset;
  376. content: @bulletCharacter;
  377. opacity: @bulletOpacity;
  378. color: @bulletColor;
  379. vertical-align: @bulletVerticalAlign;
  380. }
  381. ul.ui.list ul,
  382. .ui.bulleted.list .list {
  383. padding-left: @bulletChildDistance;
  384. }
  385. /* Horizontal Bulleted */
  386. ul.ui.horizontal.bulleted.list,
  387. .ui.horizontal.bulleted.list {
  388. margin-left: 0em;
  389. }
  390. ul.ui.horizontal.bulleted.list li,
  391. .ui.horizontal.bulleted.list .item {
  392. margin-left: @horizontalBulletSpacing;
  393. }
  394. ul.ui.horizontal.bulleted.list li:before,
  395. .ui.horizontal.bulleted.list .item:before {
  396. left: @horizontalBulletOffset;
  397. }
  398. ul.ui.horizontal.bulleted.list li:first-child,
  399. .ui.horizontal.bulleted.list .item:first-child {
  400. margin-left: 0em;
  401. }
  402. ul.ui.horizontal.bulleted.list li:first-child::before,
  403. .ui.horizontal.bulleted.list .item:first-child::before {
  404. display: none;
  405. }
  406. /*-------------------
  407. Ordered
  408. --------------------*/
  409. ol.ui.list,
  410. .ui.ordered.list,
  411. .ui.ordered.list .list,
  412. ol.ui.list ol {
  413. counter-reset: ordered;
  414. margin-left: @orderedCountDistance;
  415. list-style-type: none;
  416. }
  417. ol.ui.list li,
  418. .ui.ordered.list .item {
  419. list-style-type: none;
  420. position: relative;
  421. }
  422. ol.ui.list li:before,
  423. .ui.ordered.list .item:before {
  424. position: absolute;
  425. left: -(@orderedCountDistance);
  426. counter-increment: @orderedCountName;
  427. content: @orderedCountContent;
  428. text-align: @orderedCountTextAlign;
  429. color: @orderedCountColor;
  430. vertical-align: @orderedCountVerticalAlign;
  431. opacity: @orderedCountOpacity;
  432. }
  433. /* Child Lists */
  434. ol.ui.list ol,
  435. .ui.ordered.list .list {
  436. margin-left: @orderedChildCountDistance;
  437. }
  438. ol.ui.list ol li:before,
  439. .ui.ordered.list .list .item:before {
  440. left: @orderedChildCountOffset;
  441. }
  442. /* Horizontal Ordered */
  443. ol.ui.horizontal.list,
  444. .ui.ordered.horizontal.list {
  445. margin-left: 0em;
  446. }
  447. ol.ui.horizontal.list li:before,
  448. .ui.ordered.horizontal.list .item:before {
  449. position: static;
  450. margin: 0em @horizontalOrderedCountDistance 0em 0em;
  451. }
  452. /*-------------------
  453. Divided
  454. --------------------*/
  455. .ui.divided.list .item {
  456. border-top: @dividedBorder;
  457. }
  458. .ui.divided.list .list .item {
  459. border-top: @dividedChildListBorder;
  460. }
  461. .ui.divided.list .item .menu .item {
  462. border-top: @dividedChildItemBorder;
  463. }
  464. .ui.divided.list .item:first-child {
  465. border-top: none;
  466. }
  467. /* Sub Menu */
  468. .ui.divided.list:not(.horizontal) .list .item:first-child {
  469. border-top-width: @dividedBorderWidth;
  470. }
  471. /* Divided bulleted */
  472. .ui.divided.bulleted.list:not(.horizontal),
  473. .ui.divided.bulleted.list .list {
  474. margin-left: 0em;
  475. padding-left: 0em;
  476. }
  477. .ui.divided.bulleted.list .item:not(.horizontal) {
  478. padding-left: @bulletDistance;
  479. }
  480. .ui.divided.bulleted.list .item:before {
  481. left: 0em;
  482. }
  483. /* Divided Ordered */
  484. .ui.divided.ordered.list {
  485. margin-left: 0em;
  486. }
  487. .ui.divided.ordered.list .item {
  488. padding-left: @orderedCountDistance;
  489. }
  490. .ui.divided.ordered.list .item:before {
  491. left: 0em;
  492. }
  493. .ui.divided.ordered.list .item .list {
  494. margin-left: 0em;
  495. margin-right: 0em;
  496. padding-bottom: @itemVerticalPadding;
  497. }
  498. .ui.divided.ordered.list .item .list .item {
  499. padding-left: @orderedChildCountDistance;
  500. }
  501. /* Divided Selection */
  502. .ui.divided.selection.list .item {
  503. margin: 0em;
  504. border-radius: 0em;
  505. }
  506. /* Divided horizontal */
  507. .ui.divided.horizontal.list {
  508. margin-left: 0em;
  509. }
  510. .ui.divided.horizontal.list > .item {
  511. border-top: none;
  512. border-left: @dividedBorder;
  513. margin: 0em;
  514. padding-left: @horizontalDividedSpacing;
  515. padding-right: @horizontalDividedSpacing;
  516. line-height: @horizontalDividedLineHeight;
  517. }
  518. .ui.horizontal.divided.list > .item:first-child {
  519. border-left: none;
  520. }
  521. /* Inverted */
  522. .ui.divided.inverted.list > .item,
  523. .ui.divided.inverted.list > .list,
  524. .ui.divided.inverted.horizontal.list .item {
  525. border-color: @dividedInvertedBorderColor;
  526. }
  527. /*-------------------
  528. Celled
  529. --------------------*/
  530. .ui.celled.list > .item,
  531. .ui.celled.list > .list {
  532. border-top: @celledBorder;
  533. padding-left: @celledHorizontalPadding;
  534. padding-right: @celledHorizontalPadding;
  535. }
  536. .ui.celled.list > .item:last-child {
  537. border-bottom: @celledBorder;
  538. }
  539. /* Padding on all elements */
  540. .ui.celled.list > .item:first-child,
  541. .ui.celled.list > .item:last-child {
  542. padding-top: @itemVerticalPadding;
  543. padding-bottom: @itemVerticalPadding;
  544. }
  545. /* Sub Menu */
  546. .ui.celled.list .item .list .item {
  547. border-width: 0px;
  548. }
  549. .ui.celled.list .list .item:first-child {
  550. border-top-width: 0px;
  551. }
  552. /* Celled Bulleted */
  553. .ui.celled.bulleted.list {
  554. margin-left: 0em;
  555. }
  556. .ui.celled.bulleted.list .item {
  557. padding-left: (@bulletDistance);
  558. }
  559. .ui.celled.bulleted.list .item:before {
  560. left: 0em;
  561. }
  562. .ui.celled.bulleted.list .item .list {
  563. margin-left: -(@bulletDistance);
  564. margin-right: -(@bulletDistance);
  565. padding-bottom: @itemVerticalPadding;
  566. }
  567. /* Celled Ordered */
  568. .ui.celled.ordered.list {
  569. margin-left: 0em;
  570. }
  571. .ui.celled.ordered.list .item {
  572. padding-left: @orderedCountDistance;
  573. }
  574. .ui.celled.ordered.list .item:before {
  575. left: 0em;
  576. }
  577. .ui.celled.ordered.list .item .list {
  578. margin-left: 0em;
  579. margin-right: 0em;
  580. padding-bottom: @itemVerticalPadding;
  581. }
  582. .ui.celled.ordered.list .item .list .item {
  583. padding-left: @orderedChildCountDistance;
  584. }
  585. /* Celled Horizontal */
  586. .ui.horizontal.celled.list {
  587. margin-left: 0em;
  588. }
  589. .ui.horizontal.celled.list .item {
  590. border-top: none;
  591. border-left: @celledBorder;
  592. margin: 0em;
  593. padding-left: @horizontalCelledSpacing;
  594. padding-right: @horizontalCelledSpacing;
  595. line-height: @horizontalCelledLineHeight;
  596. }
  597. .ui.horizontal.celled.list .item:last-child {
  598. border-bottom: none;
  599. border-right: @celledBorder;
  600. }
  601. /* Inverted */
  602. .ui.celled.inverted.list > .item,
  603. .ui.celled.inverted.list > .list {
  604. border-color: @celledInvertedBorder;
  605. }
  606. .ui.celled.inverted.horizontal.list .item {
  607. border-color: @celledInvertedBorder;
  608. }
  609. /*-------------------
  610. Relaxed
  611. --------------------*/
  612. .ui.relaxed.list:not(.horizontal) .item {
  613. padding-top: @relaxedVerticalPadding;
  614. padding-bottom: @relaxedVerticalPadding;
  615. }
  616. .ui.relaxed.list .header {
  617. /*margin-bottom: @relaxedHeaderMargin;*/
  618. }
  619. .ui.horizontal.relaxed.list .item {
  620. padding-left: @relaxedHorizontalPadding;
  621. padding-right: @relaxedHorizontalPadding;
  622. }
  623. .ui[class*="very relaxed"].list:not(.horizontal) .item {
  624. padding-top: @veryRelaxedVerticalPadding;
  625. padding-bottom: @veryRelaxedVerticalPadding;
  626. }
  627. .ui[class*="very relaxed"].list .header {
  628. /*margin-bottom: @veryRelaxedHeaderMargin;*/
  629. }
  630. .ui.horizontal[class*="very relaxed"].list .item {
  631. padding-left: @veryRelaxedHorizontalPadding;
  632. padding-right: @veryRelaxedHorizontalPadding;
  633. }
  634. /*-------------------
  635. Sizes
  636. --------------------*/
  637. .ui.mini.list .item {
  638. font-size: @mini;
  639. }
  640. .ui.tiny.list .item {
  641. font-size: @tiny;
  642. }
  643. .ui.small.list .item {
  644. font-size: @small;
  645. }
  646. .ui.list .item {
  647. font-size: @medium;
  648. }
  649. .ui.large.list .item {
  650. font-size: @large;
  651. }
  652. .ui.big.list .item {
  653. font-size: @big;
  654. }
  655. .ui.huge.list .item {
  656. font-size: @huge;
  657. }
  658. .ui.massive.list .item {
  659. font-size: @massive;
  660. }
  661. .loadUIOverrides();