openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.FlexBox center alignment issue in chrome (1.20.4)

Open hschaefer123 opened this issue 12 years ago • 7 comments

Trying to center align sap.m.Link with other widgets, link will always be out of line.

Currently links will be rendered correctly with disabled display: inline-block; that is different to the other widgets like Text, CheckBox, etc.

I do not know the reason but i think it is a small ui issue that can be fixed inside css.

hschaefer123 avatar May 12 '14 15:05 hschaefer123

A jsbin example and/or a screenshot would be really helpful, otherwise everybody trying to analyze this has to build one on their own, which won't really speed up things and increase interest... E.g. it is not clear whether the horizontal or vertical alignment is wrong.

akudev avatar May 12 '14 16:05 akudev

Hi Andreas, see http://jsbin.com/fosox/1/

maybe someone can add 1.20.x also to jsbin, but the issue is still present in 1.18.x.

The Layout issue remains also in firefox. I think it is a general alignment issues with links.

hschaefer123 avatar May 12 '14 17:05 hschaefer123

Issue seems like coming from FlexBox control not from Link. I will talk with the control owner whether flex item wrapper is really needed or not.

aborjinik avatar May 12 '14 22:05 aborjinik

The problem is two-fold: sap.m.Text and sap.m.Link are not harmonized. If you use both inline, the vertical alignment is different. This extends to the described FlexBox scenario because every item is wrapped in a div.

Without the divs the vertical alignment would be fine even without harmonization between Text and Link. However, the wrapping divs were introduced initially because browsers didn't lay out certain HTML elements correctly in a flex context. I don't think they could be easily removed without side effects at this stage. I'll investigate further.

thomaskoetter avatar May 13 '14 11:05 thomaskoetter

Hi hschaefer123, Option to add flex items without wrapping divs has been added to backlog. Text/Link alignment is issue still open.

Best Regards, Martin

machwitt avatar Oct 09 '14 08:10 machwitt

Hi, I asked thomaskoetter for updates on this one. Best Regards, Martin

machwitt avatar Jul 23 '15 14:07 machwitt

It took quite a while, but with a7d13cdb7f1a8869a9958227859a5e279d9639a4 we now have the option to get rid of the wrapping div. Just set the render type to "Bare".

thomaskoetter avatar Sep 07 '16 15:09 thomaskoetter