Skip to content

Commit 4cb4053

Browse files
committed
fix: tidier specificity lower of default project types
1 parent 68bc922 commit 4cb4053

File tree

4 files changed

+30
-46
lines changed

4 files changed

+30
-46
lines changed

src/layouts/page-layout.scss

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,38 @@
4141
@include carbon-content-overrides;
4242
}
4343

44-
.cs--page-layout-content {
44+
@mixin default-project-type() {
45+
h1,
46+
dd {
47+
@include type-style('heading-07');
48+
49+
margin-block-end: $spacing-08;
50+
}
51+
52+
h3 {
53+
margin-block-end: $spacing-05;
54+
}
55+
56+
p,
57+
dt {
58+
margin-block-end: $spacing-05;
59+
margin-inline-end: $spacing-08;
60+
}
61+
62+
dt {
63+
@include type-style('label-02');
64+
}
65+
}
66+
67+
:where(.cs--page-layout-content) {
68+
// low specificity to make it easier to override defaults
4569
@include default-type;
4670

71+
// after Carbon default type
72+
@include default-project-type;
73+
}
74+
75+
.cs--page-layout-content {
4776
// These following styles size the content area and move the scroll
4877
// from the body to this content area
4978
block-size: calc(100vh - $spacing-09);

src/pages/_page-common.scss

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

src/pages/dashboard/dashboard.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
@use '@carbon/react/scss/grid' as *;
99
@use '@carbon/react/scss/spacing' as *;
1010
@use '@carbon/react/scss/type' as *;
11-
@use '../page-common' as common;
12-
13-
.cs--dashboard {
14-
@include common.page-common;
15-
}
1611

1712
.cs--dashboard__tile {
1813
margin-block: $spacing-05;

src/pages/welcome/welcome.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
@use '@carbon/react/scss/spacing' as *;
99
@use '@carbon/react/scss/type' as *;
1010
@use '@carbon/react/scss/breakpoint' as *;
11-
@use '../page-common' as common;
12-
13-
.cs--welcome {
14-
@include common.page-common;
15-
}
1611

1712
.cs--welcome__about {
1813
margin-block-start: $spacing-07;

0 commit comments

Comments
 (0)