Skip to content

Commit 49326a6

Browse files
arraypressclaude
andcommitted
A share of the line has to be the basis, not a width flex may ignore
`flex-basis: 8rem` on a field with a width class meant four halves fitted on one line whenever the panel was wide enough, so a subscription's price, its compare-at, its interval and its trial all landed on the same row and "half" meant nothing. The share is the basis now, and two halves are two halves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tk8y5eZa3CHVVSM6nVxsJw
1 parent ee5f7d7 commit 49326a6

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

‎assets/css/field-kit.css‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,23 +3135,28 @@ span.field-kit__provider-logo {
31353135
.field-kit__field--third,
31363136
.field-kit__field--two-thirds,
31373137
.field-kit__field--quarter {
3138-
flex: 1 1 auto;
3138+
flex-grow: 0;
3139+
flex-shrink: 1;
31393140
min-width: 8rem;
31403141
}
31413142

31423143
.field-kit__field--half {
3144+
flex-basis: calc( 50% - .375rem );
31433145
width: calc( 50% - .375rem );
31443146
}
31453147

31463148
.field-kit__field--third {
3149+
flex-basis: calc( 33.333% - .5rem );
31473150
width: calc( 33.333% - .5rem );
31483151
}
31493152

31503153
.field-kit__field--two-thirds {
3154+
flex-basis: calc( 66.666% - .25rem );
31513155
width: calc( 66.666% - .25rem );
31523156
}
31533157

31543158
.field-kit__field--quarter {
3159+
flex-basis: calc( 25% - .5625rem );
31553160
width: calc( 25% - .5625rem );
31563161
}
31573162

@@ -3181,12 +3186,24 @@ span.field-kit__provider-logo {
31813186
width: 100%;
31823187
}
31833188

3184-
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--half,
3185-
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--third,
3186-
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--two-thirds,
3189+
/* The share is the basis, not a width flex is free to ignore. `flex-basis:
3190+
8rem` here meant four halves fitted on one line whenever the panel was wide
3191+
enough -- so a subscription's price, its compare-at, its interval and its
3192+
trial all ended up on the same row, and "half" meant nothing. */
3193+
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--half {
3194+
flex: 0 1 calc( 50% - .375rem );
3195+
}
3196+
3197+
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--third {
3198+
flex: 0 1 calc( 33.333% - .5rem );
3199+
}
3200+
3201+
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--two-thirds {
3202+
flex: 0 1 calc( 66.666% - .25rem );
3203+
}
3204+
31873205
.field-kit__repeater--column .field-kit__repeater-fields > .field-kit__field--quarter {
3188-
flex-grow: 1;
3189-
flex-basis: 8rem;
3206+
flex: 0 1 calc( 25% - .5625rem );
31903207
}
31913208

31923209
/* Controls fill the field they sit in. A 20rem default width inside a panel

0 commit comments

Comments
 (0)