monorepo/native/wordpress/maple-code-blocks/assets/css/block-editor.css

292 lines
5.5 KiB
CSS

/**
* GitHub Code Viewer Block Editor Styles
*/
/* Block Editor Wrapper */
.mcb-block-editor {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}
/* Block Preview */
.mcb-block-preview {
min-height: 200px;
transition: all 0.3s ease;
}
.mcb-block-preview:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Preview Header */
.mcb-preview-header {
display: flex;
align-items: center;
padding-bottom: 10px;
margin-bottom: 15px;
}
.mcb-preview-header svg {
flex-shrink: 0;
}
/* Preview Info Grid */
.mcb-preview-info {
display: flex;
flex-wrap: wrap;
gap: 15px;
font-size: 13px;
}
.mcb-preview-info > div {
padding: 5px 10px;
background: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.editor-styles-wrapper .mcb-block-preview.theme-dark .mcb-preview-info > div {
background: rgba(255, 255, 255, 0.1);
}
/* Inspector Controls Customization */
.mcb-height-control {
margin-bottom: 20px;
}
.mcb-height-control label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
/* Popular Repos Buttons */
.mcb-popular-repos {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-top: 10px;
}
/* Validation States */
.mcb-validation-success {
color: #00a32a;
display: flex;
align-items: center;
gap: 5px;
margin-top: 8px;
font-size: 13px;
}
.mcb-validation-error {
color: #cc1818;
display: flex;
align-items: center;
gap: 5px;
margin-top: 8px;
font-size: 13px;
}
/* Loading State */
.mcb-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
color: #666;
}
.mcb-loading .components-spinner {
margin-right: 10px;
}
/* Placeholder Styles */
.wp-block-maple-code-blocks-code-viewer .components-placeholder {
min-height: 200px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.wp-block-maple-code-blocks-code-viewer .components-placeholder .components-placeholder__label {
font-size: 18px;
margin-bottom: 10px;
}
.wp-block-maple-code-blocks-code-viewer .components-placeholder .components-placeholder__instructions {
font-size: 14px;
margin-bottom: 20px;
}
/* Quick Start Section */
.mcb-quick-start {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.mcb-quick-start strong {
display: block;
margin-bottom: 10px;
color: #fff;
}
.mcb-quick-start .components-button {
margin: 2px;
}
/* Block Alignment Support */
.wp-block-maple-code-blocks-code-viewer.alignwide {
max-width: 1280px;
margin-left: auto;
margin-right: auto;
}
.wp-block-maple-code-blocks-code-viewer.alignfull {
max-width: none;
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
width: 100vw;
}
/* Panel Body Customization */
.components-panel__body .mcb-repo-input {
margin-bottom: 15px;
}
.components-panel__body .mcb-theme-preview {
padding: 10px;
border-radius: 4px;
margin-top: 10px;
font-family: 'Monaco', 'Menlo', monospace;
font-size: 12px;
}
.components-panel__body .mcb-theme-preview.dark {
background: #1e1e1e;
color: #d4d4d4;
}
.components-panel__body .mcb-theme-preview.light {
background: #ffffff;
color: #333333;
border: 1px solid #e0e0e0;
}
/* External Link Style */
.components-external-link {
display: inline-flex;
align-items: center;
margin-top: 10px;
font-size: 13px;
}
/* Toolbar Buttons */
.block-editor-block-toolbar .mcb-toolbar-group {
border-right: 1px solid #e0e0e0;
padding-right: 6px;
margin-right: 6px;
}
/* Notice Improvements */
.components-notice.mcb-notice {
margin: 10px 0;
}
.components-notice.mcb-notice .components-notice__content {
display: flex;
align-items: center;
}
/* Selected State */
.wp-block-maple-code-blocks-code-viewer.is-selected .mcb-block-preview {
box-shadow: 0 0 0 1px #007cba;
}
/* Help Text */
.components-base-control__help {
font-size: 12px;
font-style: italic;
color: #757575;
margin-top: 5px;
}
/* File Selector */
.mcb-file-selector {
max-height: 200px;
overflow-y: auto;
border: 1px solid #e0e0e0;
border-radius: 4px;
padding: 5px;
margin-top: 10px;
}
.mcb-file-selector .mcb-file-option {
padding: 5px 10px;
cursor: pointer;
font-size: 13px;
font-family: monospace;
}
.mcb-file-selector .mcb-file-option:hover {
background: #f0f0f0;
}
.mcb-file-selector .mcb-file-option.selected {
background: #007cba;
color: white;
}
/* Responsive Design */
@media (max-width: 782px) {
.mcb-preview-info {
font-size: 12px;
}
.mcb-quick-start .components-button {
font-size: 12px;
padding: 4px 8px;
}
}
/* Dark Theme Support for Editor */
.editor-styles-wrapper .mcb-block-preview[data-theme="dark"] {
background: #1e1e1e;
color: #d4d4d4;
}
.editor-styles-wrapper .mcb-block-preview[data-theme="light"] {
background: #ffffff;
color: #333333;
}
/* Animation for validation */
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
.mcb-validating {
animation: pulse 1.5s infinite;
}
/* Custom scrollbar for file list */
.mcb-file-selector::-webkit-scrollbar {
width: 6px;
}
.mcb-file-selector::-webkit-scrollbar-track {
background: #f1f1f1;
}
.mcb-file-selector::-webkit-scrollbar-thumb {
background: #888;
border-radius: 3px;
}
.mcb-file-selector::-webkit-scrollbar-thumb:hover {
background: #555;
}