microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
docs/docusaurus/src/components/Cards/styles.module.css
159lines · modecode
| 1 | .card { |
| 2 | display: block; |
| 3 | position: relative; |
| 4 | background: var(--ifm-card-background-color); |
| 5 | border: 1px solid transparent; |
| 6 | border-radius: 2px; |
| 7 | padding: 16px 0 0; |
| 8 | box-shadow: rgba(0, 0, 0, 0.13) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, 0.11) 0px 0.3px 0.9px 0px; |
| 9 | min-height: 100px; |
| 10 | } |
| 11 | |
| 12 | .card:hover .cardTitle { |
| 13 | text-decoration: underline; |
| 14 | } |
| 15 | |
| 16 | .iconCardLayout { |
| 17 | display: flex; |
| 18 | flex-direction: row; |
| 19 | align-items: flex-start; |
| 20 | gap: 1rem; |
| 21 | padding: 16px 16px 0; |
| 22 | margin: -16px 0 18px; |
| 23 | } |
| 24 | |
| 25 | .iconContainer { |
| 26 | flex: 0 0 64px; |
| 27 | width: 64px; |
| 28 | height: 64px; |
| 29 | color: var(--ms-learn-card-accent); |
| 30 | } |
| 31 | |
| 32 | .iconCardContent { |
| 33 | flex: 1; |
| 34 | min-width: 0; |
| 35 | } |
| 36 | |
| 37 | .supertitle { |
| 38 | display: block; |
| 39 | font-size: 12px; |
| 40 | text-transform: uppercase; |
| 41 | letter-spacing: 3.6px; |
| 42 | font-weight: 400; |
| 43 | color: inherit; |
| 44 | margin: 16px 0 0; |
| 45 | line-height: 12px; |
| 46 | } |
| 47 | |
| 48 | .cardTitle { |
| 49 | display: block; |
| 50 | margin: 0; |
| 51 | font-size: 16px; |
| 52 | font-weight: 600; |
| 53 | line-height: 20px; |
| 54 | color: var(--ifm-color-primary); |
| 55 | text-decoration: none; |
| 56 | } |
| 57 | |
| 58 | .cardTitle::after { |
| 59 | content: ''; |
| 60 | position: absolute; |
| 61 | inset: 0; |
| 62 | } |
| 63 | |
| 64 | .cardTitle:hover { |
| 65 | text-decoration: underline; |
| 66 | } |
| 67 | |
| 68 | .cardTitle:visited { |
| 69 | color: var(--ms-learn-visited-link); |
| 70 | } |
| 71 | |
| 72 | .cardDescription { |
| 73 | margin: 0; |
| 74 | font-size: 0.875rem; |
| 75 | color: var(--ms-learn-text-subtle); |
| 76 | } |
| 77 | |
| 78 | /* Box card variant */ |
| 79 | .boxCard { |
| 80 | background: var(--ifm-card-background-color); |
| 81 | border: 1px solid transparent; |
| 82 | border-radius: 0; |
| 83 | box-shadow: rgba(0, 0, 0, 0.13) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, 0.11) 0px 0.3px 0.9px 0px; |
| 84 | padding: 1.5rem; |
| 85 | } |
| 86 | |
| 87 | .boxCardIcon { |
| 88 | margin-bottom: 0.75rem; |
| 89 | } |
| 90 | |
| 91 | .boxCardIcon img { |
| 92 | width: 48px; |
| 93 | height: 48px; |
| 94 | display: block; |
| 95 | } |
| 96 | |
| 97 | .boxCardTitle { |
| 98 | margin: 0 0 0.75rem; |
| 99 | font-size: 18px; |
| 100 | font-weight: 600; |
| 101 | } |
| 102 | |
| 103 | .boxCardLinks { |
| 104 | list-style: none; |
| 105 | padding: 0; |
| 106 | margin: 0; |
| 107 | } |
| 108 | |
| 109 | .boxCardLinks li { |
| 110 | padding: 0.25rem 0; |
| 111 | } |
| 112 | |
| 113 | .boxCardLinks a { |
| 114 | color: var(--ifm-link-color); |
| 115 | font-size: 0.875rem; |
| 116 | } |
| 117 | |
| 118 | .boxCardLinks a:hover { |
| 119 | text-decoration: underline; |
| 120 | } |
| 121 | |
| 122 | /* Card grid */ |
| 123 | .cardGrid { |
| 124 | display: grid; |
| 125 | grid-template-columns: repeat(3, 1fr); |
| 126 | gap: 1.5rem; |
| 127 | } |
| 128 | |
| 129 | .cardGridTwo { |
| 130 | grid-template-columns: repeat(2, 1fr); |
| 131 | } |
| 132 | |
| 133 | .cardGridFour { |
| 134 | grid-template-columns: repeat(4, 1fr); |
| 135 | } |
| 136 | |
| 137 | @media (max-width: 996px) { |
| 138 | .cardGrid, |
| 139 | .cardGridFour { |
| 140 | grid-template-columns: repeat(2, 1fr); |
| 141 | } |
| 142 | .cardGridTwo { |
| 143 | grid-template-columns: repeat(2, 1fr); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | @media (max-width: 768px) { |
| 148 | .iconContainer { |
| 149 | display: none; |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | @media (max-width: 576px) { |
| 154 | .cardGrid, |
| 155 | .cardGridTwo, |
| 156 | .cardGridFour { |
| 157 | grid-template-columns: 1fr; |
| 158 | } |
| 159 | } |
| 160 | |