commit 9c0df94b310af621ddc7d9349f06fefc25c24809
parent 9b7cbea13fbf47b5723739a3329f9491b141a744
Author: Mark Striemer <mstriemer@mozilla.com>
Date: Wed, 26 Nov 2025 17:51:11 +0000
Bug 2002384 - Apply margins to nested inputs rather than using gap r=akulyk
Previously we were using gap between the nested inputs, and applying a
margin-block-start to the first nested input, however if the first input
is hidden then the gap would not be applied to the first visible input.
Differential Revision: https://phabricator.services.mozilla.com/D274049
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/toolkit/content/widgets/moz-input-common.css b/toolkit/content/widgets/moz-input-common.css
@@ -141,10 +141,11 @@
margin-inline-start: var(--input-space-offset);
display: flex;
flex-direction: column;
- gap: var(--space-large);
}
- ::slotted([slot="nested"]:first-child) {
+ ::slotted([slot="nested"]) {
+ /* Apply margin to all elements rather than using gap so the first visible
+ * element has a margin between it and the parent. */
margin-block-start: var(--space-large);
}
}