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] Stacked loading segment doesn't work #701

Closed
GammaGames opened this issue Apr 26, 2019 · 6 comments
Closed

[Segment] Stacked loading segment doesn't work #701

GammaGames opened this issue Apr 26, 2019 · 6 comments
Labels
lang/css Anything involving CSS state/wont-fix Anything which isn't going to be fixed

Comments

@GammaGames
Copy link
Contributor

Bug Report

Steps to reproduce

  1. Create stacked loading segment
  2. Notice how it is not stacked
  3. Also notice that the text is not greyed-out

Expected result

Stacked loading segment

Actual result

Non-stacked, semi-loading segment

Testcase

https://jsfiddle.net/Lxc6yr7v/

Screenshot (when possible)

image

Version

2.7.4

@prudho prudho added type/bug Any issue which is a bug or PR which fixes a bug lang/css Anything involving CSS labels Apr 26, 2019
@lubber-de
Copy link
Member

Unfortunately this isn't going to work because the stacked (and also piled) effect is done by making use of the :before and :after pseudo elements. The same pseudo elements are also used to create the loading circle, so having both in one element cannot work.
However there is, for example, a workaround by wrapping your stacked segment around a basic loading segment (yes, there is additional padding, but this could be adjusted manually)
See https://jsfiddle.net/m3yqwxou/

@lubber-de lubber-de added state/wont-fix Anything which isn't going to be fixed and removed type/bug Any issue which is a bug or PR which fixes a bug labels Apr 26, 2019
@GammaGames
Copy link
Contributor Author

Ah, okay. I had seen the report from Semantic-Org/Semantic-UI/issues/6796 and thought I'd put it here since fomantic and semantic looked different.

The padding would be less of an issue if we implemented Semantic-Org/Semantic-UI/issues/6117 too, the bot closed it on me

@lubber-de
Copy link
Member

@GammaGames Well...#702 😉

@GammaGames
Copy link
Contributor Author

That was fast!

All the rules make me think though, would it be worth it to make more general css to follow BEM better? Instead of having a fitted segment and fitted item we could have a general fitted class that applies the rule to whatever you apply the class to. Other classes (like size modifiers) might be trickier to do though, it might have to look something like this:

:root {
  --font-size: 1rem;
}

.small {
  font-size: calc(var(--font-size) * 0.9);
}
.tiny {
  font-size: calc(var(--font-size) * 0.8);
}
.mini {
  font-size: calc(var(--font-size) * 0.7);
}

Tests could be automatically generated using combinations of the lists of blocks, elements, and blocks and might end up being more exhaustive, though harder to verify.
(This discussion might be better on #319)

@lubber-de
Copy link
Member

You are basically right, but it's definately a topic and goal for 3.x as this needs heavy refactoring

@exoego
Copy link
Contributor

exoego commented May 1, 2019

I'll close this issue since this has a workaround suggested in #701 (comment) and labeled as wontfix.

@exoego exoego closed this as completed May 1, 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/wont-fix Anything which isn't going to be fixed
Projects
None yet
Development

No branches or pull requests

4 participants