From cabf1b601bcc1e583a0bb505e34b0fa918f4da9d Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sun, 6 Sep 2026 17:53:10 -0500 Subject: [PATCH] feat: adjust ingredient spacing (#8318) --- .../Recipe/RecipeIngredientListItem.vue | 23 +++++++++++++++---- .../Domain/Recipe/RecipeIngredients.vue | 9 +++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/frontend/app/components/Domain/Recipe/RecipeIngredientListItem.vue b/frontend/app/components/Domain/Recipe/RecipeIngredientListItem.vue index 916175647..05e215e1b 100644 --- a/frontend/app/components/Domain/Recipe/RecipeIngredientListItem.vue +++ b/frontend/app/components/Domain/Recipe/RecipeIngredientListItem.vue @@ -65,7 +65,9 @@ const parsedIng = computed(() => { display: flex; flex-wrap: wrap; align-items: center; - gap: 0.25em; + // column only: the note takes a flex row of its own, and it reads as belonging to the + // ingredient above it only if it sits tighter to that line than the rows sit to each other + column-gap: 0.25em; word-break: break-word; min-width: 0; @@ -97,11 +99,22 @@ const parsedIng = computed(() => { word-break: break-word; } - // the substitution button keeps a finger-sized tap target, but its box is taller than the - // line of text it sits on; left alone it sets the row's height and pushes the note down. - // it overflows the line instead of growing it + // vuetify sizes an icon button for a toolbar, far taller than the line of text this one + // sits on; left alone it sets the row's height and pushes the note down. sized to the line + // instead, so the box, the icon glyph and the line are all the same height -- the glyph + // follows font-size, not the box, so it renders unchanged .v-btn--icon { - margin-block: calc((1.75rem - 48px) / 2); + line-height: inherit; + width: 1lh; + height: 1lh; + + // the tap target stays finger-sized as a transparent halo over the rows either side, + // rather than a taller box that would push them apart + &::before { + content: ""; + position: absolute; + inset: -0.75rem; + } } } diff --git a/frontend/app/components/Domain/Recipe/RecipeIngredients.vue b/frontend/app/components/Domain/Recipe/RecipeIngredients.vue index f0a05bf4d..cf84662d6 100644 --- a/frontend/app/components/Domain/Recipe/RecipeIngredients.vue +++ b/frontend/app/components/Domain/Recipe/RecipeIngredients.vue @@ -26,7 +26,7 @@