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.

708 lines
14 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
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
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 - Item
  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 : 'view';
  15. @element : 'card';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Standard
  19. *******************************/
  20. /*--------------
  21. Cards
  22. ---------------*/
  23. .ui.cards {
  24. margin: @groupCardsMargin;
  25. }
  26. .ui.cards > .card {
  27. display: @groupDisplay;
  28. margin: @groupCardMargin;
  29. float: @groupFloat;
  30. }
  31. .ui.cards:first-child,
  32. .ui.card:first-child {
  33. margin-top: 0em;
  34. }
  35. .ui.cards:last-child,
  36. .ui.card:last-child {
  37. margin-bottom: 0em;
  38. }
  39. /* Clearing */
  40. .ui.cards:after,
  41. .ui.card:after {
  42. display: block;
  43. content: ' ';
  44. height: 0px;
  45. clear: both;
  46. overflow: hidden;
  47. visibility: hidden;
  48. }
  49. /*--------------
  50. Card
  51. ---------------*/
  52. .ui.cards > .card,
  53. .ui.card {
  54. position: relative;
  55. display: @display;
  56. width: @width;
  57. min-height: @minHeight;
  58. background: @background;
  59. padding: @padding;
  60. border: @border;
  61. border-radius: @borderRadius;
  62. box-shadow: @boxShadow;
  63. transition: @transition;
  64. z-index: @zIndex;
  65. }
  66. .ui.card {
  67. margin: @margin;
  68. }
  69. .ui.cards > .card a,
  70. .ui.card a {
  71. cursor: pointer;
  72. }
  73. /*--------------
  74. Rounded Edges
  75. ---------------*/
  76. .ui.cards > .card > :first-child,
  77. .ui.card > :first-child {
  78. border-radius: @borderRadius @borderRadius 0em 0em !important;
  79. }
  80. .ui.cards > .card > :last-child,
  81. .ui.card > :last-child {
  82. border-radius: 0em 0em @borderRadius @borderRadius !important;
  83. }
  84. /*--------------
  85. Images
  86. ---------------*/
  87. .ui.cards > .card > .image,
  88. .ui.card > .image {
  89. display: block;
  90. position: relative;
  91. padding: @imagePadding;
  92. background: @imageBackground;
  93. }
  94. .ui.cards > .card > .image > img,
  95. .ui.card > .image > img {
  96. display: block;
  97. width: 100%;
  98. height: auto;
  99. border-radius: @imageBorderRadius;
  100. border: @imageBorder;
  101. }
  102. .ui.cards > .card > .image:only-child > img,
  103. .ui.card > .image:only-child > img {
  104. border-radius: @borderRadius;
  105. }
  106. /*--------------
  107. Content
  108. ---------------*/
  109. .ui.cards > .card > .content,
  110. .ui.card > .content {
  111. background: @contentBackground;
  112. margin: @contentMargin;
  113. padding: @contentPadding;
  114. box-shadow: @contentBoxShadow;
  115. font-size: @contentFontSize;
  116. border: @contentBorder;
  117. border-radius: @contentBorderRadius;
  118. }
  119. .ui.cards > .card > .content:after,
  120. .ui.card > .content:after {
  121. display: block;
  122. content: ' ';
  123. height: 0px;
  124. clear: both;
  125. overflow: hidden;
  126. visibility: hidden;
  127. }
  128. .ui.cards > .card > .content > .header,
  129. .ui.card > .content > .header {
  130. display: block;
  131. margin: @headerMargin;
  132. font-family: @headerFont;
  133. font-weight: @headerFontWeight;
  134. font-size: @headerFontSize;
  135. color: @headerColor;
  136. }
  137. .ui.cards > .card > .content > .meta + .description,
  138. .ui.cards > .card > .content > .header + .description,
  139. .ui.card > .content > .meta + .description,
  140. .ui.card > .content > .header + .description {
  141. margin-top: @descriptionDistance;
  142. }
  143. /*--------------
  144. Floated
  145. ---------------*/
  146. .ui.cards > .card .left.floated,
  147. .ui.card .left.floated {
  148. float: left;
  149. }
  150. .ui.cards > .card .right.floated,
  151. .ui.card .right.floated {
  152. float: right;
  153. }
  154. /*--------------
  155. Content Image
  156. ---------------*/
  157. .ui.cards > .card .content img,
  158. .ui.card .content img {
  159. display: inline-block;
  160. vertical-align: @contentImageVerticalAlign;
  161. width: @contentImageWidth;
  162. }
  163. .ui.cards > .card img.avatar,
  164. .ui.cards > .card .avatar img,
  165. .ui.card img.avatar,
  166. .ui.card .avatar img {
  167. width: @avatarSize;
  168. height: @avatarSize;
  169. border-radius: @avatarBorderRadius;
  170. }
  171. /*--------------
  172. Description
  173. ---------------*/
  174. .ui.cards > .card > .content > .description,
  175. .ui.card > .content > .description {
  176. clear: both;
  177. color: @descriptionColor;
  178. }
  179. /*--------------
  180. Paragraph
  181. ---------------*/
  182. .ui.cards > .card > .content p,
  183. .ui.card > .content p {
  184. margin: 0em 0em @paragraphDistance;
  185. }
  186. .ui.cards > .card > .content p:last-child,
  187. .ui.card > .content p:last-child {
  188. margin-bottom: 0em;
  189. }
  190. /*--------------
  191. Meta
  192. ---------------*/
  193. .ui.cards > .card .meta,
  194. .ui.card .meta {
  195. font-size: @metaFontSize;
  196. color: @metaColor;
  197. }
  198. .ui.cards > .card .meta *,
  199. .ui.card .meta * {
  200. margin-right: @metaSpacing;
  201. }
  202. .ui.cards > .card .meta :last-child,
  203. .ui.card .meta :last-child {
  204. margin-right: 0em;
  205. }
  206. .ui.cards > .card .meta .right.floated,
  207. .ui.card .meta .right.floated {
  208. margin-right: 0em;
  209. margin-left: @metaSpacing;
  210. }
  211. /*--------------
  212. Links
  213. ---------------*/
  214. /* Generic */
  215. .ui.cards > .card > .content a,
  216. .ui.card > .content a {
  217. color: @contentLinkColor;
  218. transition: @contentLinkTransition;
  219. }
  220. .ui.cards > .card > .content a:hover,
  221. .ui.card > .content a:hover {
  222. color: @contentLinkHoverColor;
  223. }
  224. /* Header */
  225. .ui.cards > .card > .content > a.header,
  226. .ui.card > .content > a.header {
  227. color: @headerLinkColor;
  228. }
  229. .ui.cards > .card > .content > a.header:hover,
  230. .ui.card > .content > a.header:hover {
  231. color: @headerLinkHoverColor;
  232. }
  233. /* Meta */
  234. .ui.cards > .card .meta a,
  235. .ui.card .meta a {
  236. color: @metaLinkColor;
  237. }
  238. .ui.cards > .card .meta a:hover,
  239. .ui.card .meta a:hover {
  240. color: @metaLinkHoverColor;
  241. }
  242. /*--------------
  243. Labels
  244. ---------------*/
  245. /*-----Star----- */
  246. /* Icon */
  247. .ui.cards > .card > .content .star.icon,
  248. .ui.card > .content .star.icon {
  249. cursor: pointer;
  250. opacity: @actionOpacity;
  251. transition: @actionTransition;
  252. }
  253. .ui.cards > .card > .content .star.icon:hover,
  254. .ui.card > .content .star.icon:hover {
  255. opacity: @actionHoverOpacity;
  256. color: @starColor;
  257. }
  258. .ui.cards > .card > .content .active.star.icon,
  259. .ui.card > .content .active.star.icon {
  260. color: @starActiveColor;
  261. }
  262. /*-----Like----- */
  263. /* Icon */
  264. .ui.cards > .card > .content .like.icon,
  265. .ui.card > .content .like.icon {
  266. cursor: pointer;
  267. opacity: @actionOpacity;
  268. transition: @actionTransition;
  269. }
  270. .ui.cards > .card > .content .like.icon:hover,
  271. .ui.card > .content .like.icon:hover {
  272. opacity: @actionHoverOpacity;
  273. color: @likeColor;
  274. }
  275. .ui.cards > .card > .content .active.like.icon,
  276. .ui.card > .content .active.like.icon {
  277. color: @likeActiveColor;
  278. }
  279. /*----------------
  280. Extra Content
  281. -----------------*/
  282. .ui.cards > .card > .extra,
  283. .ui.card > .extra {
  284. min-height: 0px !important;
  285. position: @extraPosition;
  286. background: @extraBackground;
  287. width: @extraWidth;
  288. padding: @extraPadding;
  289. top: @extraTop;
  290. left: @extraLeft;
  291. color: @extraColor;
  292. box-shadow: @extraBoxShadow;
  293. transition: @extraTransition;
  294. border-top: @extraDivider;
  295. }
  296. .ui.cards > .card > .extra a,
  297. .ui.card > .extra a {
  298. color: @extraLinkColor;
  299. }
  300. .ui.cards > .card > .extra a:hover,
  301. .ui.card > .extra a:hover {
  302. color: @extraLinkHoverColor;
  303. }
  304. /*******************************
  305. Variations
  306. *******************************/
  307. /*-------------------
  308. Link
  309. --------------------*/
  310. .ui.cards a.card:hover,
  311. .ui.link.cards .card:hover,
  312. a.ui.card:hover,
  313. .ui.link.card:hover {
  314. cursor: pointer;
  315. z-index: @linkHoverZIndex;
  316. background: @linkHoverBackground;
  317. border: @linkHoverBorder;
  318. box-shadow: @linkHoverBoxShadow;
  319. }
  320. /*--------------
  321. Card Count
  322. ---------------*/
  323. .ui.one.cards {
  324. margin-left: @oneCardOffset;
  325. margin-right: @oneCardOffset;
  326. }
  327. .ui.one.cards > .card {
  328. width: @oneCard;
  329. }
  330. .ui.two.cards {
  331. margin-left: @twoCardOffset;
  332. margin-right: @twoCardOffset;
  333. }
  334. .ui.two.cards > .card {
  335. width: @twoCard;
  336. margin-left: @twoCardSpacing;
  337. margin-right: @twoCardSpacing;
  338. }
  339. .ui.two.cards > .card:nth-child(2n+1) {
  340. clear: left;
  341. }
  342. .ui.three.cards {
  343. margin-left: @threeCardOffset;
  344. margin-right: @threeCardOffset;
  345. }
  346. .ui.three.cards > .card {
  347. width: @threeCard;
  348. margin-left: @threeCardSpacing;
  349. margin-right: @threeCardSpacing;
  350. }
  351. .ui.three.cards > .card:nth-child(3n+1) {
  352. clear: left;
  353. }
  354. .ui.four.cards {
  355. margin-left: @fourCardOffset;
  356. margin-right: @fourCardOffset;
  357. }
  358. .ui.four.cards > .card {
  359. width: @fourCard;
  360. margin-left: @fourCardSpacing;
  361. margin-right: @fourCardSpacing;
  362. }
  363. .ui.four.cards > .card:nth-child(4n+1) {
  364. clear: left;
  365. }
  366. .ui.five.cards {
  367. margin-left: @fiveCardOffset;
  368. margin-right: @fiveCardOffset;
  369. }
  370. .ui.five.cards > .card {
  371. width: @fiveCard;
  372. margin-left: @fiveCardSpacing;
  373. margin-right: @fiveCardSpacing;
  374. }
  375. .ui.five.cards > .card:nth-child(5n+1) {
  376. clear: left;
  377. }
  378. .ui.six.cards {
  379. margin-left: @sixCardOffset;
  380. margin-right: @sixCardOffset;
  381. }
  382. .ui.six.cards > .card {
  383. width: @sixCard;
  384. margin-left: @sixCardSpacing;
  385. margin-right: @sixCardSpacing;
  386. }
  387. .ui.six.cards > .card:nth-child(6n+1) {
  388. clear: left;
  389. }
  390. .ui.seven.cards {
  391. margin-left: @sevenCardOffset;
  392. margin-right: @sevenCardOffset;
  393. }
  394. .ui.seven.cards > .card {
  395. width: @sevenCard;
  396. margin-left: @sevenCardSpacing;
  397. margin-right: @sevenCardSpacing;
  398. }
  399. .ui.seven.cards > .card:nth-child(7n+1) {
  400. clear: left;
  401. }
  402. .ui.eight.cards {
  403. margin-left: @eightCardOffset;
  404. margin-right: @eightCardOffset;
  405. }
  406. .ui.eight.cards > .card {
  407. width: @eightCard;
  408. margin-left: @eightCardSpacing;
  409. margin-right: @eightCardSpacing;
  410. font-size: 11px;
  411. }
  412. .ui.eight.cards > .card:nth-child(8n+1) {
  413. clear: left;
  414. }
  415. .ui.nine.cards {
  416. margin-left: @nineCardOffset;
  417. margin-right: @nineCardOffset;
  418. }
  419. .ui.nine.cards > .card {
  420. width: @nineCard;
  421. margin-left: @nineCardSpacing;
  422. margin-right: @nineCardSpacing;
  423. font-size: 10px;
  424. }
  425. .ui.nine.cards > .card:nth-child(9n+1) {
  426. clear: left;
  427. }
  428. .ui.ten.cards {
  429. margin-left: @tenCardOffset;
  430. margin-right: @tenCardOffset;
  431. }
  432. .ui.ten.cards > .card {
  433. width: @tenCard;
  434. margin-left: @tenCardSpacing;
  435. margin-right: @tenCardSpacing;
  436. }
  437. .ui.ten.cards > .card:nth-child(10n+1) {
  438. clear: left;
  439. }
  440. /*-------------------
  441. Doubling
  442. --------------------*/
  443. /* Mobily Only */
  444. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  445. .ui.two.doubling.cards {
  446. margin-left: @oneCardOffset;
  447. margin-right: @oneCardOffset;
  448. }
  449. .ui.two.doubling.cards .card {
  450. width: @oneCard;
  451. margin-left: @oneCardSpacing;
  452. margin-right: @oneCardSpacing;
  453. }
  454. .ui.three.doubling.cards {
  455. margin-left: @twoCardOffset;
  456. margin-right: @twoCardOffset;
  457. }
  458. .ui.three.doubling.cards .card {
  459. width: @twoCard;
  460. margin-left: @twoCardSpacing;
  461. margin-right: @twoCardSpacing;
  462. }
  463. .ui.four.doubling.cards {
  464. margin-left: @twoCardOffset;
  465. margin-right: @twoCardOffset;
  466. }
  467. .ui.four.doubling.cards .card {
  468. width: @twoCard;
  469. margin-left: @twoCardSpacing;
  470. margin-right: @twoCardSpacing;
  471. }
  472. .ui.five.doubling.cards {
  473. margin-left: @twoCardOffset;
  474. margin-right: @twoCardOffset;
  475. }
  476. .ui.five.doubling.cards .card {
  477. width: @twoCard;
  478. margin-left: @twoCardSpacing;
  479. margin-right: @twoCardSpacing;
  480. }
  481. .ui.six.doubling.cards {
  482. margin-left: @twoCardOffset;
  483. margin-right: @twoCardOffset;
  484. }
  485. .ui.six.doubling.cards .card {
  486. width: @twoCard;
  487. margin-left: @twoCardSpacing;
  488. margin-right: @twoCardSpacing;
  489. }
  490. .ui.seven.doubling.cards {
  491. margin-left: @threeCardOffset;
  492. margin-right: @threeCardOffset;
  493. }
  494. .ui.seven.doubling.cards .card {
  495. width: @threeCard;
  496. margin-left: @threeCardSpacing;
  497. margin-right: @threeCardSpacing;
  498. }
  499. .ui.eight.doubling.cards {
  500. margin-left: @threeCardOffset;
  501. margin-right: @threeCardOffset;
  502. }
  503. .ui.eight.doubling.cards .card {
  504. width: @threeCard;
  505. margin-left: @threeCardSpacing;
  506. margin-right: @threeCardSpacing;
  507. }
  508. .ui.nine.doubling.cards {
  509. margin-left: @threeCardOffset;
  510. margin-right: @threeCardOffset;
  511. }
  512. .ui.nine.doubling.cards .card {
  513. width: @threeCard;
  514. margin-left: @threeCardSpacing;
  515. margin-right: @threeCardSpacing;
  516. }
  517. .ui.ten.doubling.cards {
  518. margin-left: @threeCardOffset;
  519. margin-right: @threeCardOffset;
  520. }
  521. .ui.ten.doubling.cards .card {
  522. width: @threeCard;
  523. margin-left: @threeCardSpacing;
  524. margin-right: @threeCardSpacing;
  525. }
  526. }
  527. /* Tablet Only */
  528. @media only screen and (min-width : @tabletBreakpoint) and (max-width : (@computerBreakpoint - 1px)) {
  529. .ui.two.doubling.cards {
  530. margin-left: @oneCardOffset;
  531. margin-right: @oneCardOffset;
  532. }
  533. .ui.two.doubling.cards .card {
  534. width: @oneCard;
  535. margin-left: @oneCardSpacing;
  536. margin-right: @oneCardSpacing;
  537. }
  538. .ui.three.doubling.cards {
  539. margin-left: @twoCardOffset;
  540. margin-right: @twoCardOffset;
  541. }
  542. .ui.three.doubling.cards .card {
  543. width: @twoCard;
  544. margin-left: @twoCardSpacing;
  545. margin-right: @twoCardSpacing;
  546. }
  547. .ui.four.doubling.cards {
  548. margin-left: @twoCardOffset;
  549. margin-right: @twoCardOffset;
  550. }
  551. .ui.four.doubling.cards .card {
  552. width: @twoCard;
  553. margin-left: @twoCardSpacing;
  554. margin-right: @twoCardSpacing;
  555. }
  556. .ui.five.doubling.cards {
  557. margin-left: @threeCardOffset;
  558. margin-right: @threeCardOffset;
  559. }
  560. .ui.five.doubling.cards .card {
  561. width: @threeCard;
  562. margin-left: @threeCardSpacing;
  563. margin-right: @threeCardSpacing;
  564. }
  565. .ui.six.doubling.cards {
  566. margin-left: @threeCardOffset;
  567. margin-right: @threeCardOffset;
  568. }
  569. .ui.six.doubling.cards .card {
  570. width: @threeCard;
  571. margin-left: @threeCardSpacing;
  572. margin-right: @threeCardSpacing;
  573. }
  574. .ui.eight.doubling.cards {
  575. margin-left: @threeCardOffset;
  576. margin-right: @threeCardOffset;
  577. }
  578. .ui.eight.doubling.cards .card {
  579. width: @threeCard;
  580. margin-left: @threeCardSpacing;
  581. margin-right: @threeCardSpacing;
  582. }
  583. .ui.eight.doubling.cards {
  584. margin-left: @fourCardOffset;
  585. margin-right: @fourCardOffset;
  586. }
  587. .ui.eight.doubling.cards .card {
  588. width: @fourCard;
  589. margin-left: @fourCardSpacing;
  590. margin-right: @fourCardSpacing;
  591. }
  592. .ui.nine.doubling.cards {
  593. margin-left: @fourCardOffset;
  594. margin-right: @fourCardOffset;
  595. }
  596. .ui.nine.doubling.cards .card {
  597. width: @fourCard;
  598. margin-left: @fourCardSpacing;
  599. margin-right: @fourCardSpacing;
  600. }
  601. .ui.ten.doubling.cards {
  602. margin-left: @fiveCardOffset;
  603. margin-right: @fiveCardOffset;
  604. }
  605. .ui.ten.doubling.cards .card {
  606. width: @fiveCard;
  607. margin-left: @fiveCardSpacing;
  608. margin-right: @fiveCardSpacing;
  609. }
  610. }
  611. /*-------------------
  612. Stackable
  613. --------------------*/
  614. @media only screen and (max-width : @tabletBreakpoint) {
  615. .ui.stackable.cards {
  616. display: block !important;
  617. }
  618. .ui.stackable.cards > .card {
  619. display: block !important;
  620. height: auto !important;
  621. margin: @stackableRowSpacing @stackableCardSpacing;
  622. padding: 0 !important;
  623. width: @stackableMargin !important;
  624. }
  625. }
  626. /*--------------
  627. Size
  628. ---------------*/
  629. .ui.cards > .card {
  630. font-size: @medium;
  631. }
  632. .loadUIOverrides();