Files
DrawDiagrams/style.css
2025-11-21 10:42:52 +01:00

265 lines
4.6 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
min-height: 100vh;
overflow: hidden;
}
.toolbar {
background: #ffffff;
color: #333;
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
position: absolute;
width: 280px;
left: 0;
top: 0;
height: 100vh;
z-index: 9;
overflow-y: auto;
border-right: 1px solid #e0e0e0;
}
.toolbar p {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #666;
margin-bottom: 8px;
padding-bottom: 8px;
border-bottom: 2px solid #e0e0e0;
}
.toolbar-wrapper {
background: #f9f9f9;
border-radius: 8px;
border: 1px solid #e0e0e0;
}
.shape-wrapper {
display: flex;
flex-wrap: wrap;
gap: 10px;
padding: 12px;
min-height: 152px;
justify-content: space-between;
align-content: space-between;
}
.shape {
background: #fff;
border: 2px solid #d0d0d0;
cursor: grab;
transition: border-color 0.2s, box-shadow 0.2s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.shape:hover {
border-color: #666;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.shape:active {
cursor: grabbing;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
#shape-rectangle {
width: 80px;
height: 48px;
border-radius: 4px;
}
#shape-ellipse {
width: 80px;
height: 48px;
border-radius: 50%;
}
#shape-diamond {
height: 48px;
width: 48px;
transform: rotate(45deg) translate(3px, -16px);
border-radius: 4px;
}
#shape-text {
width: 80px;
height: 48px;
border-style: dashed;
border-radius: 4px;
color: #666;
font-size: 12px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
/* Tools wrapper */
.tools-wrapper {
display: flex;
flex-direction: column;
gap: 8px;
padding: 0;
}
.tools-wrapper button {
padding: 12px 16px;
font-size: 13px;
font-weight: 500;
border: 1px solid #d0d0d0;
border-radius: 6px;
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
background: #fff;
color: #333;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tools-wrapper button:hover {
background: #f5f5f5;
border-color: #999;
}
.tools-wrapper button:active {
background: #e8e8e8;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
#btn-delete {
color: #d32f2f;
border-color: #d32f2f;
}
#btn-delete:hover {
background: #ffebee;
border-color: #c62828;
}
#btn-copy {
color: #1976d2;
border-color: #1976d2;
}
#btn-copy:hover {
background: #e3f2fd;
border-color: #1565c0;
}
#btn-paste {
color: #388e3c;
border-color: #388e3c;
}
#btn-paste:hover {
background: #e8f5e9;
border-color: #2e7d32;
}
/* Zoom wrapper */
.zoom-wrapper {
display: flex;
justify-content: center;
gap: 12px;
padding: 6px;
}
.zoom-wrapper button {
background: #fff;
color: #333;
border: 1px solid #d0d0d0;
border-radius: 6px;
width: 50px;
height: 50px;
font-size: 20px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: background 0.2s, border-color 0.2s;
outline: none;
}
.zoom-wrapper button:hover {
background: #f5f5f5;
border-color: #999;
}
.zoom-wrapper button:active {
background: #e8e8e8;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* Canvas container */
.canvas-container {
position: absolute;
left: 280px;
top: 0;
right: 0;
bottom: 0;
background: #ffffff;
background-image:
linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
background-size: 20px 20px;
overflow: auto;
}
#paper {
width: 100%;
height: 100%;
}
/* Scrollbar styling */
.toolbar::-webkit-scrollbar {
width: 6px;
}
.toolbar::-webkit-scrollbar-track {
background: #f5f5f5;
}
.toolbar::-webkit-scrollbar-thumb {
background: #d0d0d0;
border-radius: 3px;
}
.toolbar::-webkit-scrollbar-thumb:hover {
background: #999;
}
#resize-handle {
position: absolute;
box-sizing: border-box;
pointer-events: auto;
}
/* Responsive */
@media (max-width: 768px) {
.toolbar {
width: 100%;
height: auto;
border-radius: 0;
}
.canvas-container {
left: 0;
top: auto;
}
}