Add Coloris.js library for enhanced color selection in PageSettings with automatic button state sync across tab changes. Features: - Color picker with swatches, alpha support, and format toggle (hex/rgb/hsl) - Button positioned to the left of input field - Automatic sync when switching tabs (remembers selected color) - Close button and click-outside-to-close functionality - Dark theme with pill UI style Changes: - Install @melloware/coloris package - PageSettings.vue: Integrate Coloris with data-coloris attribute, add tab visibility detection via provide/inject, force button update when returning to document tab - EditorPanel.vue: Provide activeTab to child components, increase panel width to 30rem - _forms.scss: Add .input-with-color styles with custom Coloris button positioning (absolute positioned to left of input) - Temporarily comment out rgb/hex format buttons (replaced by Coloris format toggle) Technical details: - Uses provide/inject pattern to detect tab changes - Triggers synthetic input events to force Coloris button refresh - Custom CSS overrides to position swatch button correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
145 lines
No EOL
2.5 KiB
CSS
145 lines
No EOL
2.5 KiB
CSS
body,
|
|
html {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin: 0;
|
|
}
|
|
|
|
input,
|
|
select {
|
|
border: none;
|
|
outline: none;
|
|
border-radius: var(--border-radius);
|
|
}
|
|
|
|
button {
|
|
background-color: transparent;
|
|
border: none;
|
|
}
|
|
|
|
:root {
|
|
--color-panel-bg: #e8e6e5;
|
|
--color-browngray-050: #f5f3f0;
|
|
--color-browngray-200: #d0c4ba;
|
|
--color-browngray-300: #b5a9a1;
|
|
--border-radius: 0.2rem;
|
|
}
|
|
|
|
body,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6,
|
|
p,
|
|
a,
|
|
input,
|
|
select,
|
|
figcaption,
|
|
label {
|
|
font-family: sans-serif;
|
|
}
|
|
|
|
/* PagedJS print styles */
|
|
@page {
|
|
size: A4;
|
|
margin: 20mm 15mm 26mm 15mm;
|
|
}
|
|
h2 {
|
|
-moz-column-break-before: page;
|
|
break-before: page;
|
|
}
|
|
|
|
@page {
|
|
@bottom-center {
|
|
content: string(title);
|
|
}
|
|
}
|
|
.chapter > h2 {
|
|
string-set: title content(text);
|
|
}
|
|
|
|
select,
|
|
input[type=text],
|
|
input[type=number] {
|
|
background-color: var(--color-browngray-300);
|
|
}
|
|
|
|
.field--view-only {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
.settings-section h2 {
|
|
border-bottom: 1px solid #000;
|
|
}
|
|
.settings-section .settings-subsection:not(:last-child) {
|
|
border-bottom: 1px solid var(--color-browngray-050);
|
|
}
|
|
.settings-section .settings-subsection {
|
|
padding: 0.5rem 0;
|
|
}
|
|
.settings-section .settings-subsection .field {
|
|
display: flex;
|
|
}
|
|
.settings-section .settings-subsection .field label {
|
|
width: 50%;
|
|
}
|
|
.settings-section .settings-subsection .field .input-with-unit {
|
|
display: flex;
|
|
}
|
|
.settings-section .settings-subsection .field .input-with-color .clr-field {
|
|
display: flex;
|
|
}
|
|
.settings-section .settings-subsection .field .input-with-color .clr-field button {
|
|
position: absolute;
|
|
transform: none;
|
|
height: 1rem;
|
|
top: auto;
|
|
right: auto;
|
|
cursor: pointer;
|
|
}
|
|
.settings-section .settings-subsection .field .input-with-color .clr-field input {
|
|
padding-left: 2.5rem;
|
|
}
|
|
.settings-section .settings-subsection.margins {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
.settings-section .settings-subsection.margins h3 {
|
|
width: 100%;
|
|
}
|
|
.settings-section .settings-subsection.margins .field {
|
|
width: 50%;
|
|
}
|
|
.settings-section .settings-subsection.margins .field label {
|
|
width: 50%;
|
|
}
|
|
.settings-section .settings-subsection.margins .field .input-with-unit input {
|
|
width: 50%;
|
|
}
|
|
|
|
button {
|
|
cursor: pointer;
|
|
border: 1px solid var(--color-browngray-300);
|
|
color: var(--color-browngray-300);
|
|
border-radius: var(--border-radius);
|
|
padding: 0.1rem 0.3rem;
|
|
}
|
|
button.active {
|
|
border: 1px solid #000;
|
|
color: #000;
|
|
}
|
|
button.tab.active {
|
|
background-color: #000;
|
|
color: #fff;
|
|
border: none;
|
|
}/*# sourceMappingURL=style.css.map */ |