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

The "Bold" icon is not centered #811

Closed
Reinmar opened this issue Feb 5, 2018 · 3 comments
Closed

The "Bold" icon is not centered #811

Reinmar opened this issue Feb 5, 2018 · 3 comments
Assignees
Labels
package:theme-lark type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Feb 5, 2018

image

It's more to the right.

@Reinmar Reinmar added type:bug This issue reports a buggy (incorrect) behavior. package:theme-lark labels Feb 5, 2018
@oleq
Copy link
Member

oleq commented Feb 5, 2018

It's a rendering issue in Chrome. Take a look at this screenshot:
image

In both cases, the pink rectangle is centered in the middle of the green rectangle in the image processor and put as an overlay over the button with an icon.

In the second alignment case, the alignment of the icon is different because the geometry of the toolbar has changed (wrapped items to the next line) which normally would not have any impact. They are the same toolbars.

This is what it looks like in FF (similar to the Chrome wrapped to the 2nd line):

image

And Safari (unlike any of the above):

image

It's the 21st century and we cannot get over CSS.

I suspect the cause of the issue is the inline-block positioning used for various elements, which depends on the font rendering engine of the web browser, which then is unique and not quite in line with the geometry is certain situations.

Some more reliable positioning strategies (block, inline-flex – they have been researched in #645) caused other issues with misalignment and responsiveness. It's a very tricky topic when you expect:

  • the UI to be responsive (to the font size),
  • all things to be aligned and perfectly centered,
  • buttons with just icons to always stay square and of the same height as buttons with text.

@dkonopka
Copy link
Contributor

dkonopka commented Feb 12, 2018

Besides of browser rendering issues, the bold icon needs to be fixed (current size is 11.57px x 13.93px). I've rounded it and looks much better.

screen shot 2018-02-12 at 15 52 53

@Reinmar
Copy link
Member Author

Reinmar commented Feb 12, 2018

Will you do a PR?

@oleq oleq added this to the iteration 14 milestone Feb 13, 2018
oleq added a commit to ckeditor/ckeditor5-basic-styles that referenced this issue Feb 13, 2018
Fix: The bold icon should be centered in the view box. Closes ckeditor/ckeditor5#811.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:theme-lark type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants