|
191 | 191 | /> |
192 | 192 | </div> |
193 | 193 | <div class="operate"> |
194 | | - <button on:click={copyResult} disabled={strCss === ''} id="copy" class="btn" |
| 194 | + <button on:click={copyResult} disabled={strCss === ''} class="copy" |
195 | 195 | >{btnCopyText}</button |
196 | 196 | > |
197 | | - <button on:click={preview} disabled={strCss === ''} class="btn" |
198 | | - >Preview</button |
199 | | - > |
| 197 | + <button on:click={preview} disabled={strCss === ''}>Preview</button> |
200 | 198 | <form action="https://codepen.io/pen/define" method="POST" target="_blank"> |
201 | | - <input type="hidden" name="data" value={dataForCodepen} /> |
| 199 | + <input type="hidden" name="data" value={JSON.stringify(dataForCodepen)} /> |
202 | 200 | <button |
203 | 201 | disabled={strCss === ''} |
204 | 202 | title="Send snippet to CodePen" |
205 | | - type="submit" |
206 | | - value="" |
207 | | - class="btn">CodePen</button |
| 203 | + type="submit">CodePen</button |
208 | 204 | > |
209 | 205 | </form> |
210 | 206 | </div> |
|
297 | 293 | resize: none; |
298 | 294 | overflow: auto; |
299 | 295 | } |
| 296 | + button { |
| 297 | + position: relative; |
| 298 | + font-size: 12px; |
| 299 | + display: block; |
| 300 | + margin-right: 10px; |
| 301 | + margin: 2px; |
| 302 | + height: 24px; |
| 303 | + border: 1px solid rgba(0, 0, 0, 0.2); |
| 304 | + border-radius: 4px; |
| 305 | + padding: 0px 12px; |
| 306 | + font-weight: 500; |
| 307 | + color: #1a73e8; |
| 308 | + background-color: #fff; |
| 309 | + flex: none; |
| 310 | + white-space: nowrap; |
| 311 | + height: 28px; |
| 312 | + margin: 8px 16px 8px 0; |
| 313 | + } |
300 | 314 | button[disabled] { |
301 | 315 | filter: grayscale(1) opacity(0.5); |
302 | 316 | } |
| 317 | + button:not([disabled]):hover { |
| 318 | + background-color: #f3f3f3; |
| 319 | + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); |
| 320 | + } |
| 321 | + button.plain { |
| 322 | + background: none; |
| 323 | + text-decoration: underline; |
| 324 | + cursor: pointer; |
| 325 | + padding: 0.3em 0.6em; |
| 326 | + border-radius: 4px; |
| 327 | + } |
| 328 | +
|
| 329 | + button.copy { |
| 330 | + background-color: #1a73e8; |
| 331 | + border: none; |
| 332 | + color: #fff; |
| 333 | + } |
| 334 | + button.copy:not([disabled]):hover { |
| 335 | + background-color: #3b86e8; |
| 336 | + } |
| 337 | +
|
303 | 338 | /* ::selection { |
304 | 339 | background: #cfe8fc; |
305 | 340 | } */ |
|
323 | 358 | .pop p { |
324 | 359 | margin: auto; |
325 | 360 | } |
326 | | - button.plain { |
327 | | - background: none; |
328 | | - text-decoration: underline; |
329 | | - cursor: pointer; |
330 | | - padding: 0.3em 0.6em; |
331 | | - border-radius: 4px; |
332 | | - } |
| 361 | +
|
333 | 362 | .pop .info { |
334 | 363 | padding-left: 10px; |
335 | 364 | } |
336 | 365 | .pop .info pre { |
337 | 366 | white-space: break-spaces; |
338 | 367 | } |
339 | | - .btn { |
340 | | - position: relative; |
341 | | - font-size: 12px; |
342 | | - display: block; |
343 | | - margin-right: 10px; |
344 | | - margin: 2px; |
345 | | - height: 24px; |
346 | | - border: 1px solid rgba(0, 0, 0, 0.2); |
347 | | - border-radius: 4px; |
348 | | - padding: 0px 12px; |
349 | | - font-weight: 500; |
350 | | - color: #1a73e8; |
351 | | - background-color: #fff; |
352 | | - flex: none; |
353 | | - white-space: nowrap; |
354 | | - height: 28px; |
355 | | - margin: 8px 16px 8px 0; |
356 | | - } |
357 | | - .btn:not([disabled]):hover { |
358 | | - background-color: #f3f3f3; |
359 | | - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); |
360 | | - } |
361 | 368 |
|
362 | 369 | form { |
363 | 370 | font-size: 12px; |
|
373 | 380 | margin-left: 10px; |
374 | 381 | flex-wrap: wrap; |
375 | 382 | } |
| 383 | +
|
376 | 384 | .theme-dark { |
377 | 385 | color: rgba(255, 255, 255, 0.87); |
378 | 386 | background-color: #242424; |
|
424 | 432 | .theme-dark .pop button.plain:not([disabled]):hover { |
425 | 433 | color: #cccccc; |
426 | 434 | } |
427 | | - #copy { |
428 | | - background-color: #1a73e8; |
429 | | - border: none; |
430 | | - color: #fff; |
431 | | - } |
432 | | - #copy:not([disabled]):hover { |
433 | | - background-color: #3b86e8; |
434 | | - } |
435 | | - .theme-dark #copy { |
| 435 | + .theme-dark button.copy { |
436 | 436 | background-color: #0e639c; |
437 | 437 | border: none; |
438 | 438 | color: #fff; |
439 | 439 | } |
440 | | - .theme-dark #copy:not([disabled]):hover { |
| 440 | + .theme-dark button.copy:not([disabled]):hover { |
441 | 441 | background-color: #1177bb; |
442 | 442 | } |
443 | 443 | </style> |
0 commit comments