Skip to content

Adjust right margins for buttons that are set at 25%, 50%, and 75% widths #28468

Closed

Description

@kjellr

When a user combines button blocks of varying preset widths (25%, 50%, 75%), they will never actually take up 100% of the available space. There's always an extra margin on the right side:

Screen Shot 2021-01-25 at 12 01 40 PM

This may get pretty unweildy, but we should work out a way to ensure that various combinations of these blocks end up taking up the full 100% width when placed together.

Related: #28467

Activity

  1. added
    [Type] Bug
    [Block] Buttons
    CSS Styling
    on Jan 25, 2021
  2. carolinan commented on Jan 28, 2021

    @carolinan
    Contributor

    When the buttons block is centered, and you add one 75% button followed by 50% and 25%, it is easy to see that the right margin makes the positioning uneven.

  3. laras126 commented on Feb 11, 2021

    @laras126
    Contributor

    This was tested and verified in the #core-css Slack bug scrub! One idea - what about using the gap property with a feature query? gap is not supported in IE11 or Safari, but perhaps it would be okay to use a progressive enhancement approach for this?

    More about gap here. One thing to be aware of is partial support which breaks the feature query in Chromium, but I haven't verified if this is an issue (I encountered it over a year ago).

  4. kjellr commented on Feb 19, 2021

    @kjellr
    ContributorAuthor

    Thanks for the recommendation, @laras126! I gave that a try in #29165. I left the existing implementation there as a fallback, but didn't encounter any issues in either Safari or Chrome — they seem to see and use the column-gap alternative just fine. 👍

  5. added
    [Status] In Progress
    on Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CSS Styling[Block] Buttons[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions