UNPKG

scrivly

Version:

A powerful, feature-rich rich text editor for React with TypeScript support

2 lines 12.6 kB
:root{--bg-primary:#fff;--bg-secondary:#f8fafc;--bg-tertiary:#f1f5f9;--text-primary:#0f172a;--text-secondary:#64748b;--text-muted:#94a3b8;--border-color:#e2e8f0;--border-focus:#0ea5e9;--accent-primary:#0ea5e9;--accent-hover:#0284c7;--accent-light:#bae6fd;--shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--shadow-md:0 4px 6px -1px rgba(0,0,0,.1);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.1);--shadow-xl:0 20px 25px -5px rgba(0,0,0,.1)}[data-theme=dark]{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--border-color:#475569;--border-focus:#38bdf8;--accent-primary:#38bdf8;--accent-hover:#0ea5e9;--accent-light:#0c4a6e;--shadow-sm:0 1px 2px 0 rgba(0,0,0,.3);--shadow-md:0 4px 6px -1px rgba(0,0,0,.4);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.4);--shadow-xl:0 20px 25px -5px rgba(0,0,0,.4)}*{box-sizing:border-box;margin:0;padding:0}body{color:var(--text-primary);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1.6;transition:background-color .3s ease,color .3s ease}.app-container,body{background:var(--bg-primary)}.app-container{margin:0 auto;max-width:1200px;min-height:100vh;padding:2rem}.header{margin-bottom:2rem;padding:2rem 1rem;text-align:center}.header h1{color:var(--text-primary);font-size:2.5rem;font-weight:700;margin-bottom:.5rem}.header p{color:var(--text-secondary);font-size:1.1rem;margin:0 auto;max-width:600px}.editor-wrapper{margin-bottom:3rem}.editor-wrapper,.scrivly-editor{background:var(--bg-primary);border:1px solid var(--border-color)}.scrivly-editor{font-family:inherit}.scrivly-editor.fullscreen{bottom:0;left:0;margin:0;position:fixed;right:0;top:0;z-index:9999}.scrivly-toolbar{background:var(--bg-secondary);border-bottom:1px solid var(--border-color);display:flex;flex-wrap:wrap;gap:2px;padding:8px;position:sticky;top:0;z-index:100}.toolbar-group{align-items:center;border-right:1px solid var(--border-color);display:flex;gap:2px;margin-right:8px;padding-right:8px}.toolbar-group:last-child{border-right:none;margin-right:0;padding-right:0}.toolbar-button{align-items:center;background:transparent;border:none;border-radius:4px;color:var(--text-secondary);cursor:pointer;display:flex;height:36px;justify-content:center;position:relative;transition:all .2s ease;width:36px}.toolbar-button:hover:not(.disabled){background:var(--bg-tertiary);color:var(--accent-primary)}.toolbar-button.active{background:var(--accent-light);color:var(--accent-primary)}.toolbar-button.disabled{cursor:not-allowed;opacity:.4}.dropdown-container{position:relative}.dropdown-trigger{align-items:center;display:flex;gap:4px;justify-content:center;min-width:60px}.dropdown-menu{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;box-shadow:var(--shadow-md);left:0;margin-top:4px;max-height:300px;min-width:150px;overflow-y:auto;position:absolute;top:100%;z-index:1000}.dropdown-item{background:transparent;border:none;color:var(--text-primary);cursor:pointer;display:block;font-size:14px;padding:8px 12px;text-align:left;transition:all .2s ease;width:100%}.dropdown-item:hover{background:var(--bg-tertiary)}.dropdown-item.active{background:var(--accent-light);color:var(--accent-primary)}.scrivly-editor-container{background:var(--bg-primary);overflow-y:auto;position:relative}.scrivly-editor-content{background:var(--bg-primary);color:var(--text-primary);font-size:16px;line-height:1.6;min-height:300px;outline:none;padding:24px}.scrivly-editor-content:empty:before{color:var(--text-muted);content:attr(data-placeholder);font-style:italic;pointer-events:none}.scrivly-editor-footer{align-items:center;background:var(--bg-secondary);border-top:1px solid var(--border-color);display:flex;flex-wrap:wrap;font-size:14px;gap:12px;justify-content:space-between;padding:12px 16px}.scrivly-editor-stats{color:var(--text-muted);display:flex;font-size:13px;gap:20px}.table-controls{display:flex;gap:8px}.table-controls button{background:var(--bg-primary);border:none;border-radius:4px;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:4px 8px;transition:all .2s ease}.table-controls button:hover{background:var(--bg-tertiary);color:var(--accent-primary)}.scrivly-editor-content h1{color:var(--text-primary);font-size:2rem;font-weight:700;line-height:1.2;margin:1.5rem 0 1rem}.scrivly-editor-content h2{color:var(--text-primary);font-size:1.5rem;font-weight:600;line-height:1.3;margin:1.25rem 0 .75rem}.scrivly-editor-content h3{color:var(--text-primary);font-size:1.25rem;font-weight:600;line-height:1.4;margin:1rem 0 .5rem}.scrivly-editor-content p{margin-bottom:1rem}.scrivly-editor-content ol,.scrivly-editor-content ul{margin:1rem 0;padding-left:1.5rem}.scrivly-editor-content li{margin-bottom:.25rem}.scrivly-editor-content blockquote{background:var(--bg-secondary);border-left:3px solid var(--accent-primary);border-radius:0 4px 4px 0;color:var(--text-secondary);font-style:italic;margin:1.5rem 0;padding:1rem}.scrivly-editor-content code{background:var(--bg-tertiary);color:var(--accent-primary);font-size:.875em;padding:.2rem .4rem}.scrivly-editor-content code,.scrivly-editor-content pre{border-radius:4px;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}.scrivly-editor-content pre{background:var(--bg-secondary);color:var(--text-primary);font-size:.875rem;line-height:1.6;margin:1.5rem 0;overflow-x:auto;padding:1.5rem}.scrivly-editor-content pre code{background:none;color:inherit;font-size:inherit;padding:0}.scrivly-editor-content a{border-bottom:1px solid transparent;color:var(--accent-primary);text-decoration:none;transition:all .2s ease}.scrivly-editor-content a:hover{background:rgba(14,165,233,.1);border-bottom-color:var(--accent-primary);border-radius:2px;padding:2px 4px}.scrivly-editor-content img{border-radius:4px;height:auto;margin:1rem 0;max-width:100%}.scrivly-editor-content table{border-radius:4px}.scrivly-editor-content td,.scrivly-editor-content th{padding:8px}.image-container{border-radius:4px;display:inline-block;margin:1rem 0;min-height:100px;min-width:100px;overflow:hidden;position:relative;resize:both}.image-container .resize-handle{background:var(--accent-primary);border-radius:2px 0 0 0;bottom:0;cursor:se-resize;height:12px;position:absolute;right:0;width:12px}.video-container{border-radius:4px;margin:1rem 0;overflow:hidden;position:relative}.video-container .resize-handle{background:var(--accent-primary)!important;border-radius:2px 0 0 0}.scrivly-editor-content table{background:var(--bg-primary);border-collapse:collapse;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.1);margin:1rem 0;overflow:hidden;width:100%}.scrivly-editor-content td,.scrivly-editor-content th{border:1px solid var(--border-color);min-width:100px;padding:12px;text-align:left}.scrivly-editor-content th{background:var(--bg-tertiary);font-weight:600}.scrivly-editor-content td:focus,.scrivly-editor-content th:focus{outline:2px solid var(--accent-primary);outline-offset:-2px}.modal-overlay{align-items:center;background:rgba(0,0,0,.5);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:10000}.modal-content{max-height:80vh;max-width:500px;overflow-y:auto}.color-picker-modal,.modal-content{background:var(--bg-primary);border-radius:8px;box-shadow:var(--shadow-lg);width:90%}.color-picker-modal{max-width:300px}.emoji-picker-modal{max-height:500px;max-width:400px;overflow-y:auto}.emoji-picker-modal,.search-modal{background:var(--bg-primary);border-radius:8px;box-shadow:var(--shadow-lg);width:90%}.search-modal{max-height:80vh;max-width:500px;overflow:hidden;z-index:10000}.modal-header{align-items:center;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;padding:16px}.modal-header h3{color:var(--text-primary);font-size:1.1rem;font-weight:600;margin:0}.close-button{background:none;border:none;border-radius:4px;color:var(--text-secondary);cursor:pointer;padding:4px}.close-button:hover{background:var(--bg-tertiary);color:var(--text-primary)}.modal-body{padding:16px}.modal-footer{border-top:1px solid var(--border-color);display:flex;gap:8px;justify-content:flex-end;padding:16px}.form-group{margin-bottom:12px}.form-row{display:grid;gap:12px;grid-template-columns:1fr 1fr}.form-group label{display:block;font-weight:500;margin-bottom:4px}.form-group input,.form-group label{color:var(--text-primary);font-size:14px}.form-group input{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;padding:8px 10px;width:100%}.form-group input:focus{border-color:var(--accent-primary);box-shadow:0 0 0 3px rgba(14,165,233,.1);outline:none}.form-group input.error{border-color:#ef4444}.form-group small{color:var(--text-muted);display:block;font-size:12px;margin-top:4px}.button{align-items:center;background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;color:var(--text-primary);cursor:pointer;display:inline-flex;font-size:14px;font-weight:500;gap:6px;padding:8px 16px;transition:all .2s ease}.button:hover:not(:disabled){background:var(--bg-tertiary)}.button.primary,.button:hover:not(:disabled){border-color:var(--accent-primary);color:var(--accent-primary)}.button.primary{background:var(--accent-light)}.button.primary:hover:not(:disabled){background:var(--accent-primary);border-color:var(--accent-primary);color:var(--bg-primary)}.button.secondary{background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-primary)}.button.secondary:hover{background:var(--bg-tertiary);border-color:var(--accent-primary)}.button:disabled{cursor:not-allowed;opacity:.5}.color-grid{display:grid;gap:8px;grid-template-columns:repeat(6,1fr);padding:16px}.color-swatch{border:1px solid var(--border-color);border-radius:4px;cursor:pointer;height:32px;transition:all .2s ease;width:32px}.color-swatch:hover{border-color:var(--accent-primary);transform:scale(1.1)}.custom-color{align-items:center;border-top:1px solid var(--border-color);display:flex;gap:12px;padding:16px}.color-input{border:1px solid var(--border-color);border-radius:4px;cursor:pointer;height:32px;width:50px}.emoji-categories{padding:16px}.emoji-category{margin-bottom:20px}.emoji-category h4{color:var(--text-primary);font-size:14px;font-weight:600;margin-bottom:8px}.emoji-grid{display:grid;gap:4px;grid-template-columns:repeat(8,1fr)}.emoji-button{align-items:center;background:transparent;border:none;border-radius:4px;cursor:pointer;display:flex;font-size:18px;height:32px;justify-content:center;transition:all .2s ease;width:32px}.emoji-button:hover{background:var(--bg-tertiary);transform:scale(1.2)}.features-showcase{background:var(--bg-secondary);border-radius:8px;margin-top:2rem;padding:2rem}.features-showcase h2{color:var(--text-primary);font-size:1.5rem;margin-bottom:2rem;text-align:center}.feature-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.feature-card{background:var(--bg-primary);border-radius:6px;padding:1rem;position:relative}.feature-card h3{color:var(--text-primary);font-size:1.1rem;margin-bottom:.5rem}.feature-card p{color:var(--text-secondary);font-size:.9rem;line-height:1.5}@media (max-width:768px){.app-container{padding:1rem}.header h1{font-size:1.75rem}.scrivly-toolbar{gap:1px;padding:6px}.toolbar-button{height:32px;width:32px}.scrivly-editor-content{font-size:14px;padding:16px}.feature-grid,.form-row{grid-template-columns:1fr}.modal-content{margin:20px;width:calc(100% - 40px)}.color-grid{grid-template-columns:repeat(4,1fr)}.emoji-grid{grid-template-columns:repeat(6,1fr)}}@media (max-width:480px){.scrivly-toolbar{padding:5px}.toolbar-button{height:28px;width:28px}.scrivly-editor-content{padding:12px}.header{padding:1rem}.header h1{font-size:1.5rem}.features-showcase{padding:1.5rem}}::selection{background:rgba(14,165,233,.2)}.toolbar-button:focus-visible{outline:2px solid var(--accent-primary);outline-offset:2px}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}@media print{.features-showcase,.scrivly-editor-footer,.scrivly-toolbar{display:none!important}.scrivly-editor{border:none;box-shadow:none}.scrivly-editor-content{padding:0}}.scrivly-editor-content ::selection{background:rgba(14,165,233,.2);color:var(--text-primary)}.scrivly-editor-content mark{background:#fef08a;border-radius:2px;color:#333;padding:.1rem .2rem}.highlight-pulse{background-color:hsla(53,98%,77%,.8)} /*# sourceMappingURL=styles.css.map */