tools/dev-tools/code-formatter/styles.css

116 lines
2.0 KiB
CSS

/* 代码格式化工具的自定义样式 */
/* 代码输入框样式 */
#code-input {
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 1.5;
resize: vertical;
tab-size: 4;
}
/* 代码输出容器样式 */
#code-output-container {
position: relative;
}
/* highlight.js 容器样式优化 */
pre {
margin: 0;
padding: 0;
}
#code-output {
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 1.5;
counter-reset: line;
tab-size: 4;
}
/* 滑块样式优化 */
input[type=range] {
height: 6px;
background: #e2e8f0;
outline: none;
border-radius: 5px;
margin: 10px 0;
}
input[type=range]::-webkit-slider-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: #1f2937;
cursor: pointer;
-webkit-appearance: none;
}
/* 通知样式 */
.notification {
position: fixed;
bottom: 20px;
right: 20px;
padding: 10px 16px;
border-radius: 6px;
color: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 100;
transition: opacity 0.3s ease;
}
.notification.success {
background-color: #10b981;
}
.notification.error {
background-color: #ef4444;
}
/* 复制按钮的悬停效果 */
#copy-btn:hover {
background-color: #f3f4f6;
color: #4b5563;
}
/* 清除按钮的悬停效果 */
#clear-btn:hover {
color: #4b5563;
}
/* 暗色模式样式调整 */
.dark-mode #code-input {
background-color: #1e1e1e;
color: #d4d4d4;
border-color: #3e3e3e;
}
.dark-mode input[type=range] {
background: #4b5563;
}
.dark-mode input[type=range]::-webkit-slider-thumb {
background: #d1d5db;
}
.dark-mode #code-output-container {
border-color: #3e3e3e;
}
.dark-mode #copy-btn:hover,
.dark-mode #download-btn:hover {
background-color: #374151;
}
/* 响应式调整 */
@media (max-width: 768px) {
#code-output {
font-size: 12px;
}
.control-panel button {
padding: 6px 12px;
font-size: 14px;
}
}