Skip to content

Commit f94a3ca

Browse files
authored
fix: lower page common specificity (#124)
* fix: lower page common specificity * fix: tidier specificity lower of default project types * feat: fix merge not found and placeholder
1 parent 73284df commit f94a3ca

File tree

7 files changed

+39
-83
lines changed

7 files changed

+39
-83
lines changed

src/index.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
place from the start. In most case, avoid loading styles
2020
from the JavaScript. */
2121
@use 'layouts/page-layout';
22-
@use 'pages/not-found/not-found';
23-
@use 'pages/placeholder/placeholder';
2422
@use 'pages/welcome/welcome';
2523
@use 'pages/dashboard/dashboard';
2624
@use 'components/commonHeader/commonHeader';

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/not-found/not-found.scss

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

src/pages/placeholder/placeholder.scss

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

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)