Compare commits
2 Commits
6004110fcf
...
3316ac89fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3316ac89fd | ||
|
|
216987bb0c |
@@ -1,7 +1,14 @@
|
|||||||
|
// The gap has to beat the distance from a field to its own error message,
|
||||||
|
// which Material renders flush underneath it — 0px. At 1.25rem the message
|
||||||
|
// ended up 6px from the *next* field's label and 0px from its own field, so
|
||||||
|
// "Falta el nombre" read as the caption of "HORAS POR SEMANA" rather than of
|
||||||
|
// the field above it. The three lines have to group with the field they belong
|
||||||
|
// to, which means the space between rows must be visibly larger than the space
|
||||||
|
// inside one.
|
||||||
.landing-form {
|
.landing-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.25rem;
|
gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.landing-form__kind {
|
.landing-form__kind {
|
||||||
@@ -120,3 +127,20 @@
|
|||||||
font-size: var(--pi-font-size-x-small, 0.75rem);
|
font-size: var(--pi-font-size-x-small, 0.75rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Focusing a field that already has an error drew it twice: the notched
|
||||||
|
// outline stays in the error colour, and the gradient focus ring is painted on
|
||||||
|
// top of it in the brand's violet-to-cyan. Two rings, two colours, one field —
|
||||||
|
// and on the textarea, at two different radii, which is what made it obvious.
|
||||||
|
//
|
||||||
|
// The ring is worth keeping: it is how focus reads on every other field. It
|
||||||
|
// just has to agree with the state it is decorating, so while the field is
|
||||||
|
// invalid the ring is built from the warn colour instead of the brand one. The
|
||||||
|
// field ends up with a single red indication that still brightens on focus.
|
||||||
|
:host ::ng-deep .pi-field .mat-form-field-invalid {
|
||||||
|
--pi-theme-field-focus-gradient: linear-gradient(
|
||||||
|
120deg,
|
||||||
|
var(--pi-color-warn),
|
||||||
|
var(--pi-color-warn-200, var(--pi-color-warn))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user