| 1 |
@use 'common/buttons'; |
| 2 |
@use 'common/theme'; |
| 3 |
@use 'common/checkbox'; |
| 4 |
@use 'common/codemirror'; |
| 5 |
@use 'common/subnav'; |
| 6 |
@use 'common/toolbar'; |
| 7 |
@use 'common/wp-admin'; |
| 8 |
@use 'common/page-header'; |
| 9 |
|
| 10 |
.wrap.code-snippets-settings { |
| 11 |
margin-block-start: 0; |
| 12 |
} |
| 13 |
|
| 14 |
.settings-section input[type='checkbox']='checkbox']:not(.switch) { |
| 15 |
@include checkbox.canonical; |
| 16 |
|
| 17 |
margin-inline-end: 8px; |
| 18 |
} |
| 19 |
|
| 20 |
p.submit { |
| 21 |
display: flex; |
| 22 |
justify-content: flex-start; |
| 23 |
gap: 14px; |
| 24 |
|
| 25 |
.button-secondary { |
| 26 |
background: transparent; |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
.settings-section .form-table th { |
| 31 |
inline-size: 261px; |
| 32 |
font-size: 14px; |
| 33 |
font-weight: 700; |
| 34 |
color: var(--cs-color-text); |
| 35 |
} |
| 36 |
|
| 37 |
.settings-section, |
| 38 |
p.submit { |
| 39 |
max-inline-size: 1020px; |
| 40 |
} |
| 41 |
|
| 42 |
.nav-tab-wrapper { |
| 43 |
margin-block-end: 1em; |
| 44 |
} |
| 45 |
|
| 46 |
input[type='number']='number'] { |
| 47 |
inline-size: 4em; |
| 48 |
} |
| 49 |
|
| 50 |
.CodeMirror { |
| 51 |
max-inline-size: 800px; |
| 52 |
inline-size: 100%; |
| 53 |
padding-inline-end: 1em; |
| 54 |
} |
| 55 |
|
| 56 |
.CodeMirror-sizer::before { |
| 57 |
content: '<?php'; |
| 58 |
} |
| 59 |
|
| 60 |
body.no-js { |
| 61 |
.nav-tab-wrapper { |
| 62 |
display: none; |
| 63 |
} |
| 64 |
|
| 65 |
.settings-section { |
| 66 |
display: block !important; |
| 67 |
} |
| 68 |
} |
| 69 |
|
| 70 |
body.js { |
| 71 |
.settings-section-title { |
| 72 |
border: 0; |
| 73 |
clip: rect(1px, 1px, 1px, 1px); |
| 74 |
clip-path: inset(50%); |
| 75 |
block-size: 1px; |
| 76 |
margin: -1px; |
| 77 |
overflow: hidden; |
| 78 |
padding: 0; |
| 79 |
position: absolute; |
| 80 |
inline-size: 1px; |
| 81 |
word-wrap: normal !important; |
| 82 |
} |
| 83 |
|
| 84 |
.nav-tab:not(.nav-tab-active) { |
| 85 |
cursor: pointer; |
| 86 |
} |
| 87 |
|
| 88 |
.settings-section { |
| 89 |
display: none; |
| 90 |
} |
| 91 |
|
| 92 |
.wrap[data-active-tab='general']='general'] .general-settings, |
| 93 |
.wrap[data-active-tab='editor']='editor'] .editor-settings, |
| 94 |
.wrap[data-active-tab='debug']='debug'] .debug-settings, |
| 95 |
.wrap[data-active-tab='version-switch']='version-switch'] .version-switch-settings, |
| 96 |
.wrap[data-active-tab='editing']='editing'] .editing-settings, |
| 97 |
.wrap[data-active-tab='running']='running'] .running-settings, |
| 98 |
.wrap[data-active-tab='insights']='insights'] .insights-settings, |
| 99 |
.wrap[data-active-tab='library']='library'] .library-settings, |
| 100 |
.wrap[data-active-tab='interface']='interface'] .interface-settings, |
| 101 |
.wrap[data-active-tab='advanced']='advanced'] .advanced-settings { |
| 102 |
display: block; |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
.license-status { |
| 107 |
display: inline-block; |
| 108 |
padding-inline-end: 2em; |
| 109 |
line-height: 2; |
| 110 |
color: var(--cs-color-text-muted); |
| 111 |
} |
| 112 |
|
| 113 |
.license-status-valid { |
| 114 |
color: var(--cs-color-success); |
| 115 |
} |
| 116 |
|
| 117 |
.license-status-expired { |
| 118 |
color: var(--cs-color-error); |
| 119 |
} |
| 120 |
|
| 121 |
.wrap[data-active-tab='license']='license'] .submit, |
| 122 |
.wrap[data-active-tab='account']='account'] .submit { |
| 123 |
display: none; |
| 124 |
} |
| 125 |
|
| 126 |
#code_snippets_remove_license { |
| 127 |
color: var(--cs-color-error); |
| 128 |
border-color: var(--cs-color-error); |
| 129 |
} |
| 130 |
|
| 131 |
#code_snippets_license_key { |
| 132 |
font-family: Consolas, Monaco, monospace; |
| 133 |
} |
| 134 |
|
| 135 |
#cloud_token { |
| 136 |
max-inline-size: 450px; |
| 137 |
inline-size: 90vw; |
| 138 |
} |
| 139 |
|
| 140 |
.cloud-message { |
| 141 |
inline-size: fit-content; |
| 142 |
padding: 5px; |
| 143 |
border-radius: 5px; |
| 144 |
font-weight: 600; |
| 145 |
} |
| 146 |
|
| 147 |
.cloud-error { |
| 148 |
background: var(--cs-color-error); |
| 149 |
color: #ffebee; |
| 150 |
} |
| 151 |
|
| 152 |
.cloud-success { |
| 153 |
background: var(--cs-color-success); |
| 154 |
color: #e8f5e9; |
| 155 |
} |
| 156 |
|
| 157 |
.refresh-success { |
| 158 |
background: #2e7d4f; |
| 159 |
color: #fff; |
| 160 |
} |
| 161 |
|
| 162 |
.cloud-settings tbody tr:nth-child(n+5) { |
| 163 |
display: none; |
| 164 |
} |
| 165 |
|
| 166 |
// Version Switch Styles |
| 167 |
.code-snippets-version-switch { |
| 168 |
.current-version { |
| 169 |
font-family: monospace; |
| 170 |
font-size: 1.1em; |
| 171 |
font-weight: bold; |
| 172 |
color: #0073aa; |
| 173 |
background: var(--cs-color-surface-info); |
| 174 |
padding: 2px 8px; |
| 175 |
border-radius: 5px; |
| 176 |
border: 1px solid var(--cs-color-border); |
| 177 |
} |
| 178 |
|
| 179 |
#target_version { |
| 180 |
min-inline-size: 200px; |
| 181 |
margin-inline-start: 8px; |
| 182 |
} |
| 183 |
|
| 184 |
#switch-version-btn { |
| 185 |
&[disabled]] { |
| 186 |
opacity: 0.6; |
| 187 |
cursor: not-allowed; |
| 188 |
background-color: var(--cs-color-surface-muted) !important; |
| 189 |
color: var(--cs-color-text-disabled) !important; |
| 190 |
border-color: var(--cs-color-border-subtle) !important; |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
// Warning box styling |
| 195 |
#version-switch-warning { |
| 196 |
margin-block-start: 20px !important; |
| 197 |
padding: 12px 16px; |
| 198 |
border-inline-start: 4px solid var(--cs-color-warning); |
| 199 |
background: var(--cs-color-surface-subtle); |
| 200 |
|
| 201 |
p { |
| 202 |
margin: 0; |
| 203 |
color: #8f6914; |
| 204 |
|
| 205 |
strong { |
| 206 |
color: #8f6914; |
| 207 |
} |
| 208 |
} |
| 209 |
} |
| 210 |
|
| 211 |
#version-switch-result { |
| 212 |
margin-block-start: 12px; |
| 213 |
|
| 214 |
&.notice { |
| 215 |
padding: 8px 12px; |
| 216 |
} |
| 217 |
} |
| 218 |
|
| 219 |
.notice { |
| 220 |
&.notice { |
| 221 |
&-success { |
| 222 |
border-inline-start-color: var(--cs-color-success); |
| 223 |
} |
| 224 |
|
| 225 |
&-error { |
| 226 |
border-inline-start-color: var(--cs-color-error); |
| 227 |
} |
| 228 |
|
| 229 |
&-warning { |
| 230 |
border-inline-start-color: var(--cs-color-warning); |
| 231 |
} |
| 232 |
|
| 233 |
&-info { |
| 234 |
border-inline-start-color: var(--cs-color-info); |
| 235 |
} |
| 236 |
} |
| 237 |
} |
| 238 |
} |
| 239 |
|
| 240 |
.version-switch-settings { |
| 241 |
.form-table { |
| 242 |
th { |
| 243 |
inline-size: 180px; |
| 244 |
} |
| 245 |
} |
| 246 |
} |
| 247 |
|
| 248 |
#settings-sections-tabs { |
| 249 |
margin: 0; |
| 250 |
padding: 0; |
| 251 |
|
| 252 |
ul { |
| 253 |
display: flex; |
| 254 |
align-items: stretch; |
| 255 |
margin: 0; |
| 256 |
padding: 0; |
| 257 |
list-style: none; |
| 258 |
} |
| 259 |
|
| 260 |
.snippet-type-link { |
| 261 |
display: flex; |
| 262 |
align-items: center; |
| 263 |
min-block-size: 52px; |
| 264 |
margin: 0; |
| 265 |
padding-inline: 24px; |
| 266 |
color: var(--cs-color-text-muted); |
| 267 |
font-size: 14px; |
| 268 |
font-weight: 600; |
| 269 |
line-height: 1.5; |
| 270 |
border: 0; |
| 271 |
border-inline-end: 1px solid var(--cs-color-border-subtle); |
| 272 |
background: transparent; |
| 273 |
|
| 274 |
&:hover, |
| 275 |
&:focus, |
| 276 |
&:active { |
| 277 |
color: var(--cs-color-accent); |
| 278 |
} |
| 279 |
|
| 280 |
&.active-type, |
| 281 |
&.active-type:hover, |
| 282 |
&.active-type:focus { |
| 283 |
color: var(--cs-color-accent); |
| 284 |
background: var(--cs-color-surface-muted); |
| 285 |
} |
| 286 |
} |
| 287 |
} |
| 288 |
|
| 289 |
@media (width <= 782px) { |
| 290 |
body.js { |
| 291 |
.settings-section-title { |
| 292 |
position: static; |
| 293 |
inline-size: auto; |
| 294 |
block-size: auto; |
| 295 |
margin: 0 0 16px; |
| 296 |
overflow: visible; |
| 297 |
clip: auto; |
| 298 |
clip-path: none; |
| 299 |
font-size: 20px; |
| 300 |
line-height: 1.3; |
| 301 |
} |
| 302 |
|
| 303 |
.settings-section { |
| 304 |
display: block !important; |
| 305 |
margin-block-end: 40px; |
| 306 |
} |
| 307 |
|
| 308 |
.wrap[data-active-tab='license']='license'] .submit { |
| 309 |
display: flex; |
| 310 |
} |
| 311 |
} |
| 312 |
} |
| 313 |
|
| 314 |
// Group headings inside a settings tab. Tabs are long enough that unbroken |
| 315 |
// rows are hard to scan, so related fields sit under a label. |
| 316 |
.settings-section .form-table .settings-group-heading th { |
| 317 |
inline-size: auto; |
| 318 |
padding-block: 26px 8px; |
| 319 |
border-block-end: 1px solid var(--cs-color-border-subtle); |
| 320 |
font-size: 15px; |
| 321 |
font-weight: 600; |
| 322 |
color: var(--cs-color-text); |
| 323 |
} |
| 324 |
|
| 325 |
.settings-section .form-table .settings-group-heading:first-child th { |
| 326 |
padding-block-start: 4px; |
| 327 |
} |
| 328 |
|