| 1 |
@use 'sass:color'; |
| 2 |
@use '../common/theme'; |
| 3 |
@use '../common/banners'; |
| 4 |
|
| 5 |
.cloud-search-form { |
| 6 |
display: flex; |
| 7 |
gap: 8px; |
| 8 |
margin-block: 31px 47px; |
| 9 |
block-size: 54px; |
| 10 |
|
| 11 |
> select { |
| 12 |
flex: 0 0 250px; |
| 13 |
} |
| 14 |
|
| 15 |
.button { |
| 16 |
flex: 0 0 165px; |
| 17 |
} |
| 18 |
|
| 19 |
.cloud-search-submit { |
| 20 |
display: inline-flex; |
| 21 |
align-items: center; |
| 22 |
justify-content: center; |
| 23 |
|
| 24 |
.components-spinner { |
| 25 |
margin: 0; |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
.cloud-search-query { |
| 30 |
flex: 1; |
| 31 |
position: relative; |
| 32 |
|
| 33 |
input { |
| 34 |
inline-size: 100%; |
| 35 |
block-size: 100%; |
| 36 |
} |
| 37 |
|
| 38 |
> .components-spinner { |
| 39 |
position: absolute; |
| 40 |
inset-inline-end: 1.5em; |
| 41 |
inset-block-start: 25%; |
| 42 |
} |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
.cloud-search { |
| 47 |
@include banners.banners; |
| 48 |
|
| 49 |
.banner { |
| 50 |
justify-content: center; |
| 51 |
} |
| 52 |
|
| 53 |
.tablenav.top { |
| 54 |
display: flex; |
| 55 |
gap: 20px; |
| 56 |
block-size: 40px; |
| 57 |
margin-block-end: 31px; |
| 58 |
align-items: center; |
| 59 |
|
| 60 |
select { |
| 61 |
inline-size: 245px; |
| 62 |
block-size: 100%; |
| 63 |
} |
| 64 |
|
| 65 |
nav { |
| 66 |
margin-inline-start: auto; |
| 67 |
} |
| 68 |
|
| 69 |
.tablenav-pages { |
| 70 |
margin: 0; |
| 71 |
margin-inline-start: auto; |
| 72 |
} |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
.cloud-search-results { |
| 77 |
display: grid; |
| 78 |
grid-template-columns: repeat(auto-fill, minmax(580px, 1fr)); |
| 79 |
gap: 20px; |
| 80 |
margin: 0; |
| 81 |
} |
| 82 |
|
| 83 |
.cloud-search-result { |
| 84 |
background: #fff; |
| 85 |
border: 1px solid #c3c4c7; |
| 86 |
margin: 0; |
| 87 |
display: flex; |
| 88 |
flex-flow: column; |
| 89 |
box-sizing: border-box; |
| 90 |
|
| 91 |
a { |
| 92 |
text-decoration: none; |
| 93 |
color: #2271b1; |
| 94 |
} |
| 95 |
|
| 96 |
p:last-child { |
| 97 |
margin-block-end: 0; |
| 98 |
} |
| 99 |
|
| 100 |
.cloud-snippet { |
| 101 |
padding: 24px; |
| 102 |
|
| 103 |
.cloud-snippet-title-button { |
| 104 |
display: inline; |
| 105 |
margin: 0; |
| 106 |
padding: 0; |
| 107 |
border: none; |
| 108 |
background: none; |
| 109 |
font: inherit; |
| 110 |
color: #2271b1; |
| 111 |
cursor: pointer; |
| 112 |
text-align: start; |
| 113 |
text-decoration: underline; |
| 114 |
|
| 115 |
&:focus-visible { |
| 116 |
outline: 2px solid #2271b1; |
| 117 |
outline-offset: 2px; |
| 118 |
border-radius: 2px; |
| 119 |
} |
| 120 |
} |
| 121 |
} |
| 122 |
|
| 123 |
.cloud-snippet-meta { |
| 124 |
display: flex; |
| 125 |
gap: 16px; |
| 126 |
} |
| 127 |
|
| 128 |
$status-colors: ( |
| 129 |
public #64baba, |
| 130 |
private #cc96fb, |
| 131 |
unverified #ea835e, |
| 132 |
ai-verified #1cabcf, |
| 133 |
pro-verified #7cd68a, |
| 134 |
); |
| 135 |
|
| 136 |
.cloud-snippet-status { |
| 137 |
text-transform: uppercase; |
| 138 |
color: #646970; |
| 139 |
font-size: 12px; |
| 140 |
font-weight: 700; |
| 141 |
|
| 142 |
&::before { |
| 143 |
content: ''; |
| 144 |
block-size: 10px; |
| 145 |
inline-size: 10px; |
| 146 |
border-radius: 50%; |
| 147 |
display: inline-block; |
| 148 |
margin-inline-end: 8px; |
| 149 |
} |
| 150 |
} |
| 151 |
|
| 152 |
@each $status, $color in $status-colors { |
| 153 |
.cloud-snippet-status-#{$status}::before { |
| 154 |
background: $color; |
| 155 |
} |
| 156 |
} |
| 157 |
|
| 158 |
footer { |
| 159 |
display: flex; |
| 160 |
gap: 8px; |
| 161 |
background: #f6f7f7; |
| 162 |
margin-block-start: auto; |
| 163 |
border-block-start: 1px solid #c3c4c7; |
| 164 |
padding-inline: 24px; |
| 165 |
padding-block: 12px; |
| 166 |
align-items: center; |
| 167 |
|
| 168 |
.dashicons-warning { |
| 169 |
color: #b32d2e; |
| 170 |
} |
| 171 |
|
| 172 |
.cloud-snippet-status { |
| 173 |
margin-inline-end: auto; |
| 174 |
} |
| 175 |
} |
| 176 |
|
| 177 |
.cloud-snippet-votes { |
| 178 |
.dashicons { |
| 179 |
color: theme.$accent; |
| 180 |
padding-inline-end: 8px; |
| 181 |
} |
| 182 |
} |
| 183 |
} |
| 184 |
|
| 185 |
.cloud-search-results .cloud-search-result footer > .components-spinner { |
| 186 |
margin: 0; |
| 187 |
} |
| 188 |
|
| 189 |
// Anchored to the card container so this keeps its brand-orange fill above the WP-admin |
| 190 |
// compatibility layer's secondary-button styling (equal specificity, resolved by source order). |
| 191 |
.cloud-search-result .cloud-pro-button.button { |
| 192 |
background-color: theme.$secondary; |
| 193 |
border-color: theme.$secondary; |
| 194 |
color: #fff; |
| 195 |
|
| 196 |
&:hover, |
| 197 |
&:focus { |
| 198 |
background-color: color.adjust(theme.$secondary, $lightness: -10%); |
| 199 |
border-color: color.adjust(theme.$secondary, $lightness: -10%); |
| 200 |
color: #fff; |
| 201 |
} |
| 202 |
} |
| 203 |
|