| 1 |
@use 'checkbox'; |
| 2 |
@use 'theme'; |
| 3 |
|
| 4 |
.code-snippets-cards { |
| 5 |
display: grid; |
| 6 |
grid-template-columns: repeat(auto-fill, minmax(580px, 1fr)); |
| 7 |
gap: 20px; |
| 8 |
margin: 0; |
| 9 |
} |
| 10 |
|
| 11 |
.code-snippets-card { |
| 12 |
background: #fff; |
| 13 |
border: 1px solid theme.$control-border; |
| 14 |
border-radius: 5px; |
| 15 |
margin: 0; |
| 16 |
display: flex; |
| 17 |
flex-flow: column; |
| 18 |
box-sizing: border-box; |
| 19 |
|
| 20 |
a { |
| 21 |
text-decoration: none; |
| 22 |
color: theme.$accent; |
| 23 |
} |
| 24 |
|
| 25 |
.card-inner { |
| 26 |
padding: 24px; |
| 27 |
} |
| 28 |
|
| 29 |
footer { |
| 30 |
display: flex; |
| 31 |
align-items: center; |
| 32 |
justify-content: space-between; |
| 33 |
gap: 8px; |
| 34 |
background: #f7f7f8; |
| 35 |
margin-block-start: auto; |
| 36 |
border-block-start: 1px solid theme.$control-border; |
| 37 |
padding-inline: 24px; |
| 38 |
padding-block: 12px; |
| 39 |
border-end-start-radius: 5px; |
| 40 |
border-end-end-radius: 5px; |
| 41 |
} |
| 42 |
|
| 43 |
// The status label shrinks and clips away under pressure rather than |
| 44 |
// pushing the action buttons onto a second line. |
| 45 |
.snippet-card-footer-status { |
| 46 |
display: flex; |
| 47 |
align-items: center; |
| 48 |
gap: 8px; |
| 49 |
flex: 0 1 auto; |
| 50 |
min-inline-size: 0; |
| 51 |
overflow: hidden; |
| 52 |
white-space: nowrap; |
| 53 |
} |
| 54 |
|
| 55 |
.snippet-card-footer-actions { |
| 56 |
display: flex; |
| 57 |
align-items: center; |
| 58 |
justify-content: flex-end; |
| 59 |
flex-wrap: nowrap; |
| 60 |
gap: 8px; |
| 61 |
flex: 0 0 auto; |
| 62 |
|
| 63 |
.button:not(.kebab-menu-trigger) { |
| 64 |
min-inline-size: 103px; |
| 65 |
text-align: center; |
| 66 |
justify-content: center; |
| 67 |
} |
| 68 |
} |
| 69 |
|
| 70 |
&.is-selectable { |
| 71 |
position: relative; |
| 72 |
} |
| 73 |
|
| 74 |
.snippet-card-corner { |
| 75 |
position: absolute; |
| 76 |
inset-block-start: 20px; |
| 77 |
inset-inline-end: 24px; |
| 78 |
display: flex; |
| 79 |
align-items: center; |
| 80 |
gap: 12px; |
| 81 |
|
| 82 |
.snippet-card-select { |
| 83 |
margin: 0; |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
input[type='checkbox']='checkbox'].snippet-card-select { |
| 88 |
@include checkbox.canonical; |
| 89 |
} |
| 90 |
|
| 91 |
&.is-selectable .card-inner > h3 { |
| 92 |
margin-inline-end: 48px; |
| 93 |
} |
| 94 |
|
| 95 |
&.is-selected { |
| 96 |
border-color: theme.$accent; |
| 97 |
box-shadow: 0 0 0 1px theme.$accent; |
| 98 |
} |
| 99 |
} |
| 100 |
|