Skip to content

Commit cd0375f

Browse files
committed
fix(app-with-router): set .goto-active as global css class when using css-module
closes aurelia/aurelia#828
1 parent d50931c commit cd0375f

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

app-with-router/src/my-app.css__if_css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ a:hover {
1313
background-color: darkgray;
1414
}
1515

16+
// @if css-module
17+
/* When using css-module, set .goto-active
18+
as a global class name */
19+
:global(.goto-active) {
20+
// @endif
21+
// @if !css-module
1622
.goto-active {
23+
// @endif
1724
background-color: lightgray;
1825
}

app-with-router/src/my-app.less__if_less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ a {
1313
}
1414
}
1515

16+
// @if css-module
17+
/* When using css-module, set .goto-active
18+
as a global class name */
19+
:global(.goto-active) {
20+
// @endif
21+
// @if !css-module
1622
.goto-active {
23+
// @endif
1724
background-color: lightgray;
1825
}

app-with-router/src/my-app.scss__if_sass

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ a {
1313
}
1414
}
1515

16+
// @if css-module
17+
/* When using css-module, set .goto-active
18+
as a global class name */
19+
:global(.goto-active) {
20+
// @endif
21+
// @if !css-module
1622
.goto-active {
23+
// @endif
1724
background-color: lightgray;
1825
}

0 commit comments

Comments
 (0)