Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Buttons] Wrapping of buttons inside a group #2157

Closed
AllanJard opened this issue Nov 12, 2021 · 2 comments
Closed

[Buttons] Wrapping of buttons inside a group #2157

AllanJard opened this issue Nov 12, 2021 · 2 comments
Assignees
Labels
lang/css Anything involving CSS type/feat Any feature requests or improvements
Milestone

Comments

@AllanJard
Copy link

This request stems from a bug report in Semantic UI's repo.

Feature Request

I've noticed that when using button groups inside a grid cell, if there are enough buttons (or enough text in them), rather than wrapping to the next line, they will overflow adjoining cells.

Example

The effect of this with can be seen with Fomantic UI in this JSFiddle: https://jsfiddle.net/36x2csbt/ .

Screenshot (if possible)

image

Possible solution

In the can of "normal" buttons the solution is simply to use:

.ui.buttons {
  flex-wrap: wrap;
}

Example: https://jsfiddle.net/36x2csbt/1/

However, for basic buttons, I don't have quite such a simple solution. basic buttons use an rgba border, and the top / bottom border comes from the container. So wrapping the cells means we need a top / bottom border in order to separate them which complicates the CSS a bit:

.ui.buttons {
  flex-wrap: wrap;
}

.ui.basic.buttons {
  border-bottom: none;
}

.ui.basic.buttons .ui.button {
  border-bottom: 1px solid rgba(34,36,38,.15);
  margin-bottom: -1px;
}

.ui.basic.buttons .ui.button:hover {
  background: transparent !important;
}

But it does appear to be fairly effective: https://jsfiddle.net/36x2csbt/3/ .

@AllanJard AllanJard added state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/feat Any feature requests or improvements labels Nov 12, 2021
@lubber-de lubber-de removed the state/awaiting-triage Any issues or pull requests which haven't yet been triaged label Nov 12, 2021
@lubber-de lubber-de self-assigned this Nov 12, 2021
@lubber-de lubber-de added this to the 2.9.x milestone Nov 12, 2021
@lubber-de lubber-de added the lang/css Anything involving CSS label Nov 12, 2021
@lubber-de lubber-de modified the milestones: 2.9.x, 2.9.0 Jan 25, 2022
@lubber-de
Copy link
Member

lubber-de commented Jan 30, 2022

Implemented by #2217 😊 by new wrapping variant
See your adjusted jsfiddle here https://jsfiddle.net/lubber/p1gxwqv5/2/

Also works with basic just fine now

@lubber-de lubber-de added state/has-pr An issue which has a related PR open tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build and removed state/has-pr An issue which has a related PR open labels Jan 30, 2022
@AllanJard
Copy link
Author

Brilliant - thank you :)

@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS type/feat Any feature requests or improvements
Projects
None yet
Development

No branches or pull requests

2 participants