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

fix(ui5-page): correct background-design styles #2862

Merged
merged 2 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions packages/fiori/src/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,23 @@ const metadata = {
* <br><br>
* Available options are:
* <ul>
* <li><code>List</code></li>
* <li><code>Solid</code></li>
* <li><code>Standard</code></li> (default)
* <li><code>Solid</code></li> (default)
* <li><code>Transparent</code></li>
* <li><code>List</code></li>
* </ul>
* @type {PageBackgroundDesign}
* @defaultvalue "Standard"
* @defaultvalue "Solid"
* @public
*/
backgroundDesign: {
type: String,
defaultValue: PageBackgroundDesign.Standard,
defaultValue: PageBackgroundDesign.Solid,
},

/**
* Disables vertical scrolling of page content.
* If set to true, there will be no vertical scrolling at all.
*
* Disables vertical scrolling of page content.
* If set to true, there will be no vertical scrolling at all.
*
* @type {Boolean}
* @defaultvalue false
* @public
Expand All @@ -65,8 +64,8 @@ const metadata = {
},

/**
* Defines the footer visibility.
*
* Defines the footer visibility.
*
* @type {Boolean}
* @defaultvalue false
* @public
Expand Down
12 changes: 4 additions & 8 deletions packages/fiori/src/themes/Page.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,15 @@
}

/* BackgroundDesign */
:host([backgroundDesign="Standard"]) {
background-color: var(--sapBackgroundColor);
:host([background-design="Solid"]) {
background-color: var(--sapBackgroundColor);
}

:host([backgroundDesign="Solid"]) {
background-color: var(--sapBackgroundColor);
}

:host([backgroundDesign="Transparent"]) {
:host([background-design="Transparent"]) {
background-color: transparent;
}

:host([backgroundDesign="List"]) {
:host([background-design="List"]) {
background-color: var(--_ui5_page_list_bg);
}

Expand Down
8 changes: 0 additions & 8 deletions packages/fiori/src/types/PageBackgroundDesign.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ import DataType from "@ui5/webcomponents-base/dist/types/DataType.js";
*/
const PageBackgroundDesigns = {

/**
* Standard Page background color.
*
* @type {Standard}
* @public
*/
Standard: "Standard",

/**
* Page background color when a List is set as the Page content.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/test/pages/Page.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</head>

<body style="background-color: var(--sapBackgroundColor);"></body>
<ui5-page id="page" backgroundDesign="List" floating-footer show-footer>
<ui5-page id="page" background-design="List" floating-footer show-footer>
<div slot="header">
<ui5-bar design="Header">
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>
Expand Down
4 changes: 2 additions & 2 deletions packages/fiori/test/samples/Page.sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<section>
<h3>Page with floating footer</h3>
<div class="snippet">
<ui5-page id="page" style="height: 700px; width: 500px" backgroundDesign="List" floating-footer show-footer>
<ui5-page id="page" style="height: 700px; width: 500px" background-design="List" floating-footer show-footer>
<div slot="header">
<ui5-bar design="Header">
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>
Expand Down Expand Up @@ -80,7 +80,7 @@ <h3>Page with floating footer</h3>
</ui5-page>
</div>
<pre class="prettyprint lang-html"><xmp>
<ui5-page id="page" backgroundDesign="List" floating-footer show-footer>
<ui5-page id="page" background-design="List" floating-footer show-footer>
<div slot="header">
<ui5-bar design="Header">
<ui5-button icon="home" title="Go home" slot="startContent"></ui5-button>
Expand Down