Skip to content

Remove btn-block#30376

Closed
ysds wants to merge 2 commits intomainfrom
master-ysds-btn-layout
Closed

Remove btn-block#30376
ysds wants to merge 2 commits intomainfrom
master-ysds-btn-layout

Conversation

@ysds
Copy link
Contributor

@ysds ysds commented Mar 11, 2020

We can now use our new grid system for responsive full width buttons.

This PR:

  • Remove btn-block
  • Add examples of button layouts

Closes #30223
Related: #20617, #13647, #21720

https://deploy-preview-30376--twbs-bootstrap.netlify.com/docs/4.3/components/buttons/#layout

@ysds ysds requested a review from a team as a code owner March 11, 2020 03:45
@ysds ysds force-pushed the master-ysds-btn-layout branch from 8d2b57e to 7cec513 Compare March 11, 2020 03:59
MartijnCuppens
MartijnCuppens previously approved these changes Mar 11, 2020
Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed some documentation tweaks. Want another approval from @mdo or @andresgalante just to be sure.

@MartijnCuppens
Copy link
Member

Maybe wait with this for now. #30380 might unrequire the wrapping divs

@mdo
Copy link
Member

mdo commented Mar 11, 2020

Two wrapping <div>s vs a single class feels like unnecessary work to me for folks to create block-level buttons. Should we instead use utilities as the primary method, and then maybe mention grid for layout?

This is enough to get a full-width button:

<button class="btn btn-primary w-100 mb-2">Submit</button>

And you'd add a display utility if block-level is needed, but in most cases I don't think it will be.

mdo added a commit that referenced this pull request Apr 15, 2020
Alternate fix for #30376, which closes #30223
@mdo mdo changed the base branch from master to main June 16, 2020 20:04
@mdo mdo added the on-hold label Jun 16, 2020
@XhmikosR
Copy link
Member

Not sure what to do with this one @mdo?

@mdo
Copy link
Member

mdo commented Oct 27, 2020

I think we can revisit this now that we have the latest grid work in there. Without extra markup, we can make stacked buttons with a row parent and a .gy-2. Widths could be further controlled by adding a .col-* class to the .row. Thinking we could flesh this quick proof of context out a bit more and then close this if it works out.

Edit: Downside is responsive behavior isn't really supported here :. The .row > * paddings don't give us gutters between the buttons when using anything less than full-width.

Screen Shot 2020-10-26 at 10 02 41 PM

@mdo
Copy link
Member

mdo commented Oct 27, 2020

Tried a few things out, and I'm opting for #31995. Closing this out.

@mdo mdo closed this Oct 27, 2020
@MartijnCuppens MartijnCuppens deleted the master-ysds-btn-layout branch October 27, 2020 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for block buttons based on specific screen widths, eg. btn-xs-block

4 participants