可动态识别属性
This commit is contained in:
@@ -1,58 +1,140 @@
|
||||
.editor-loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: var(--color-bg-base);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.editor-loading h2 {
|
||||
font-size: var(--font-size-lg);
|
||||
font-weight: var(--font-weight-medium);
|
||||
margin-top: var(--spacing-md);
|
||||
}
|
||||
|
||||
.editor-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
color: #cccccc;
|
||||
background-color: var(--color-bg-base);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.editor-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 16px;
|
||||
background-color: #2d2d2d;
|
||||
border-bottom: 1px solid #3e3e3e;
|
||||
gap: 16px;
|
||||
gap: var(--spacing-lg);
|
||||
height: var(--layout-header-height);
|
||||
padding: 0 var(--spacing-lg);
|
||||
background-color: var(--color-bg-elevated);
|
||||
border-bottom: 1px solid var(--color-border-default);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.editor-header h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
margin: 0;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.header-toolbar {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
padding: 6px 12px;
|
||||
background-color: #0e639c;
|
||||
color: #ffffff;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--spacing-xs);
|
||||
height: var(--size-button-sm);
|
||||
padding: 0 var(--spacing-md);
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-text-inverse);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-medium);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
transition: all var(--transition-fast);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.toolbar-btn:hover:not(:disabled) {
|
||||
background-color: #1177bb;
|
||||
background-color: var(--color-primary-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.toolbar-btn:active:not(:disabled) {
|
||||
background-color: var(--color-primary-active);
|
||||
transform: translateY(0);
|
||||
box-shadow: var(--shadow-inner);
|
||||
}
|
||||
|
||||
.toolbar-btn:disabled {
|
||||
background-color: #3c3c3c;
|
||||
color: #858585;
|
||||
background-color: var(--color-bg-input);
|
||||
color: var(--color-text-disabled);
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.toolbar-btn:focus-visible {
|
||||
outline: 2px solid var(--color-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.toolbar-btn svg {
|
||||
width: var(--size-icon-sm);
|
||||
height: var(--size-icon-sm);
|
||||
}
|
||||
|
||||
.locale-btn {
|
||||
width: var(--size-button-sm);
|
||||
padding: 0;
|
||||
background-color: var(--color-bg-overlay);
|
||||
color: var(--color-text-primary);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
.locale-btn:hover:not(:disabled) {
|
||||
background-color: var(--color-bg-hover);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.editor-header .status {
|
||||
font-size: 12px;
|
||||
color: #4ec9b0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-success);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.editor-header .status::before {
|
||||
content: '';
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background-color: var(--color-success);
|
||||
border-radius: var(--radius-full);
|
||||
animation: pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.editor-content {
|
||||
@@ -61,65 +143,40 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-left,
|
||||
.sidebar-right {
|
||||
height: 100%;
|
||||
background-color: #252526;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-left h3,
|
||||
.sidebar-right h3 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
color: #858585;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background-color: var(--color-bg-base);
|
||||
padding: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.viewport h3 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
color: #ffffff;
|
||||
font-size: var(--font-size-md);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
margin: 0 0 var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
.bottom-panel {
|
||||
height: 100%;
|
||||
background-color: #252526;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.bottom-panel h4 {
|
||||
font-size: 12px;
|
||||
margin-bottom: 8px;
|
||||
color: #ffffff;
|
||||
.viewport p {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-base);
|
||||
}
|
||||
|
||||
.editor-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 4px 16px;
|
||||
background-color: #007acc;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
height: var(--layout-footer-height);
|
||||
padding: 0 var(--spacing-lg);
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-text-inverse);
|
||||
font-size: var(--font-size-xs);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.editor-footer span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
.dock-top,
|
||||
.dock-bottom,
|
||||
.dock-center {
|
||||
background: #1e1e1e;
|
||||
background: var(--color-bg-base);
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -17,17 +17,17 @@
|
||||
}
|
||||
|
||||
.dock-left {
|
||||
border-right: 1px solid #3e3e3e;
|
||||
border-right: 1px solid var(--color-border-default);
|
||||
}
|
||||
|
||||
.dock-right {
|
||||
border-left: 1px solid #3e3e3e;
|
||||
border-left: 1px solid var(--color-border-default);
|
||||
}
|
||||
|
||||
.dock-top {
|
||||
border-bottom: 1px solid #3e3e3e;
|
||||
border-bottom: 1px solid var(--color-border-default);
|
||||
}
|
||||
|
||||
.dock-bottom {
|
||||
border-top: 1px solid #3e3e3e;
|
||||
border-top: 1px solid var(--color-border-default);
|
||||
}
|
||||
|
||||
@@ -2,171 +2,277 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
color: #cccccc;
|
||||
background-color: var(--color-bg-base);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.inspector-header {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
background-color: #252526;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
height: var(--layout-panel-header);
|
||||
padding: 0 var(--spacing-md);
|
||||
border-bottom: 1px solid var(--color-border-default);
|
||||
background-color: var(--color-bg-elevated);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.inspector-header-icon {
|
||||
color: var(--color-text-secondary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.inspector-header h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #cccccc;
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.inspector-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 12px;
|
||||
overflow-x: hidden;
|
||||
padding: var(--spacing-md);
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.inspector-section {
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.inspector-section:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #858585;
|
||||
gap: var(--spacing-sm);
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 8px;
|
||||
padding: 4px 0;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
padding-bottom: var(--spacing-xs);
|
||||
border-bottom: 1px solid var(--color-border-subtle);
|
||||
}
|
||||
|
||||
.section-icon {
|
||||
color: var(--color-text-tertiary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.section-header span {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.add-component-btn {
|
||||
background-color: #007acc;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background-color 0.2s;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-text-inverse);
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.add-component-btn:hover {
|
||||
background-color: #0098ff;
|
||||
background-color: var(--color-primary-hover);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.add-component-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.section-content {
|
||||
padding: 8px 0;
|
||||
padding: var(--spacing-sm) 0;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 6px 0;
|
||||
font-size: 13px;
|
||||
align-items: center;
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
font-size: var(--font-size-base);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: background-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.info-row:hover {
|
||||
background-color: var(--color-bg-hover);
|
||||
}
|
||||
|
||||
.info-label {
|
||||
color: #858585;
|
||||
font-weight: 500;
|
||||
color: var(--color-text-secondary);
|
||||
font-weight: var(--font-weight-medium);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.info-value {
|
||||
color: #cccccc;
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-family: var(--font-family-mono);
|
||||
}
|
||||
|
||||
.component-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
min-height: min-content;
|
||||
}
|
||||
|
||||
.component-item {
|
||||
margin-bottom: 8px;
|
||||
background-color: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-base) 100%);
|
||||
border: 1px solid var(--color-border-default);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: visible;
|
||||
transition: all var(--transition-base);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: min-content;
|
||||
}
|
||||
|
||||
.component-item:hover {
|
||||
border-color: #505050;
|
||||
border-color: var(--color-border-strong);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.component-item.expanded {
|
||||
background: var(--color-bg-overlay);
|
||||
box-shadow: var(--shadow-md);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.component-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
transition: background-color var(--transition-fast);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.component-header:hover {
|
||||
background-color: #2a2d2e;
|
||||
background-color: var(--color-bg-hover);
|
||||
}
|
||||
|
||||
.component-expand-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #858585;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
margin-right: 4px;
|
||||
transition: color 0.2s;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--color-text-secondary);
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.component-expand-btn:hover {
|
||||
color: #cccccc;
|
||||
color: var(--color-primary);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.component-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 14px;
|
||||
color: var(--color-text-secondary);
|
||||
flex-shrink: 0;
|
||||
transition: color var(--transition-fast);
|
||||
}
|
||||
|
||||
.component-item:hover .component-icon,
|
||||
.component-item.expanded .component-icon {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.component-name {
|
||||
flex: 1;
|
||||
color: #cccccc;
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
.remove-component-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #858585;
|
||||
font-size: 18px;
|
||||
line-height: 14px;
|
||||
color: var(--color-text-tertiary);
|
||||
padding: var(--spacing-xs);
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
transition: color 0.2s;
|
||||
margin-left: 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
flex-shrink: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.component-header:hover .remove-component-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.remove-component-btn:hover {
|
||||
color: #ff5555;
|
||||
background-color: var(--color-error);
|
||||
color: var(--color-text-inverse);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.remove-component-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.component-properties {
|
||||
border-top: 1px solid #3c3c3c;
|
||||
background-color: #1e1e1e;
|
||||
padding: 4px;
|
||||
border-top: 1px solid var(--color-border-default);
|
||||
background-color: var(--color-bg-base);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-4xl) var(--spacing-lg);
|
||||
text-align: center;
|
||||
color: #858585;
|
||||
font-size: 13px;
|
||||
color: var(--color-text-secondary);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
color: var(--color-text-tertiary);
|
||||
margin-bottom: var(--spacing-md);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.empty-hint {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
.empty-state-small {
|
||||
padding: var(--spacing-lg);
|
||||
text-align: center;
|
||||
color: var(--color-text-tertiary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -1,80 +1,385 @@
|
||||
.property-inspector {
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.property-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.property-field-checkbox {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
min-height: 24px;
|
||||
padding: 4px 8px;
|
||||
background: var(--color-bg-elevated);
|
||||
border-bottom: 1px solid var(--color-border-subtle);
|
||||
gap: 8px;
|
||||
transition: background-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.property-field:hover {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.property-field:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.property-label {
|
||||
font-size: 12px;
|
||||
flex: 0 0 40%;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #e0e0e0;
|
||||
margin-bottom: 4px;
|
||||
color: var(--color-text-secondary);
|
||||
margin: 0;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.property-field-checkbox .property-label {
|
||||
margin-bottom: 0;
|
||||
flex: 1;
|
||||
.property-label-draggable {
|
||||
cursor: ew-resize;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.property-label-draggable::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
background: var(--color-text-tertiary);
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.property-label-draggable:hover::before {
|
||||
opacity: 1;
|
||||
background: var(--color-primary);
|
||||
}
|
||||
|
||||
.property-input {
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #444;
|
||||
border-radius: 4px;
|
||||
padding: 6px 8px;
|
||||
color: #e0e0e0;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
flex: 1;
|
||||
background: var(--color-bg-inset);
|
||||
border: 1px solid var(--color-border-default);
|
||||
border-radius: 3px;
|
||||
padding: 3px 6px;
|
||||
color: var(--color-text-primary);
|
||||
font-size: 11px;
|
||||
font-family: var(--font-family-mono);
|
||||
min-width: 0;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.property-input:hover {
|
||||
border-color: var(--color-border-hover);
|
||||
background: var(--color-bg-base);
|
||||
}
|
||||
|
||||
.property-input:focus {
|
||||
outline: none;
|
||||
border-color: #4a9eff;
|
||||
background: #333;
|
||||
border-color: var(--color-primary);
|
||||
background: var(--color-bg-base);
|
||||
box-shadow: 0 0 0 1px var(--color-primary);
|
||||
}
|
||||
|
||||
.property-input:disabled {
|
||||
opacity: 0.5;
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
background: var(--color-bg-inset);
|
||||
}
|
||||
|
||||
.property-checkbox {
|
||||
width: 18px;
|
||||
.property-input-number,
|
||||
.property-input-text {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.property-input-select {
|
||||
cursor: pointer;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 6px center;
|
||||
padding-right: 24px;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
.property-input-select:hover {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.property-input-select:focus {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23007acc' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.property-input-select option {
|
||||
background-color: var(--color-bg-elevated);
|
||||
color: var(--color-text-primary);
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.property-input-number::-webkit-inner-spin-button {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.property-input-number:hover::-webkit-inner-spin-button {
|
||||
opacity: 0.5;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.property-field-boolean {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.property-toggle {
|
||||
position: relative;
|
||||
width: 36px;
|
||||
height: 18px;
|
||||
border-radius: 9px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-base);
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.property-checkbox:disabled {
|
||||
opacity: 0.5;
|
||||
.property-toggle-off {
|
||||
background: var(--color-bg-inset);
|
||||
border: 1px solid var(--color-border-default);
|
||||
}
|
||||
|
||||
.property-toggle-off:hover:not(:disabled) {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-color: var(--color-border-hover);
|
||||
}
|
||||
|
||||
.property-toggle-on {
|
||||
background: var(--color-primary);
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.property-toggle-on:hover:not(:disabled) {
|
||||
background: var(--color-primary-hover);
|
||||
border-color: var(--color-primary-hover);
|
||||
}
|
||||
|
||||
.property-toggle:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.property-color {
|
||||
height: 36px;
|
||||
padding: 2px;
|
||||
cursor: pointer;
|
||||
.property-toggle-thumb {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
transition: transform var(--transition-base);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.property-vector {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
.property-toggle-off .property-toggle-thumb {
|
||||
left: 2px;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.property-vector-input {
|
||||
.property-toggle-on .property-toggle-thumb {
|
||||
left: 2px;
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
.property-color-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
opacity: 1;
|
||||
.property-color-preview {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid var(--color-border-default);
|
||||
flex-shrink: 0;
|
||||
background-image:
|
||||
linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
|
||||
linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
|
||||
linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
|
||||
linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
|
||||
background-size: 8px 8px;
|
||||
background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
|
||||
cursor: pointer;
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
|
||||
.property-color-preview:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.property-input-color {
|
||||
width: 0;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.property-input-color-text {
|
||||
flex: 1;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-family: var(--font-family-mono);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.property-label-row {
|
||||
flex: 0 0 40%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.property-expand-btn {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--color-text-tertiary);
|
||||
cursor: pointer;
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.property-expand-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.property-vector-compact {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.property-vector-axis-compact {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.property-input-number-compact {
|
||||
flex: 1;
|
||||
min-width: 32px;
|
||||
text-align: center;
|
||||
padding: 2px 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.property-vector-expanded {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.property-vector-axis {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.property-vector-axis-label {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
letter-spacing: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.property-vector-axis-x {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
color: #f87171;
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
}
|
||||
|
||||
.property-vector-axis-y {
|
||||
background: rgba(34, 197, 94, 0.2);
|
||||
color: #4ade80;
|
||||
border: 1px solid rgba(34, 197, 94, 0.3);
|
||||
}
|
||||
|
||||
.property-vector-axis-z {
|
||||
background: rgba(59, 130, 246, 0.2);
|
||||
color: #60a5fa;
|
||||
border: 1px solid rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
.property-field:focus-within {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
@keyframes property-field-highlight {
|
||||
0% {
|
||||
background: rgba(0, 122, 204, 0.2);
|
||||
}
|
||||
100% {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.property-field.property-changed {
|
||||
animation: property-field-highlight 0.5s ease-out;
|
||||
}
|
||||
|
||||
input[type="number"].property-input {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
input[type="number"].property-input::-webkit-outer-spin-button,
|
||||
input[type="number"].property-input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.property-input::placeholder {
|
||||
color: var(--color-text-tertiary);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.property-input:hover::placeholder {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.property-input,
|
||||
.property-toggle,
|
||||
.property-toggle-thumb,
|
||||
.property-expand-btn,
|
||||
.property-color-preview {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,31 +19,35 @@
|
||||
}
|
||||
|
||||
.resizer {
|
||||
background: #252526;
|
||||
background: var(--color-bg-elevated);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
transition: background-color 0.2s ease;
|
||||
z-index: var(--z-index-base);
|
||||
transition: background-color var(--transition-fast);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.resizer:hover {
|
||||
background: #094771;
|
||||
background: var(--color-primary-subtle);
|
||||
}
|
||||
|
||||
.resizer:active {
|
||||
background: var(--color-primary);
|
||||
}
|
||||
|
||||
.resizer-horizontal {
|
||||
width: 4px;
|
||||
cursor: col-resize;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.resizer-vertical {
|
||||
height: 4px;
|
||||
cursor: row-resize;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.resizer-handle {
|
||||
position: absolute;
|
||||
background: transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.resizer-horizontal .resizer-handle {
|
||||
@@ -62,10 +66,6 @@
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.resizer:active {
|
||||
background: #0e6caa;
|
||||
}
|
||||
|
||||
body.resizing {
|
||||
cursor: col-resize !important;
|
||||
user-select: none !important;
|
||||
|
||||
@@ -2,34 +2,68 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
color: #cccccc;
|
||||
background-color: var(--color-bg-base);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.hierarchy-header {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
background-color: #252526;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
height: var(--layout-panel-header);
|
||||
padding: 0 var(--spacing-md);
|
||||
border-bottom: 1px solid var(--color-border-default);
|
||||
background-color: var(--color-bg-elevated);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.hierarchy-header-icon {
|
||||
color: var(--color-text-secondary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.hierarchy-header h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #cccccc;
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.hierarchy-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 8px 0;
|
||||
padding: var(--spacing-xs) 0;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-4xl) var(--spacing-lg);
|
||||
text-align: center;
|
||||
color: #858585;
|
||||
font-size: 13px;
|
||||
color: var(--color-text-secondary);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
color: var(--color-text-tertiary);
|
||||
margin-bottom: var(--spacing-md);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.empty-hint {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
.entity-list {
|
||||
@@ -41,30 +75,61 @@
|
||||
.entity-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background-color 0.1s;
|
||||
transition: all var(--transition-fast);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.entity-item::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 2px;
|
||||
background-color: transparent;
|
||||
transition: background-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.entity-item:hover {
|
||||
background-color: #2a2d2e;
|
||||
background-color: var(--color-bg-hover);
|
||||
}
|
||||
|
||||
.entity-item.selected {
|
||||
background-color: #094771;
|
||||
background-color: var(--color-selected);
|
||||
}
|
||||
|
||||
.entity-item.selected::before {
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.entity-item.selected:hover {
|
||||
background-color: #0e639c;
|
||||
background-color: var(--color-selected-hover);
|
||||
}
|
||||
|
||||
.entity-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 14px;
|
||||
color: var(--color-text-secondary);
|
||||
flex-shrink: 0;
|
||||
transition: color var(--transition-fast);
|
||||
}
|
||||
|
||||
.entity-item:hover .entity-icon,
|
||||
.entity-item.selected .entity-icon {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.entity-name {
|
||||
font-size: 13px;
|
||||
color: #cccccc;
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text-primary);
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.entity-item.selected .entity-name {
|
||||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: #1e1e1e;
|
||||
background: var(--color-bg-base);
|
||||
}
|
||||
|
||||
.tab-header {
|
||||
background: #252526;
|
||||
border-bottom: 1px solid #3e3e3e;
|
||||
min-height: 35px;
|
||||
background: var(--color-bg-elevated);
|
||||
border-bottom: 1px solid var(--color-border-default);
|
||||
min-height: 38px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tab-list {
|
||||
@@ -22,37 +23,42 @@
|
||||
.tab-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 12px;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
background: transparent;
|
||||
color: #969696;
|
||||
border-right: 1px solid #3e3e3e;
|
||||
color: var(--color-text-secondary);
|
||||
border-right: 1px solid var(--color-border-default);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
font-size: 13px;
|
||||
transition: all var(--transition-fast);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-medium);
|
||||
user-select: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-item::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background-color: transparent;
|
||||
transition: background-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
background: #2a2d2e;
|
||||
color: #cccccc;
|
||||
background: var(--color-bg-hover);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: #1e1e1e;
|
||||
color: #ffffff;
|
||||
border-bottom: 2px solid #007acc;
|
||||
background: var(--color-bg-base);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
background: #1e1e1e;
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.tab-title {
|
||||
@@ -60,25 +66,32 @@
|
||||
}
|
||||
|
||||
.tab-close {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #858585;
|
||||
color: var(--color-text-tertiary);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
transition: all 0.2s ease;
|
||||
transition: all var(--transition-fast);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tab-item:hover .tab-close,
|
||||
.tab-item.active .tab-close {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tab-close:hover {
|
||||
background: #4e4e4e;
|
||||
color: #ffffff;
|
||||
background: var(--color-bg-hover);
|
||||
color: var(--color-error);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
|
||||
122
packages/editor-app/src/styles/design-tokens.css
Normal file
122
packages/editor-app/src/styles/design-tokens.css
Normal file
@@ -0,0 +1,122 @@
|
||||
:root {
|
||||
/* 颜色系统 - 背景 */
|
||||
--color-bg-base: #1e1e1e;
|
||||
--color-bg-elevated: #252526;
|
||||
--color-bg-overlay: #2d2d2d;
|
||||
--color-bg-input: #3c3c3c;
|
||||
--color-bg-hover: #2a2d2e;
|
||||
--color-bg-active: #37373d;
|
||||
|
||||
/* 颜色系统 - 文本 */
|
||||
--color-text-primary: #cccccc;
|
||||
--color-text-secondary: #9d9d9d;
|
||||
--color-text-tertiary: #6a6a6a;
|
||||
--color-text-disabled: #4d4d4d;
|
||||
--color-text-inverse: #ffffff;
|
||||
|
||||
/* 颜色系统 - 边框 */
|
||||
--color-border-default: #3e3e42;
|
||||
--color-border-subtle: #2b2b2b;
|
||||
--color-border-strong: #505050;
|
||||
|
||||
/* 颜色系统 - 主题色 */
|
||||
--color-primary: #007acc;
|
||||
--color-primary-hover: #1177bb;
|
||||
--color-primary-active: #0e639c;
|
||||
--color-primary-subtle: rgba(0, 122, 204, 0.1);
|
||||
|
||||
/* 颜色系统 - 功能色 */
|
||||
--color-success: #4ec9b0;
|
||||
--color-warning: #ce9178;
|
||||
--color-error: #f48771;
|
||||
--color-info: #4fc1ff;
|
||||
|
||||
/* 颜色系统 - 特殊 */
|
||||
--color-selected: #094771;
|
||||
--color-selected-hover: #0e639c;
|
||||
--color-focus: #007acc;
|
||||
--color-shadow: rgba(0, 0, 0, 0.5);
|
||||
|
||||
/* 字体系统 */
|
||||
--font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
||||
--font-family-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
|
||||
--font-size-xs: 11px;
|
||||
--font-size-sm: 12px;
|
||||
--font-size-base: 13px;
|
||||
--font-size-md: 14px;
|
||||
--font-size-lg: 16px;
|
||||
--font-size-xl: 18px;
|
||||
|
||||
--font-weight-normal: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-semibold: 600;
|
||||
--font-weight-bold: 700;
|
||||
|
||||
--line-height-tight: 1.2;
|
||||
--line-height-base: 1.5;
|
||||
--line-height-relaxed: 1.75;
|
||||
|
||||
/* 间距系统 (4px 基准) */
|
||||
--spacing-xs: 4px;
|
||||
--spacing-sm: 8px;
|
||||
--spacing-md: 12px;
|
||||
--spacing-lg: 16px;
|
||||
--spacing-xl: 20px;
|
||||
--spacing-2xl: 24px;
|
||||
--spacing-3xl: 32px;
|
||||
--spacing-4xl: 40px;
|
||||
|
||||
/* 圆角 */
|
||||
--radius-none: 0;
|
||||
--radius-sm: 3px;
|
||||
--radius-md: 4px;
|
||||
--radius-lg: 6px;
|
||||
--radius-xl: 8px;
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* 阴影 */
|
||||
--shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
|
||||
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
|
||||
--shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.4);
|
||||
|
||||
/* 过渡 */
|
||||
--transition-fast: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
|
||||
/* Z-index 层级 */
|
||||
--z-index-base: 1;
|
||||
--z-index-dropdown: 10;
|
||||
--z-index-sticky: 20;
|
||||
--z-index-overlay: 30;
|
||||
--z-index-modal: 40;
|
||||
--z-index-popover: 50;
|
||||
--z-index-tooltip: 60;
|
||||
|
||||
/* 尺寸 */
|
||||
--size-icon-sm: 14px;
|
||||
--size-icon-md: 16px;
|
||||
--size-icon-lg: 20px;
|
||||
--size-icon-xl: 24px;
|
||||
|
||||
--size-input-sm: 28px;
|
||||
--size-input-md: 32px;
|
||||
--size-input-lg: 36px;
|
||||
|
||||
--size-button-sm: 28px;
|
||||
--size-button-md: 32px;
|
||||
--size-button-lg: 36px;
|
||||
|
||||
/* 布局 */
|
||||
--layout-sidebar-min: 180px;
|
||||
--layout-sidebar-default: 250px;
|
||||
--layout-sidebar-max: 400px;
|
||||
--layout-header-height: 40px;
|
||||
--layout-footer-height: 24px;
|
||||
--layout-panel-header: 36px;
|
||||
}
|
||||
148
packages/editor-app/src/styles/global.css
Normal file
148
packages/editor-app/src/styles/global.css
Normal file
@@ -0,0 +1,148 @@
|
||||
@import './design-tokens.css';
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-family-base);
|
||||
font-size: var(--font-size-base);
|
||||
line-height: var(--line-height-base);
|
||||
color: var(--color-text-primary);
|
||||
background-color: var(--color-bg-base);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
button {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--color-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-text-inverse);
|
||||
}
|
||||
|
||||
.scrollable {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.scrollable::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.scrollable::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.scrollable::-webkit-scrollbar-thumb {
|
||||
background: rgba(121, 121, 121, 0.4);
|
||||
border-radius: 8px;
|
||||
border: 3px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.scrollable::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 100, 100, 0.7);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.scrollable::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scaleIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-fadeIn {
|
||||
animation: fadeIn var(--transition-base);
|
||||
}
|
||||
|
||||
.animate-slideDown {
|
||||
animation: slideDown var(--transition-base);
|
||||
}
|
||||
|
||||
.animate-slideUp {
|
||||
animation: slideUp var(--transition-base);
|
||||
}
|
||||
|
||||
.animate-scaleIn {
|
||||
animation: scaleIn var(--transition-base);
|
||||
}
|
||||
|
||||
.animate-spin {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
Reference in New Issue
Block a user