add comments, extra space cleanup

This commit is contained in:
amandaesmith3
2024-03-18 13:17:02 -05:00
parent cd1213ef04
commit 819d48edee
4 changed files with 10 additions and 3 deletions

View File

@ -23,7 +23,7 @@
// Native Text Input // Native Text Input
// -------------------------------------------------- // --------------------------------------------------
:host(.input-label-placement-floating:not(.input-fill-outline)) .native-input, :host(.input-label-placement-floating:not(.input-fill-outline)) .native-input,
:host(.input-label-placement-stacked:not(.input-fill-outline)) .native-input { :host(.input-label-placement-stacked:not(.input-fill-outline)) .native-input {
padding-top: 1em; padding-top: 1em;
} }
@ -76,7 +76,7 @@
// Input Highlight // Input Highlight
// ---------------------------------------------------------------- // ----------------------------------------------------------------
.input-highlight { .input-highlight {
@include position(null, null, -1px, 0); @include position(null, null, -1px, 0);
position: absolute; position: absolute;

View File

@ -678,6 +678,8 @@ export class Input implements ComponentInterface {
labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus)); labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus));
const startSlotEl = el.querySelector('[slot="start"]'); const startSlotEl = el.querySelector('[slot="start"]');
// 16px is the margin after the start slot content, which we also need to account for.
const startSlotWidth = startSlotEl ? startSlotEl.clientWidth + 16 : 0; const startSlotWidth = startSlotEl ? startSlotEl.clientWidth + 16 : 0;
return ( return (

View File

@ -89,7 +89,7 @@
* so it is not cut off by the * so it is not cut off by the
* the item's line (if one is present). * the item's line (if one is present).
*/ */
:host(.in-item) .textarea-highlight { :host(.in-item) .textarea-highlight {
@include position(null, null, 0, 0); @include position(null, null, 0, 0);
} }

View File

@ -630,6 +630,11 @@
:host(.textarea-label-placement-stacked) ::slotted([slot="end"]), :host(.textarea-label-placement-stacked) ::slotted([slot="end"]),
:host(.textarea-label-placement-floating) ::slotted([slot="start"]), :host(.textarea-label-placement-floating) ::slotted([slot="start"]),
:host(.textarea-label-placement-floating) ::slotted([slot="end"]) { :host(.textarea-label-placement-floating) ::slotted([slot="end"]) {
/**
* 1em accounts for the padding applied to the native textarea.
* This value may need adjusting to get everything lined up
* in all conditions.
*/
margin-top: calc(1em + 8px); margin-top: calc(1em + 8px);
} }