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.

715 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
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 [class*="left floated"],
  147. .ui.card [class*="left floated"] {
  148. float: left;
  149. }
  150. .ui.cards > .card [class*="right floated"],
  151. .ui.card [class*="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 [class*="right floated"],
  207. .ui.card .meta [class*="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. Buttons
  244. ---------------*/
  245. .ui.cards > .card > .button:last-child,
  246. .ui.card > .button:last-child {
  247. margin-bottom: -@borderWidth;
  248. }
  249. /*--------------
  250. Labels
  251. ---------------*/
  252. /*-----Star----- */
  253. /* Icon */
  254. .ui.cards > .card > .content .star.icon,
  255. .ui.card > .content .star.icon {
  256. cursor: pointer;
  257. opacity: @actionOpacity;
  258. transition: @actionTransition;
  259. }
  260. .ui.cards > .card > .content .star.icon:hover,
  261. .ui.card > .content .star.icon:hover {
  262. opacity: @actionHoverOpacity;
  263. color: @starColor;
  264. }
  265. .ui.cards > .card > .content .active.star.icon,
  266. .ui.card > .content .active.star.icon {
  267. color: @starActiveColor;
  268. }
  269. /*-----Like----- */
  270. /* Icon */
  271. .ui.cards > .card > .content .like.icon,
  272. .ui.card > .content .like.icon {
  273. cursor: pointer;
  274. opacity: @actionOpacity;
  275. transition: @actionTransition;
  276. }
  277. .ui.cards > .card > .content .like.icon:hover,
  278. .ui.card > .content .like.icon:hover {
  279. opacity: @actionHoverOpacity;
  280. color: @likeColor;
  281. }
  282. .ui.cards > .card > .content .active.like.icon,
  283. .ui.card > .content .active.like.icon {
  284. color: @likeActiveColor;
  285. }
  286. /*----------------
  287. Extra Content
  288. -----------------*/
  289. .ui.cards > .card > .extra,
  290. .ui.card > .extra {
  291. min-height: 0px !important;
  292. position: @extraPosition;
  293. background: @extraBackground;
  294. width: @extraWidth;
  295. padding: @extraPadding;
  296. top: @extraTop;
  297. left: @extraLeft;
  298. color: @extraColor;
  299. box-shadow: @extraBoxShadow;
  300. transition: @extraTransition;
  301. border-top: @extraDivider;
  302. }
  303. .ui.cards > .card > .extra a,
  304. .ui.card > .extra a {
  305. color: @extraLinkColor;
  306. }
  307. .ui.cards > .card > .extra a:hover,
  308. .ui.card > .extra a:hover {
  309. color: @extraLinkHoverColor;
  310. }
  311. /*******************************
  312. Variations
  313. *******************************/
  314. /*-------------------
  315. Link
  316. --------------------*/
  317. .ui.cards a.card:hover,
  318. .ui.link.cards .card:hover,
  319. a.ui.card:hover,
  320. .ui.link.card:hover {
  321. cursor: pointer;
  322. z-index: @linkHoverZIndex;
  323. background: @linkHoverBackground;
  324. border: @linkHoverBorder;
  325. box-shadow: @linkHoverBoxShadow;
  326. }
  327. /*--------------
  328. Card Count
  329. ---------------*/
  330. .ui.one.cards {
  331. margin-left: @oneCardOffset;
  332. margin-right: @oneCardOffset;
  333. }
  334. .ui.one.cards > .card {
  335. width: @oneCard;
  336. }
  337. .ui.two.cards {
  338. margin-left: @twoCardOffset;
  339. margin-right: @twoCardOffset;
  340. }
  341. .ui.two.cards > .card {
  342. width: @twoCard;
  343. margin-left: @twoCardSpacing;
  344. margin-right: @twoCardSpacing;
  345. }
  346. .ui.two.cards > .card:nth-child(2n+1) {
  347. clear: left;
  348. }
  349. .ui.three.cards {
  350. margin-left: @threeCardOffset;
  351. margin-right: @threeCardOffset;
  352. }
  353. .ui.three.cards > .card {
  354. width: @threeCard;
  355. margin-left: @threeCardSpacing;
  356. margin-right: @threeCardSpacing;
  357. }
  358. .ui.three.cards > .card:nth-child(3n+1) {
  359. clear: left;
  360. }
  361. .ui.four.cards {
  362. margin-left: @fourCardOffset;
  363. margin-right: @fourCardOffset;
  364. }
  365. .ui.four.cards > .card {
  366. width: @fourCard;
  367. margin-left: @fourCardSpacing;
  368. margin-right: @fourCardSpacing;
  369. }
  370. .ui.four.cards > .card:nth-child(4n+1) {
  371. clear: left;
  372. }
  373. .ui.five.cards {
  374. margin-left: @fiveCardOffset;
  375. margin-right: @fiveCardOffset;
  376. }
  377. .ui.five.cards > .card {
  378. width: @fiveCard;
  379. margin-left: @fiveCardSpacing;
  380. margin-right: @fiveCardSpacing;
  381. }
  382. .ui.five.cards > .card:nth-child(5n+1) {
  383. clear: left;
  384. }
  385. .ui.six.cards {
  386. margin-left: @sixCardOffset;
  387. margin-right: @sixCardOffset;
  388. }
  389. .ui.six.cards > .card {
  390. width: @sixCard;
  391. margin-left: @sixCardSpacing;
  392. margin-right: @sixCardSpacing;
  393. }
  394. .ui.six.cards > .card:nth-child(6n+1) {
  395. clear: left;
  396. }
  397. .ui.seven.cards {
  398. margin-left: @sevenCardOffset;
  399. margin-right: @sevenCardOffset;
  400. }
  401. .ui.seven.cards > .card {
  402. width: @sevenCard;
  403. margin-left: @sevenCardSpacing;
  404. margin-right: @sevenCardSpacing;
  405. }
  406. .ui.seven.cards > .card:nth-child(7n+1) {
  407. clear: left;
  408. }
  409. .ui.eight.cards {
  410. margin-left: @eightCardOffset;
  411. margin-right: @eightCardOffset;
  412. }
  413. .ui.eight.cards > .card {
  414. width: @eightCard;
  415. margin-left: @eightCardSpacing;
  416. margin-right: @eightCardSpacing;
  417. font-size: 11px;
  418. }
  419. .ui.eight.cards > .card:nth-child(8n+1) {
  420. clear: left;
  421. }
  422. .ui.nine.cards {
  423. margin-left: @nineCardOffset;
  424. margin-right: @nineCardOffset;
  425. }
  426. .ui.nine.cards > .card {
  427. width: @nineCard;
  428. margin-left: @nineCardSpacing;
  429. margin-right: @nineCardSpacing;
  430. font-size: 10px;
  431. }
  432. .ui.nine.cards > .card:nth-child(9n+1) {
  433. clear: left;
  434. }
  435. .ui.ten.cards {
  436. margin-left: @tenCardOffset;
  437. margin-right: @tenCardOffset;
  438. }
  439. .ui.ten.cards > .card {
  440. width: @tenCard;
  441. margin-left: @tenCardSpacing;
  442. margin-right: @tenCardSpacing;
  443. }
  444. .ui.ten.cards > .card:nth-child(10n+1) {
  445. clear: left;
  446. }
  447. /*-------------------
  448. Doubling
  449. --------------------*/
  450. /* Mobily Only */
  451. @media only screen and (max-width : @largestMobileScreen) {
  452. .ui.two.doubling.cards {
  453. margin-left: @oneCardOffset;
  454. margin-right: @oneCardOffset;
  455. }
  456. .ui.two.doubling.cards .card {
  457. width: @oneCard;
  458. margin-left: @oneCardSpacing;
  459. margin-right: @oneCardSpacing;
  460. }
  461. .ui.three.doubling.cards {
  462. margin-left: @twoCardOffset;
  463. margin-right: @twoCardOffset;
  464. }
  465. .ui.three.doubling.cards .card {
  466. width: @twoCard;
  467. margin-left: @twoCardSpacing;
  468. margin-right: @twoCardSpacing;
  469. }
  470. .ui.four.doubling.cards {
  471. margin-left: @twoCardOffset;
  472. margin-right: @twoCardOffset;
  473. }
  474. .ui.four.doubling.cards .card {
  475. width: @twoCard;
  476. margin-left: @twoCardSpacing;
  477. margin-right: @twoCardSpacing;
  478. }
  479. .ui.five.doubling.cards {
  480. margin-left: @twoCardOffset;
  481. margin-right: @twoCardOffset;
  482. }
  483. .ui.five.doubling.cards .card {
  484. width: @twoCard;
  485. margin-left: @twoCardSpacing;
  486. margin-right: @twoCardSpacing;
  487. }
  488. .ui.six.doubling.cards {
  489. margin-left: @twoCardOffset;
  490. margin-right: @twoCardOffset;
  491. }
  492. .ui.six.doubling.cards .card {
  493. width: @twoCard;
  494. margin-left: @twoCardSpacing;
  495. margin-right: @twoCardSpacing;
  496. }
  497. .ui.seven.doubling.cards {
  498. margin-left: @threeCardOffset;
  499. margin-right: @threeCardOffset;
  500. }
  501. .ui.seven.doubling.cards .card {
  502. width: @threeCard;
  503. margin-left: @threeCardSpacing;
  504. margin-right: @threeCardSpacing;
  505. }
  506. .ui.eight.doubling.cards {
  507. margin-left: @threeCardOffset;
  508. margin-right: @threeCardOffset;
  509. }
  510. .ui.eight.doubling.cards .card {
  511. width: @threeCard;
  512. margin-left: @threeCardSpacing;
  513. margin-right: @threeCardSpacing;
  514. }
  515. .ui.nine.doubling.cards {
  516. margin-left: @threeCardOffset;
  517. margin-right: @threeCardOffset;
  518. }
  519. .ui.nine.doubling.cards .card {
  520. width: @threeCard;
  521. margin-left: @threeCardSpacing;
  522. margin-right: @threeCardSpacing;
  523. }
  524. .ui.ten.doubling.cards {
  525. margin-left: @threeCardOffset;
  526. margin-right: @threeCardOffset;
  527. }
  528. .ui.ten.doubling.cards .card {
  529. width: @threeCard;
  530. margin-left: @threeCardSpacing;
  531. margin-right: @threeCardSpacing;
  532. }
  533. }
  534. /* Tablet Only */
  535. @media only screen and (min-width : @tabletBreakpoint) and (max-width : @largestTabletScreen) {
  536. .ui.two.doubling.cards {
  537. margin-left: @oneCardOffset;
  538. margin-right: @oneCardOffset;
  539. }
  540. .ui.two.doubling.cards .card {
  541. width: @oneCard;
  542. margin-left: @oneCardSpacing;
  543. margin-right: @oneCardSpacing;
  544. }
  545. .ui.three.doubling.cards {
  546. margin-left: @twoCardOffset;
  547. margin-right: @twoCardOffset;
  548. }
  549. .ui.three.doubling.cards .card {
  550. width: @twoCard;
  551. margin-left: @twoCardSpacing;
  552. margin-right: @twoCardSpacing;
  553. }
  554. .ui.four.doubling.cards {
  555. margin-left: @twoCardOffset;
  556. margin-right: @twoCardOffset;
  557. }
  558. .ui.four.doubling.cards .card {
  559. width: @twoCard;
  560. margin-left: @twoCardSpacing;
  561. margin-right: @twoCardSpacing;
  562. }
  563. .ui.five.doubling.cards {
  564. margin-left: @threeCardOffset;
  565. margin-right: @threeCardOffset;
  566. }
  567. .ui.five.doubling.cards .card {
  568. width: @threeCard;
  569. margin-left: @threeCardSpacing;
  570. margin-right: @threeCardSpacing;
  571. }
  572. .ui.six.doubling.cards {
  573. margin-left: @threeCardOffset;
  574. margin-right: @threeCardOffset;
  575. }
  576. .ui.six.doubling.cards .card {
  577. width: @threeCard;
  578. margin-left: @threeCardSpacing;
  579. margin-right: @threeCardSpacing;
  580. }
  581. .ui.eight.doubling.cards {
  582. margin-left: @threeCardOffset;
  583. margin-right: @threeCardOffset;
  584. }
  585. .ui.eight.doubling.cards .card {
  586. width: @threeCard;
  587. margin-left: @threeCardSpacing;
  588. margin-right: @threeCardSpacing;
  589. }
  590. .ui.eight.doubling.cards {
  591. margin-left: @fourCardOffset;
  592. margin-right: @fourCardOffset;
  593. }
  594. .ui.eight.doubling.cards .card {
  595. width: @fourCard;
  596. margin-left: @fourCardSpacing;
  597. margin-right: @fourCardSpacing;
  598. }
  599. .ui.nine.doubling.cards {
  600. margin-left: @fourCardOffset;
  601. margin-right: @fourCardOffset;
  602. }
  603. .ui.nine.doubling.cards .card {
  604. width: @fourCard;
  605. margin-left: @fourCardSpacing;
  606. margin-right: @fourCardSpacing;
  607. }
  608. .ui.ten.doubling.cards {
  609. margin-left: @fiveCardOffset;
  610. margin-right: @fiveCardOffset;
  611. }
  612. .ui.ten.doubling.cards .card {
  613. width: @fiveCard;
  614. margin-left: @fiveCardSpacing;
  615. margin-right: @fiveCardSpacing;
  616. }
  617. }
  618. /*-------------------
  619. Stackable
  620. --------------------*/
  621. @media only screen and (max-width : @largestMobileScreen) {
  622. .ui.stackable.cards {
  623. display: block !important;
  624. }
  625. .ui.stackable.cards > .card {
  626. display: block !important;
  627. height: auto !important;
  628. margin: @stackableRowSpacing @stackableCardSpacing;
  629. padding: 0 !important;
  630. width: @stackableMargin !important;
  631. }
  632. }
  633. /*--------------
  634. Size
  635. ---------------*/
  636. .ui.cards > .card {
  637. font-size: @medium;
  638. }
  639. .loadUIOverrides();