Support

Account

Home Forums Backend Issues (wp-admin) True/false field stretched on browsers that don’t support width: fit-content

Unread

True/false field stretched on browsers that don’t support width: fit-content

  • Version 6.3.1.2 + Classic Editor (Gutenberg disabled everywhere). Bug does not present in 6.2.7.

    See title – the true/false field with the “Stylized UI” setting enabled stretches to the full width of its parent rather than constrained to its smaller “flipswitch” shape. Previously the .acf-switch class had a display of inline-block, now it is grid, causing it to grow. Compounding this is an inline min-width set on the child elements, .acf-switch-on and .acf-switch-off, meaning setting the .acf-switch back to inline-block alone does not fix the issue. On browsers that don’t support fit-content, the inline value is calculated as much larger than those that do.

    In order to fix this and support the same browsers as before, I suggest changing the min-width to max-width on the .acf-switch-on and .acf-switch-off elements, leaving the inline calculation alone, and using width: max-content as a fallback for width: fit-content.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.