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

[Button, Icon] Loading icon Position in Button was not rotating around center #361

Merged

Conversation

lubber-de
Copy link
Member

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

Description

A loading icon within a button was rotated around a wrong anchor position (similiar to the Fix in #336 )

  • The positioning is corrected
  • It is now also supported in labeled icon button (a loading spinner was rotating the background sqare before if you tried it)

Due to the fixes you are now finally able to correctly use loading icons in buttons together with text by either using labeled icon buttonor just icon button.

After fixing it, the used notched circle icon used in the fiddle still looked slightly misaligned. It turned out this is due to the icon in FontAwesome itself not being centered accurately.
To proove this, i added an example in the fiddle below where you can obviously see it. The 100% circle background stays fixed while the spinning icon does not precisely although it`s a 100% square (same pixel height/width/font-size)

Testcase

http://jsfiddle.net/bztsj9wm/3/

Remove the CSS to see the previous wrong behavior

Screenshot

Broken (spinners move around wrong anchor and labeled icon button rotated background color

loading_icon_button_wrong

Fixed, all looks fine 😄

loading_icon_button_fixed

Closes

Semantic-Org/Semantic-UI#3971
Semantic-Org/Semantic-UI#2271
Semantic-Org/Semantic-UI#6124
Semantic-Org/Semantic-UI#916

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/css Anything involving CSS state/awaiting-reviews Pull requests which are waiting for reviews tag/sui-issue Taken from an existing Issue/PR of SUI labels Jan 4, 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

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

@y0hami y0hami removed the state/awaiting-reviews Pull requests which are waiting for reviews label Jan 5, 2019
@y0hami y0hami merged commit 1f71602 into fomantic:develop Jan 5, 2019
@lubber-de lubber-de added this to the 2.7.2 milestone Jan 5, 2019
@lubber-de lubber-de deleted the fix/3971/loading_button_icon_pos branch January 5, 2019 22:28
@y0hami y0hami mentioned this pull request Feb 4, 2019
y0hami pushed a commit that referenced this pull request Apr 5, 2019
The icon padding had to be adjusted for `compact labeled icon button`, because the positioning of the icon was optimized to support loading icons in #361 

Closes #598
exoego pushed a commit to exoego/Fomantic-UI that referenced this pull request Apr 30, 2019
The icon padding had to be adjusted for `compact labeled icon button`, because the positioning of the icon was optimized to support loading icons in fomantic#361 

Closes fomantic#598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS tag/sui-issue Taken from an existing Issue/PR of SUI type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants