SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.23k forks source link

Regarding two same css selectors but with different padding value #3660

Closed TianyangZhao closed 1 year ago

TianyangZhao commented 1 year ago

OpenUI5 version: 1.107.0

Browser/version (+device/version): All

Any other tested browsers/devices(OK/FAIL): Fail

URL (minimal example if possible):

The related URL for the CSS file is attached down below.

  1. https://sapui5.hana.ondemand.com/1.107.0/resources/sap/m/themes/sap_fiori_3_dark/library_skeleton.css?version=1.107.1&sap-ui-dist-version=1.107.0

You could find two same CSS Selectors with different padding value in the file which are

.sapMTB-Transparent-CTX.sapMTB {
    padding-left: 0.75rem
}

.sapMTB-Transparent-CTX.sapMTB {
    padding-left: 1rem
}

This causes the button to be not in the correct position, and the padding-left is currently 1rem.

Screenshot 2022-11-15 at 15 44 34

However, there is only one CSS Selector (.sapMTB-Transparent-CTX.sapMTB) and the padding-left value is 0.75 in version 1.106

.sapMTB-Transparent-CTX.sapMTB {
    padding-left: 0.75rem
}

Related url: https://sapui5.hana.ondemand.com/1.106.0/resources/sap/m/themes/sap_fiori_3_dark/library_skeleton.css?version=1.106.1&sap-ui-dist-version=1.106.0

What is the expected result? The padding-left for the CSS selector mentioned above could be 0.75rem. Then the The button's position can be correct as the results are shown below

Screenshot 2022-12-01 at 15 30 19

What happens instead? An overlapping area could appear.

Screenshot 2022-11-15 at 15 44 34
NHristov-sap commented 1 year ago

Hi @TianyangZhao ,

Please provide working snippet that demonstrates the issue. Debugging screenshots rarely leads to positive results.

Best Regards, Nikolay Hristov

codeworrior commented 1 year ago

The selector .sapMTB-Transparent-CTX.sapMTB is defined twice, once in sap/m/themes/base/Toolbar.less und once in sap/m/themes/sap_fiori_3_dark/Toolbar.less.

The padding-left value in the second occurrence recently has been changed multiple times:

As each of the commits mentions the visual specification, I assume control colleagues are at least aware of the topic.

NHristov-sap commented 1 year ago

Hello @TianyangZhao,

Thank you for sharing this finding. I've created an internal incident 2280186970. The status of the issue will be updated here in GitHub.

Regards, Nikolay Hristov

PetyaMarkovaBogdanova commented 1 year ago

Hi @TianyangZhao , regarding multiple fixes in the control CSS parameters, we discussed different ways to fulfil the specification, and also to be dynamic when it comes to different items, that can be contained and distance between them. Is there an actual issue, that is caused by the changed padding in Toolbar, that you need to be fixed fro our team? Thank you!

Best regards, Petya Markova. (UI5 Developer)

PetyaMarkovaBogdanova commented 1 year ago

I am closing the issue due to inactivity.