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

[Segment] Introducing stackable horizontal segments #398

Merged
merged 2 commits into from
Jan 28, 2019

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Jan 15, 2019

Description

Added stackable variant to horizontal segments to make those segments wrap if needed

Testcase

http://jsfiddle.net/tmxLgno1/2/
Remove CSS to see usual behavior without stackable support

Screenshot

Normal behavior: .ui.horizontal.segments

image

New behavior: .ui.stackable.horizontal.segments

image

@lubber-de lubber-de added type/feat Any feature requests or improvements lang/css Anything involving CSS state/awaiting-reviews Pull requests which are waiting for reviews state/awaiting-docs Pull requests which need doc changes/additions labels Jan 15, 2019
@lubber-de lubber-de added this to the 2.7.x milestone Jan 15, 2019
y0hami
y0hami previously approved these changes Jan 16, 2019
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

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

LGTM

@ko2in
Copy link
Member

ko2in commented Jan 16, 2019

There is an issue with the left border with this change.

fomantic ui sandbox jsfiddle

The left border will need to remove for every first segment in a row.

@y0hami
Copy link
Member

y0hami commented Jan 16, 2019

@ko2in @lubber-de this will be due to the horizontal divider still being applied.

@y0hami y0hami added the state/on-hold Issues and pull requests which are on hold for any reason label Jan 16, 2019
@lubber-de
Copy link
Member Author

lubber-de commented Jan 16, 2019

@ko2in @hammy2899
Unfortunately, you cannot determine, if an element has wrapped by flex-wrap, but for usual horizontal segments the left border of the first segment is removed by default, causing the visual issue

ui.horizontal.segments > .segment:first-child {
    border-left: none;
}

I suggest not doing this for stackable horizontal segments , then at least it looks consistent again

image

@lubber-de
Copy link
Member Author

@ko2in @hammy2899 changed it accordingly

@lubber-de lubber-de removed the state/on-hold Issues and pull requests which are on hold for any reason label Jan 16, 2019
@ko2in
Copy link
Member

ko2in commented Jan 16, 2019

@lubber-de Using pseudo element ::after could also solve this problem. It even gives the same look for both left and right border of the segment wrapper.

You can check in this fiddle.

@lubber-de
Copy link
Member Author

lubber-de commented Jan 16, 2019

@ko2in Very nice visual trick to cover that border 👌 , but only if the background has exactly the same color for every segment inside. Also the top and bottom border should not get covered (overlays the vertical dividers by one pixel)
In most of the cases the background might stay white anyway, but i would not force a white covering border (which would need to force a white default background also) for the whole group.
If the background changes or a color like inverted red is used in one of the segments this get's a bit weird. In any of that case you won't recognize the slighly bolder left border anyway

http://jsfiddle.net/Lpavt5ek/1/
http://jsfiddle.net/Lpavt5ek/2/

@ko2in
Copy link
Member

ko2in commented Jan 16, 2019

@lubber-de Yes. Not perfect with background. Your fix might be more suitable for this reason.

Copy link
Member

@ColinFrick ColinFrick left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

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

LGTM

@y0hami y0hami merged commit c391574 into fomantic:develop Jan 28, 2019
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Jan 28, 2019
@lubber-de lubber-de deleted the wrapping_horizontal_segment branch January 28, 2019 13:57
@lubber-de lubber-de modified the milestones: 2.7.x, 2.7.2 Jan 28, 2019
@lubber-de lubber-de added the state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo label Jan 28, 2019
@lubber-de lubber-de removed the state/awaiting-docs Pull requests which need doc changes/additions label Jan 28, 2019
@y0hami y0hami mentioned this pull request Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants