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] secondary segment has wrong top border #364

Closed
y0hami opened this issue Jan 7, 2019 · 4 comments
Closed

[Segment] secondary segment has wrong top border #364

y0hami opened this issue Jan 7, 2019 · 4 comments
Assignees
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@y0hami
Copy link
Member

y0hami commented Jan 7, 2019

Bug Report

Expected result

Secondary segment should have a consistent border

Actual result

The top border is thicker and darker

Testcase

https://jsfiddle.net/ptu8ky0r/

https://fomantic-ui.com/elements/segment.html#emphasis

Version

2.7.1

@y0hami y0hami added type/bug Any issue which is a bug or PR which fixes a bug lang/css Anything involving CSS tag/help-wanted Issues which need help to fix or implement tag/good-first-issue Good issues for new starters to try labels Jan 7, 2019
@y0hami y0hami added this to the 2.7.2 milestone Jan 7, 2019
@etshy
Copy link

etshy commented Jan 7, 2019

You sure it wasn't intentional ?

I was sure it was like that for the segment to be "more noticeable".

Also the CSS rule that cause this is quite weird:

.ui.secondary.segment.segment.segment.segment.segment:not(.inverted) {
    border-top: 2px solid rgba(0, 0, 0, 0.6);
}

Why there are that much .segment ? is that part of why it has to be fixed ?

btw, just removing that rule seem enough to fix the issue.

Edit : just saw after some research that there is "conflict" between the secondary color and the secondary emphasis.

Maybe adding the emphasis class or something like that and "remove" the top-border on this class could fix it.

Like

.ui.secondary.emphasis:not(.inverted) {
    border-top: 1px solid rgba(34, 36, 38, 0.15);
}

But the multple .segment that comes from the each(@colors ... could overwrite that.

Why is there so much .segment in this part ?

each(@colors,{
  @color: replace(@key,'@','');
  @c: @colors[@@color][color];
  .ui.@{color}.segment.segment.segment.segment.segment:not(.inverted) {
    border-top: @coloredBorderSize solid @c;
  }
  .ui.inverted.@{color}.segment.segment.segment.segment.segment {
    background-color: @c;
    color: @white;
  }
})

I don't know really LESS so maybe it's necessary (or it's just to add "importance" to the rule ?)

@lubber-de lubber-de self-assigned this Jan 7, 2019
@lubber-de
Copy link
Member

@etshy This happened, because secondary is also part of the global color palette, but secondary segment is meant differently here...
I'll fix this by dropping support for secondary as a color for segment to gain the previous behavior.

Btw: The reason for so many .segment is to increase specificity and avoid !important

PR with the fix coming up next... 🙂 :

@etshy
Copy link

etshy commented Jan 7, 2019

This happened, because secondary is also part of the global color palette, but secondary segment is meant differently here...

Yep, that's what I thought and maybe poorly explained ^^"

But if you drop secondary as a color, shouldn't you drop primary too ?
It could be weird to have a primary but no secondary` or more, no ?

Btw: The reason for so many .segment is to increase specificity and avoid !important

Yeah I thought it could be that.

@lubber-de
Copy link
Member

lubber-de commented Jan 7, 2019

@etshy Good point removing primary from color creation in segment aswell (had to, there was undocumented CSS for a primary segment 😲 )
See #366 for details.
It's fixed in upcoming 2.7.2 🙂

@lubber-de lubber-de removed tag/good-first-issue Good issues for new starters to try tag/help-wanted Issues which need help to fix or implement labels Jan 7, 2019
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jan 11, 2019
@y0hami y0hami closed this as completed in cd75067 Feb 5, 2019
@y0hami y0hami removed tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build labels Feb 27, 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 type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants