Split toolbox Sass partials
This commit is contained in:
parent
b221257616
commit
c312b9ed91
19 changed files with 6490 additions and 6419 deletions
402
website/src/styles/toolboxes/_notepad.scss
Normal file
402
website/src/styles/toolboxes/_notepad.scss
Normal file
|
|
@ -0,0 +1,402 @@
|
|||
// Rôle : gère la surface de bloc-notes riche et sa barre de formatage.
|
||||
@use "../mixins";
|
||||
|
||||
.notepad-module {
|
||||
display: grid;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-4);
|
||||
}
|
||||
|
||||
.notepad-toolbar,
|
||||
.notepad-toolbar-group,
|
||||
.notepad-format-controls {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.notepad-toolbar {
|
||||
justify-content: flex-start;
|
||||
padding: 8px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(5, 7, 17, 0.46);
|
||||
}
|
||||
|
||||
.notepad-format-controls {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.notepad-toolbar-group {
|
||||
padding-right: 8px;
|
||||
border-right: 1px solid rgba(150, 165, 205, 0.12);
|
||||
}
|
||||
|
||||
.notepad-toolbar-group:last-child {
|
||||
padding-right: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.notepad-toolbar-button,
|
||||
.drawing-control-button,
|
||||
.notepad-swatch,
|
||||
.notepad-color-toggle,
|
||||
.drawing-width-toggle,
|
||||
.drawing-width-button {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 34px;
|
||||
min-width: 34px;
|
||||
min-height: 34px;
|
||||
padding: 0;
|
||||
border-color: rgba(150, 165, 205, 0.18);
|
||||
border-radius: var(--radius-sm);
|
||||
background: rgba(16, 20, 38, 0.74);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 900;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.notepad-toolbar-button .ui-icon,
|
||||
.drawing-control-button .ui-icon {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
.notepad-toolbar-button:hover,
|
||||
.drawing-control-button:hover,
|
||||
.notepad-swatch:hover,
|
||||
.notepad-color-toggle:hover,
|
||||
.drawing-width-toggle:hover,
|
||||
.drawing-width-button:hover,
|
||||
.notepad-toolbar-button.active,
|
||||
.drawing-control-button.active,
|
||||
.notepad-swatch.active,
|
||||
.drawing-width-button.active {
|
||||
border-color: rgba(246, 196, 83, 0.48);
|
||||
background: rgba(246, 196, 83, 0.1);
|
||||
color: var(--color-accent-gold);
|
||||
}
|
||||
|
||||
.notepad-color-dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notepad-list-dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notepad-list-icon,
|
||||
.notepad-list-icon::before,
|
||||
.notepad-list-icon::after {
|
||||
display: block;
|
||||
width: 17px;
|
||||
height: 2px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.notepad-list-icon {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notepad-list-icon::before,
|
||||
.notepad-list-icon::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.notepad-list-icon::before {
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
.notepad-list-icon::after {
|
||||
top: 6px;
|
||||
}
|
||||
|
||||
.notepad-color-toggle::before,
|
||||
.notepad-swatch::before {
|
||||
content: "";
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 1px solid rgba(245, 247, 255, 0.22);
|
||||
border-radius: 50%;
|
||||
background: var(--swatch-color);
|
||||
box-shadow: inset 0 0 0 2px rgba(5, 7, 17, 0.36);
|
||||
}
|
||||
|
||||
.notepad-color-toggle.is-rainbow::before {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-color: rgba(245, 247, 255, 0.28);
|
||||
background: conic-gradient(
|
||||
from 20deg,
|
||||
#f6c453,
|
||||
#22d3ee,
|
||||
#8b5cf6,
|
||||
#d946ef,
|
||||
#f5f7ff,
|
||||
#f6c453
|
||||
);
|
||||
box-shadow:
|
||||
inset 0 0 0 3px rgba(5, 7, 17, 0.34),
|
||||
0 0 10px rgba(139, 92, 246, 0.16);
|
||||
}
|
||||
|
||||
.notepad-color-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 50%;
|
||||
z-index: 50;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 34px);
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(10, 13, 28, 0.99);
|
||||
box-shadow: var(--shadow-lg);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translate(-50%, -4px);
|
||||
transition:
|
||||
opacity 140ms ease,
|
||||
transform 140ms ease;
|
||||
}
|
||||
|
||||
.notepad-list-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 50%;
|
||||
z-index: 50;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 34px);
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(10, 13, 28, 0.99);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.notepad-list-menu::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: calc(50% - 7px);
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid rgba(10, 13, 28, 0.99);
|
||||
border-left: 7px solid transparent;
|
||||
}
|
||||
|
||||
.notepad-list-menu::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 100%;
|
||||
left: 0;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.notepad-list-option {
|
||||
justify-content: center;
|
||||
width: 34px;
|
||||
min-width: 34px;
|
||||
min-height: 34px;
|
||||
padding: 0;
|
||||
border-color: rgba(150, 165, 205, 0.18);
|
||||
background: rgba(16, 20, 38, 0.74);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 800;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.notepad-list-option:hover,
|
||||
.notepad-list-option.active {
|
||||
border-color: rgba(246, 196, 83, 0.48);
|
||||
background: rgba(246, 196, 83, 0.1);
|
||||
color: var(--color-accent-gold);
|
||||
}
|
||||
|
||||
.notepad-color-menu.is-sectioned {
|
||||
grid-template-columns: 1fr;
|
||||
width: 168px;
|
||||
}
|
||||
|
||||
.notepad-color-section {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.notepad-color-section + .notepad-color-section {
|
||||
margin-top: 4px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid rgba(150, 165, 205, 0.12);
|
||||
}
|
||||
|
||||
.notepad-color-section-label {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.notepad-color-section-swatches {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 34px);
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.notepad-color-dropdown:hover .notepad-color-menu,
|
||||
.notepad-color-dropdown:focus-within .notepad-color-menu,
|
||||
.notepad-color-dropdown.is-open .notepad-color-menu {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
|
||||
.notepad-color-menu::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 100%;
|
||||
left: 0;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.notepad-color-menu::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: calc(50% - 7px);
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid rgba(10, 13, 28, 0.99);
|
||||
border-left: 7px solid transparent;
|
||||
}
|
||||
|
||||
.drawing-width-toggle span,
|
||||
.drawing-width-button span {
|
||||
width: 20px;
|
||||
height: var(--line-width);
|
||||
border-radius: var(--radius-pill);
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.drawing-width-dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.drawing-width-menu {
|
||||
position: absolute;
|
||||
right: auto;
|
||||
bottom: calc(100% + 8px);
|
||||
left: 50%;
|
||||
z-index: 50;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 34px);
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(10, 13, 28, 0.99);
|
||||
box-shadow: var(--shadow-lg);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translate(-50%, 4px);
|
||||
transition:
|
||||
opacity 140ms ease,
|
||||
transform 140ms ease;
|
||||
}
|
||||
|
||||
.drawing-width-dropdown:hover .drawing-width-menu,
|
||||
.drawing-width-dropdown:focus-within .drawing-width-menu,
|
||||
.drawing-width-dropdown.is-open .drawing-width-menu {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
|
||||
.drawing-width-menu::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.drawing-width-menu::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: calc(50% - 7px);
|
||||
border-top: 7px solid rgba(10, 13, 28, 0.99);
|
||||
border-right: 7px solid transparent;
|
||||
border-left: 7px solid transparent;
|
||||
}
|
||||
|
||||
.notepad-surface {
|
||||
position: relative;
|
||||
min-height: 260px;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(5, 7, 17, 0.56);
|
||||
}
|
||||
|
||||
.notepad-surface:focus-within {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
|
||||
}
|
||||
|
||||
.notepad-surface.is-drawing {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.notepad-editor {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
min-height: 260px;
|
||||
padding: var(--space-4);
|
||||
color: var(--color-text-primary);
|
||||
line-height: 1.6;
|
||||
outline: none;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.notepad-editor[contenteditable="false"] {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.notepad-editor.is-empty::before {
|
||||
content: attr(data-placeholder);
|
||||
position: absolute;
|
||||
color: var(--color-text-muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.notepad-editor h3,
|
||||
.notepad-editor h4,
|
||||
.notepad-editor p,
|
||||
.notepad-editor ul,
|
||||
.notepad-editor ol {
|
||||
margin: 0 0 0.75em;
|
||||
}
|
||||
|
||||
.notepad-editor h3 {
|
||||
font-size: 1.08rem;
|
||||
}
|
||||
|
||||
.notepad-editor h4 {
|
||||
font-size: 0.98rem;
|
||||
}
|
||||
|
||||
.notepad-editor ul,
|
||||
.notepad-editor ol {
|
||||
padding-left: 1.35rem;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue