Skip to content

Commit b1c9e7c

Browse files
committed
fix: tidier specificity lower of default project types
1 parent c73c2a4 commit b1c9e7c

File tree

4 files changed

+39
-57
lines changed

4 files changed

+39
-57
lines changed

src/layouts/page-layout.scss

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

44-
.cs--page-layout-content {
44+
@mixin default-project-type() {
45+
* {
46+
/*
47+
text-wrap-style: balance aims to improve typography by creating more visually appealing text blocks.
48+
When text is balanced, the browser attempts to distribute text more evenly across lines,
49+
avoiding situations where you have very long lines followed by very short lines (orphans).
50+
*/
51+
text-wrap-style: balance;
52+
}
53+
54+
h1,
55+
dd {
56+
@include type-style('heading-07');
57+
58+
margin-block-end: $spacing-08;
59+
}
60+
61+
h3 {
62+
margin-block-end: $spacing-05;
63+
}
64+
65+
p,
66+
dt {
67+
margin-block-end: $spacing-05;
68+
margin-inline-end: $spacing-08;
69+
}
70+
71+
dt {
72+
@include type-style('label-02');
73+
}
74+
}
75+
76+
:where(.cs--page-layout-content) {
77+
// low specificity to make it easier to override defaults
4578
@include default-type;
4679

80+
// after Carbon default type
81+
@include default-project-type;
82+
}
83+
84+
.cs--page-layout-content {
4785
// These following styles size the content area and move the scroll
4886
// from the body to this content area
4987
block-size: calc(100vh - $spacing-09);

src/pages/_page-common.scss

Lines changed: 0 additions & 46 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)