Skip to content

Commit b10ee4c

Browse files
authored
fix(ui5-page): correct background-design styles (#2862)
The styles used to rely on the property name backgroundDesign, which is not correct as in the DOM we use the attribute name background-design. In addition, the "Standard" background design is removed, because it's the same as "Solid". As a result the background Design default value is changed from "Standard" to "Solid". BREAKING_CHANGE: The backgroundDesign default value is changed from "Standard" to "Solid".
1 parent 9e409e6 commit b10ee4c

File tree

5 files changed

+16
-29
lines changed

5 files changed

+16
-29
lines changed

packages/fiori/src/Page.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,23 @@ const metadata = {
2626
* <br><br>
2727
* Available options are:
2828
* <ul>
29-
* <li><code>List</code></li>
30-
* <li><code>Solid</code></li>
31-
* <li><code>Standard</code></li> (default)
29+
* <li><code>Solid</code></li> (default)
3230
* <li><code>Transparent</code></li>
31+
* <li><code>List</code></li>
3332
* </ul>
3433
* @type {PageBackgroundDesign}
35-
* @defaultvalue "Standard"
34+
* @defaultvalue "Solid"
3635
* @public
3736
*/
3837
backgroundDesign: {
3938
type: String,
40-
defaultValue: PageBackgroundDesign.Standard,
39+
defaultValue: PageBackgroundDesign.Solid,
4140
},
4241

4342
/**
44-
* Disables vertical scrolling of page content.
45-
* If set to true, there will be no vertical scrolling at all.
46-
*
43+
* Disables vertical scrolling of page content.
44+
* If set to true, there will be no vertical scrolling at all.
45+
*
4746
* @type {Boolean}
4847
* @defaultvalue false
4948
* @public
@@ -65,8 +64,8 @@ const metadata = {
6564
},
6665

6766
/**
68-
* Defines the footer visibility.
69-
*
67+
* Defines the footer visibility.
68+
*
7069
* @type {Boolean}
7170
* @defaultvalue false
7271
* @public

packages/fiori/src/themes/Page.css

+4-8
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,15 @@
6060
}
6161

6262
/* BackgroundDesign */
63-
:host([backgroundDesign="Standard"]) {
64-
background-color: var(--sapBackgroundColor);
63+
:host([background-design="Solid"]) {
64+
background-color: var(--sapBackgroundColor);
6565
}
6666

67-
:host([backgroundDesign="Solid"]) {
68-
background-color: var(--sapBackgroundColor);
69-
}
70-
71-
:host([backgroundDesign="Transparent"]) {
67+
:host([background-design="Transparent"]) {
7268
background-color: transparent;
7369
}
7470

75-
:host([backgroundDesign="List"]) {
71+
:host([background-design="List"]) {
7672
background-color: var(--_ui5_page_list_bg);
7773
}
7874

packages/fiori/src/types/PageBackgroundDesign.js

-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ import DataType from "@ui5/webcomponents-base/dist/types/DataType.js";
77
*/
88
const PageBackgroundDesigns = {
99

10-
/**
11-
* Standard Page background color.
12-
*
13-
* @type {Standard}
14-
* @public
15-
*/
16-
Standard: "Standard",
17-
1810
/**
1911
* Page background color when a List is set as the Page content.
2012
*

packages/fiori/test/pages/Page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</head>
2828

2929
<body style="background-color: var(--sapBackgroundColor);"></body>
30-
<ui5-page id="page" backgroundDesign="List" floating-footer show-footer>
30+
<ui5-page id="page" background-design="List" floating-footer show-footer>
3131
<div slot="header">
3232
<ui5-bar design="Header">
3333
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>

packages/fiori/test/samples/Page.sample.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<section>
2020
<h3>Page with floating footer</h3>
2121
<div class="snippet">
22-
<ui5-page id="page" style="height: 700px; width: 500px" backgroundDesign="List" floating-footer show-footer>
22+
<ui5-page id="page" style="height: 700px; width: 500px" background-design="List" floating-footer show-footer>
2323
<div slot="header">
2424
<ui5-bar design="Header">
2525
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>
@@ -80,7 +80,7 @@ <h3>Page with floating footer</h3>
8080
</ui5-page>
8181
</div>
8282
<pre class="prettyprint lang-html"><xmp>
83-
<ui5-page id="page" backgroundDesign="List" floating-footer show-footer>
83+
<ui5-page id="page" background-design="List" floating-footer show-footer>
8484
<div slot="header">
8585
<ui5-bar design="Header">
8686
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>

0 commit comments

Comments
 (0)