Skip to content

Commit 9b52592

Browse files
committed
Use ember-set-body-class addon to set CSS classes on <body>
1 parent ce9ff85 commit 9b52592

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

app/helpers/add-html-class.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/styles/application.module.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@
2929
box-sizing: border-box;
3030
}
3131

32-
html {
33-
background-color: var(--header-bg-color);
34-
}
35-
3632
html, body {
3733
margin: 0;
3834
}
3935

4036
body {
37+
background-color: var(--header-bg-color);
4138
font-family: var(--font-family);
4239
font-size: 16px;
4340
display: flex;

app/templates/application.hbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@
2525
</button>
2626
{{/if}}
2727
{{#if this.design.useNewDesign}}
28-
{{! template-lint-disable no-curly-component-invocation }}
29-
{{add-html-class class="new-design"}}
28+
{{set-body-class "new-design"}}
3029
{{/if}}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"ember-qunit": "4.6.0",
9393
"ember-resolver": "8.0.2",
9494
"ember-router-scroll": "2.0.2",
95+
"ember-set-body-class": "^1.0.1",
9596
"ember-source": "3.22.0",
9697
"ember-svg-jar": "2.2.3",
9798
"ember-template-lint": "2.14.0",

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6852,6 +6852,13 @@ ember-router-scroll@2.0.2:
68526852
ember-cli-babel "^7.11.1"
68536853
ember-compatibility-helpers "^1.1.2"
68546854

6855+
ember-set-body-class@^1.0.1:
6856+
version "1.0.1"
6857+
resolved "https://registry.yarnpkg.com/ember-set-body-class/-/ember-set-body-class-1.0.1.tgz#94c0126a5fdb1e780e6568f41c443b0c657f5724"
6858+
integrity sha512-W4y36lozFstvrv1XERCghgQx8s7RuyJbnPhM+9PTrdwwLpSEQYLEdeASHgeCLqb6Bz7AQeIbyf++2b7u5jPfTw==
6859+
dependencies:
6860+
ember-cli-babel "^7.22.1"
6861+
68556862
ember-source-channel-url@^2.0.1:
68566863
version "2.0.1"
68576864
resolved "https://registry.yarnpkg.com/ember-source-channel-url/-/ember-source-channel-url-2.0.1.tgz#18b88f8a00b7746e7a456b3551abb3aea18729cc"

0 commit comments

Comments
 (0)