Reputation: 1098
I would like to know if anyone faces this issue of awkward padding between the table and header of sap.f.DynamicPage
:
Upvotes: 2
Views: 4458
Reputation: 18054
There is nothing "incorrect" about the padding between the header and the content. It's the intended design which can be seen in the source code:
.sapFDynamicPageContent/*, ...*/ { //... padding: 2rem 3rem 0 3rem; }
This shouldn't be changed if you're following Fiori design guidelines or if the app is supposed to be running on FLP. Please, avoid using custom CSS to remove the padding as mentioned in the documentation:
SAP Fiori launchpad apps should not override styles.
What we can and should, however, is to align the table with the header content by removing the side padding shown below:
This can be achieved by adding the predefined CSS class sapFDynamicPageAlignContent
to the table with the width: auto
. E.g. in XMLView:
<Table class="sapFDynamicPageAlignContent" width="auto">
The SAP Fiori Design guidelines require that the
DynamicPageHeader
's content and theDynamicPage
's content are aligned vertically. When using sap.ui.layout.form.Form, sap.m.Panel, sap.m.Table and sap.m.List in the content area ofDynamicPage
, you need to adjust their left text offset to achieve the vertical alignment. To do this, apply thesapFDynamicPageAlignContent
CSS class to them and set theirwidth
property toauto
. [src]
Here is an example: https://openui5nightly.hana.ondemand.com/#/sample/sap.f.sample.DynamicPageFreeStyle/preview
Apart from the above mentioned guidelines, sap.f.DynamicPage
now supports the following padding classes:
sapUiNoContentPadding
sapUiContentPadding
sapUiResponsiveContentPadding
E.g.: Applying this completely removes the surrounding padding:
<f:DynamicPage class="sapUiNoContentPadding">
Upvotes: 1
Reputation: 467
I think it's by design:
actually it's the padding of the content.
With custom CSS you can decrease padding:
.sapFDynamicPageContent {
padding-top: 0;
}
Upvotes: 0