rebuild style for settings section
This commit is contained in:
parent
8bf7afddd2
commit
bd828e697c
11 changed files with 562 additions and 418 deletions
|
|
@ -8,126 +8,71 @@ input[type="number"] {
|
|||
color: var(--color-txt);
|
||||
font-size: 1rem;
|
||||
padding-left: 0.5ch;
|
||||
// min-width: var(--input-w);
|
||||
// width: 100%;
|
||||
// padding: 0 1ch;
|
||||
padding-right: 0.5ch;
|
||||
}
|
||||
|
||||
.field {
|
||||
input[type="number"]{
|
||||
padding-left: 0.75ch;
|
||||
}
|
||||
|
||||
select{
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-with-unit{
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5ch;
|
||||
|
||||
label {
|
||||
font-weight: 600;
|
||||
color: var(--color-800);
|
||||
input[type="range"]{
|
||||
flex-grow: 1;
|
||||
margin-right: 1ch;
|
||||
}
|
||||
|
||||
.input-with-unit {
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
.number-input{
|
||||
--input-w: 4ch;
|
||||
flex-grow: 1;
|
||||
max-width: calc(var(--input-w)*1.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.number-input{
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
}
|
||||
input[type="number"]{
|
||||
width: var(--input-w);
|
||||
padding-right: calc(var(--input-w)*0.5);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.unit-toggle {
|
||||
height: var(--input-h);
|
||||
.unit-toggle{
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
align-items: center;
|
||||
gap: 0.25ch;
|
||||
|
||||
}
|
||||
|
||||
.input-with-color {
|
||||
width: 100%;
|
||||
.clr-field {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: var(--input-h) 1fr;
|
||||
grid-gap: 1ch;
|
||||
button {
|
||||
grid-column: 1;
|
||||
position: relative;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
input {
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.field {
|
||||
display: grid;
|
||||
grid-template-columns: var(--label-w) 1fr;
|
||||
label {
|
||||
align-self: center;
|
||||
.field-checkbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5ch;
|
||||
input[type="checkbox"]{
|
||||
accent-color: var(--color-interface-800);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.field-font {
|
||||
display: grid;
|
||||
grid-template-columns: var(--label-w) 1fr;
|
||||
grid-template-rows: var(--input-h) var(--input-h);
|
||||
|
||||
|
||||
|
||||
.field-font__options{
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
|
||||
select {
|
||||
width: 100%;
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
.field-checkbox {
|
||||
padding-top: var(--space-xs);
|
||||
label {
|
||||
font-weight: 400;
|
||||
margin-left: 0.75ch;
|
||||
color: var(--color-txt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field-text-size {
|
||||
input[type="number"] {
|
||||
width: var(--input-w-small);
|
||||
padding-left: 0.75ch;
|
||||
}
|
||||
input[type="range"] {
|
||||
flex-grow: 2;
|
||||
flex-shrink: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.field-margin,
|
||||
.field-size {
|
||||
display: inline-grid;
|
||||
width: calc(50% - 1ch);
|
||||
grid-template-columns: 6.5ch var(--input-w-small) 1fr;
|
||||
margin-bottom: var(--space-xs);
|
||||
input {
|
||||
width: var(--input-w-small);
|
||||
padding-left: 0.75ch;
|
||||
}
|
||||
&:nth-of-type(odd) {
|
||||
margin-right: 2ch;
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox-field {
|
||||
margin: calc(var(--space-xs) * 2) 0;
|
||||
grid-template-columns: 3ch 1fr;
|
||||
input {
|
||||
justify-self: left;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.field--view-only {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
/* Label with CSS tooltip */
|
||||
/* Label with tooltip ---------------------------------------------- */
|
||||
.label-with-tooltip {
|
||||
text-decoration: underline dotted 1px var(--color-200);
|
||||
text-underline-offset: 2px;
|
||||
|
|
@ -161,9 +106,82 @@ input[type="number"] {
|
|||
}
|
||||
}
|
||||
|
||||
// INPUT NUMBER ===============================================
|
||||
|
||||
// Masquer les spinners natifs partout
|
||||
// INPUT COLOR ------------------------------------------------
|
||||
|
||||
.input-with-color {
|
||||
width: 100%;
|
||||
.clr-field {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: var(--input-h) minmax(0, 1fr);
|
||||
grid-gap: 1ch;
|
||||
button {
|
||||
grid-column: 1;
|
||||
position: relative;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
input {
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// INPUT RANGE ---------------------------------------------
|
||||
|
||||
input[type="range"] {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
height: 6px;
|
||||
background: linear-gradient(to right, var(--color-interface-400) var(--progress, 0%), var(--color-interface-200) var(--progress, 0%));
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
&::-moz-range-track {
|
||||
height: 6px;
|
||||
background: linear-gradient(to right, var(--color-interface-400) var(--progress, 0%), var(--color-interface-200) var(--progress, 0%));
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
|
||||
&::-moz-range-progress {
|
||||
height: 6px;
|
||||
background: var(--color-interface-400);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
// Thumb
|
||||
&::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: var(--color-interface-900);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
&::-moz-range-thumb {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: var(--color-interface-900);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
// INPUT NUMBER ---------------------------------------------
|
||||
|
||||
// disable natif
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
|
|
@ -177,7 +195,6 @@ input[type="number"] {
|
|||
|
||||
.number-input {
|
||||
position: relative;
|
||||
// padding: 0 1ch!important;
|
||||
input {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
|
|
@ -216,66 +233,3 @@ input[type="number"] {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Composant NumberInput avec boutons personnalisés
|
||||
// .number-input {
|
||||
// position: relative;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// width: 100%;
|
||||
// position: relative;
|
||||
|
||||
// input[type="number"] {
|
||||
// width: 100%;
|
||||
// box-sizing: border-box;
|
||||
// }
|
||||
|
||||
// .spinner-buttons {
|
||||
// background-color: red;
|
||||
// position: absolute;
|
||||
// right: 1px;
|
||||
// top: 1px;
|
||||
// bottom: 1px;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// justify-content: center;
|
||||
// gap: 1px;
|
||||
// z-index: 10;
|
||||
|
||||
// .spinner-btn {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// width: 20px;
|
||||
// height: 10px;
|
||||
// padding: 0;
|
||||
// margin: 0;
|
||||
// background-color: var(--color-interface-200);
|
||||
// border: 1px solid var(--color-interface-300);
|
||||
// border-radius: 2px;
|
||||
// cursor: pointer;
|
||||
// transition: background-color 0.15s ease;
|
||||
// color: var(--color-interface-700);
|
||||
// line-height: 0;
|
||||
|
||||
// svg {
|
||||
// width: 8px;
|
||||
// height: 6px;
|
||||
// display: block;
|
||||
// }
|
||||
|
||||
// &:hover:not(:disabled) {
|
||||
// background-color: var(--color-interface-300);
|
||||
// color: var(--color-interface-900);
|
||||
// }
|
||||
|
||||
// &:active:not(:disabled) {
|
||||
// background-color: var(--color-interface-400);
|
||||
// }
|
||||
|
||||
// &:disabled {
|
||||
// opacity: 0.3;
|
||||
// cursor: not-allowed;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue