mirror of
https://github.com/nebulousnessie/Obsidian-MOCBlocks.git
synced 2026-07-22 06:44:20 +00:00
144 lines
No EOL
3 KiB
CSS
144 lines
No EOL
3 KiB
CSS
|
|
/* MOC Block Renderer */
|
|
|
|
/* Container */
|
|
.mocblockRenderer-container {
|
|
position: relative;
|
|
display: inline-block;
|
|
cursor: default;
|
|
}
|
|
.mocblockRenderer-container img {
|
|
display: block;
|
|
max-width: 100%;
|
|
height: auto;
|
|
border: 1px solid #333;
|
|
border-radius: 8px;
|
|
cursor: default;
|
|
transition: width 0.15s cubic-bezier(.4,0,.2,1);
|
|
}
|
|
.mocblockRenderer-editing-outline {
|
|
outline: 3px dashed var(--text-accent);
|
|
outline-offset: 2px;
|
|
cursor: crosshair;
|
|
}
|
|
.mocblockRenderer-overlay {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
}
|
|
.mocblockRenderer-polygon-preview {
|
|
stroke: rgba(0, 0, 255, 0.3);
|
|
stroke-width: 2;
|
|
fill: rgba(0, 0, 255, 0.3); /* translucent fill */
|
|
}
|
|
.mocblockRenderer-resize-handle {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 10px;
|
|
width: 8px;
|
|
height: 50%;
|
|
margin-top: 25%;
|
|
cursor: ew-resize;
|
|
background: rgba(200,200,200,0.25);
|
|
border-radius: 8px;
|
|
z-index: 20;
|
|
transition: background 0.2s, box-shadow 0.2s;
|
|
box-shadow: 0 0 4px 0 rgba(0,0,0,0.07);
|
|
/* border: 1px solid rgba(180,180,180,0.2); */
|
|
}
|
|
.mocblockRenderer-resize-handle:hover {
|
|
background: rgba(220,220,220,0.5);
|
|
box-shadow: 0 0 8px 0 rgba(0,0,0,0.12);
|
|
}
|
|
|
|
/* Markers (pins, polylines) */
|
|
.mocblockRenderer-marker-pin {
|
|
position: absolute;
|
|
transform: translate(-50%, -50%);
|
|
cursor: pointer;
|
|
pointer-events: auto;
|
|
}
|
|
.mocblockRenderer-marker-polyline {
|
|
cursor: pointer;
|
|
}
|
|
.mocblockRenderer-marker-pin svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
fill: var(--text-normal);
|
|
pointer-events: auto;
|
|
}
|
|
.mocblock-heading {
|
|
position: absolute;
|
|
top: -1.5em;
|
|
left: 0;
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-size: 0.9em;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* Action Buttons */
|
|
.mocblockRenderer-actions-buttons {
|
|
position: absolute;
|
|
top: 30px;
|
|
right: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
opacity: 1;
|
|
transition: opacity 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
.mocblockRenderer-actions-buttons button {
|
|
background: rgba(0,0,0,0.6);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
padding: 2px 6px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
.mocblockRenderer-container:hover .mocblockRenderer-actions-buttons {
|
|
opacity: 1;
|
|
}
|
|
|
|
|
|
/* Settings Tab */
|
|
|
|
/* Styles */
|
|
.mocblock-settings-style-toggle {
|
|
margin-right: 0.5em;
|
|
cursor: pointer;
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
font-size: 1em;
|
|
margin-right: 0.7em;
|
|
}
|
|
.mocblock-settings-style-details {
|
|
margin-left: 2em;
|
|
margin-top: 0.5em;
|
|
border-left: 2px solid var(--background-modifier-border);
|
|
padding-left: 1em;
|
|
}
|
|
.mocblock-settings-style-row {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
.mocblock-settings-style-title {
|
|
font-weight: bold;
|
|
}
|
|
|
|
|
|
/* Multifunctional styles: used everywhere */
|
|
.mocblock-trash-hover:hover {
|
|
color: red !important;
|
|
} |