| 1 |
@use 'sass:color'; |
| 2 |
@use 'common/theme'; |
| 3 |
@use 'common/badges'; |
| 4 |
@use 'common/toolbar'; |
| 5 |
@use 'common/wp-admin'; |
| 6 |
|
| 7 |
$breakpoint: 1060px; |
| 8 |
|
| 9 |
.code-snippets-welcome { |
| 10 |
h1 { |
| 11 |
font-size: 32px; |
| 12 |
font-weight: 510; |
| 13 |
line-height: 1.25; |
| 14 |
color: #2c3337; |
| 15 |
padding: 0; |
| 16 |
margin-block: 50px 1rem; |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
.code-snippets-updates { |
| 21 |
display: grid; |
| 22 |
grid-template-columns: 2fr 1fr; |
| 23 |
gap: 20px; |
| 24 |
|
| 25 |
> * { |
| 26 |
background: #fff; |
| 27 |
border-radius: 8px; |
| 28 |
padding: 32px; |
| 29 |
} |
| 30 |
|
| 31 |
.code-snippets-header-wrapper { |
| 32 |
display: flex; |
| 33 |
flex-flow: row; |
| 34 |
justify-content: space-between; |
| 35 |
align-items: center; |
| 36 |
border-block-end: 1px solid #e2e2e4; |
| 37 |
margin-block-end: 20px; |
| 38 |
padding-block-end: 20px; |
| 39 |
} |
| 40 |
|
| 41 |
h2 { |
| 42 |
font-size: 18px; |
| 43 |
margin: 0; |
| 44 |
} |
| 45 |
} |
| 46 |
|
| 47 |
.code-snippets-hero { |
| 48 |
display: flex; |
| 49 |
flex-flow: column; |
| 50 |
|
| 51 |
figure { |
| 52 |
margin: 1em 0 0; |
| 53 |
overflow: hidden; |
| 54 |
border-radius: 0.5rem; |
| 55 |
position: relative; |
| 56 |
block-size: auto; |
| 57 |
background: #efefef; |
| 58 |
flex: 1; |
| 59 |
text-align: center; |
| 60 |
|
| 61 |
img { |
| 62 |
inline-size: 100%; |
| 63 |
block-size: 100%; |
| 64 |
overflow: hidden; |
| 65 |
object-fit: cover; |
| 66 |
} |
| 67 |
} |
| 68 |
} |
| 69 |
|
| 70 |
.code-snippets-partners, |
| 71 |
.code-snippets-articles { |
| 72 |
display: flex; |
| 73 |
flex-direction: row; |
| 74 |
gap: 16px; |
| 75 |
margin: 0; |
| 76 |
|
| 77 |
figure { |
| 78 |
margin: 0; |
| 79 |
padding: 0; |
| 80 |
|
| 81 |
img { |
| 82 |
inline-size: 100%; |
| 83 |
block-size: 220px; |
| 84 |
overflow: hidden; |
| 85 |
object-fit: cover; |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
.code-snippets-card { |
| 91 |
flex: 1; |
| 92 |
background: #fff; |
| 93 |
border-radius: 8px; |
| 94 |
display: flex; |
| 95 |
margin: 0; |
| 96 |
flex-flow: column; |
| 97 |
color: #2c3337; |
| 98 |
|
| 99 |
figure img { |
| 100 |
border-start-start-radius: 8px; |
| 101 |
border-start-end-radius: 8px; |
| 102 |
} |
| 103 |
} |
| 104 |
|
| 105 |
.code-snippets-partners { |
| 106 |
.code-snippets-header-wrapper { |
| 107 |
display: flex; |
| 108 |
flex-direction: row; |
| 109 |
justify-content: space-between; |
| 110 |
align-items: center; |
| 111 |
padding: 24px; |
| 112 |
} |
| 113 |
} |
| 114 |
|
| 115 |
.code-snippets-articles { |
| 116 |
.code-snippets-header-wrapper { |
| 117 |
display: flex; |
| 118 |
flex-direction: column; |
| 119 |
align-items: flex-start; |
| 120 |
padding: 24px; |
| 121 |
gap: 14px; |
| 122 |
block-size: 100%; |
| 123 |
} |
| 124 |
|
| 125 |
.button { |
| 126 |
margin-block-start: auto; |
| 127 |
} |
| 128 |
|
| 129 |
h3 { |
| 130 |
font-size: 18px; |
| 131 |
margin: 0; |
| 132 |
} |
| 133 |
|
| 134 |
p { |
| 135 |
margin: 0; |
| 136 |
} |
| 137 |
|
| 138 |
.item-category { |
| 139 |
color: white; |
| 140 |
background: color.adjust(theme.$secondary, $lightness: -15%); |
| 141 |
display: block; |
| 142 |
font-size: 12px; |
| 143 |
letter-spacing: 1px; |
| 144 |
margin-block: 0; |
| 145 |
text-transform: uppercase; |
| 146 |
inline-size: fit-content; |
| 147 |
padding: 3px 10px; |
| 148 |
border-radius: 3px; |
| 149 |
font-weight: bold; |
| 150 |
} |
| 151 |
} |
| 152 |
|
| 153 |
.code-snippets-changelog-entries { |
| 154 |
font-size: 0.9rem; |
| 155 |
line-height: 1.5; |
| 156 |
overflow-y: scroll; |
| 157 |
max-block-size: 500px; |
| 158 |
color: #2c3337; |
| 159 |
padding-inline-end: 1em; |
| 160 |
|
| 161 |
h3 { |
| 162 |
font-size: 16px; |
| 163 |
display: flex; |
| 164 |
|
| 165 |
&:not(:first-of-type) { |
| 166 |
margin-block-start: 100px; |
| 167 |
} |
| 168 |
|
| 169 |
span { |
| 170 |
font-size: 14px; |
| 171 |
font-weight: normal; |
| 172 |
margin-inline-start: auto; |
| 173 |
} |
| 174 |
} |
| 175 |
|
| 176 |
h4 { |
| 177 |
font-size: 14px; |
| 178 |
margin: 1em 0; |
| 179 |
} |
| 180 |
|
| 181 |
ul { |
| 182 |
margin-block-start: 5px; |
| 183 |
} |
| 184 |
|
| 185 |
li { |
| 186 |
display: grid; |
| 187 |
grid-template-columns: 40px 1fr; |
| 188 |
grid-template-rows: 1fr; |
| 189 |
align-items: baseline; |
| 190 |
gap: 10px; |
| 191 |
} |
| 192 |
|
| 193 |
$icon-colors: ( |
| 194 |
lightbulb #f1c40f, |
| 195 |
chart-line #85144b, |
| 196 |
buddicons-replies #3d9970, |
| 197 |
remove #ffbf00, |
| 198 |
trash #c0c0c0, |
| 199 |
shield #0074d9, |
| 200 |
open-folder #5d2f27 |
| 201 |
); |
| 202 |
|
| 203 |
@each $icon, $color in $icon-colors { |
| 204 |
.dashicons-#{$icon} { |
| 205 |
color: $color; |
| 206 |
} |
| 207 |
} |
| 208 |
} |
| 209 |
|
| 210 |
.code-snippets-loading-spinner { |
| 211 |
block-size: 0; |
| 212 |
inline-size: 0; |
| 213 |
padding: 15px; |
| 214 |
border: 6px solid #e7c0b3; |
| 215 |
border-inline-end-color: theme.$secondary; |
| 216 |
border-radius: 22px; |
| 217 |
animation: loading-rotate 1s infinite linear; |
| 218 |
position: absolute; |
| 219 |
inset-inline-start: 47%; |
| 220 |
inset-block-start: 45%; |
| 221 |
|
| 222 |
@media (prefers-reduced-motion: reduce) { |
| 223 |
animation: none; |
| 224 |
} |
| 225 |
} |
| 226 |
|
| 227 |
.csp-welcome-header nav { |
| 228 |
column-gap: 15px; |
| 229 |
|
| 230 |
ul { |
| 231 |
display: flex; |
| 232 |
flex-flow: row wrap; |
| 233 |
justify-content: space-evenly; |
| 234 |
gap: 5px; |
| 235 |
margin: 0; |
| 236 |
} |
| 237 |
} |
| 238 |
|
| 239 |
@keyframes loading-rotate { |
| 240 |
100% { |
| 241 |
transform: rotate(calc(360deg * var(--cs-direction-multiplier))); |
| 242 |
} |
| 243 |
} |
| 244 |
|