Skip to content

Commit 3593437

Browse files
committed
fix(update based on pr feedback): spoke to mr nash, he was correct about everything
affects: @buildit/gravity-ui-web
1 parent ae2b09b commit 3593437

File tree

5 files changed

+14
-27
lines changed

5 files changed

+14
-27
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,11 @@ After an initial clone, or if any of the packages' dependencies have changed you
2222

2323
```
2424
npm install
25-
lerna bootstrap
25+
npm lerna:bootstrap
2626
```
2727

2828
This will install dependencies for all packages in the repo and configure any local cross-references between them.
2929

30-
You may need to install [Lerna](https://lerna.js.org/) globally using:
31-
32-
```
33-
npm lerna:bootstrap
34-
```
35-
3630
### Local dev
3731

3832
Typically, updating Gravity involves changing multiple packages - e.g. adding or modifying Nunjucks templates in `gravity-ui-nunjucks` while also editing the corresponding SASS code in `gravity-ui-web`. The most convenient way to work is therefore to run the following **in the repo's root directory**:

packages/gravity-ui-web/src/sass/00-settings/_modularscale-settings.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ $modularscale: ( // Note: We must *only* alter the ratio across breakpoints here
1414
// We will be using this to generate CSS custom props for scaling
1515
// the base font-size
1616

17-
ratio: $augmented-fourth,
17+
ratio: $minor-third,
1818
base: $grav-font-size-smallest-viewport,
1919

20-
$grav-breakpoint-smallest: (ratio: $augmented-fourth,
20+
$grav-breakpoint-smallest: (ratio: $minor-third,
2121
base: $grav-font-size-smallest-viewport,
2222
),
2323

24-
$grav-breakpoint-largest: (ratio: $fifth,
24+
$grav-breakpoint-largest: (ratio: $major-third,
2525
base: $grav-font-size-largest-viewport,
2626
));
2727
/* stylelint-enable scss/dollar-variable-pattern */

packages/gravity-ui-web/src/sass/03-elements/_headings.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ h5,
66
h6 {
77
font-weight: grav-font-weight('primary', 'bold');
88
line-height: $grav-line-height-title;
9+
letter-spacing: -0.025em;
910
}
1011

1112
h1 {

packages/gravity-ui-web/src/sass/05-components/03-organisms/00-page-structure/_00-page-header.scss

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ $grav-page-heading-trigger-breakpoint: grav-breakpoint(medium);
55
// is in case we want to give it any kind of full-bleed background styling.
66
// The child elements within therefore need to respect the maximum content
77
// width ($grav-page-content-max-width) themselves, where necessary.
8-
body > header,
8+
body>header,
99
.grav-c-page-header {
10-
position: sticky;
11-
top: 0;
1210
margin-top: -1 * $grav-sp-page-content-inset;
13-
z-index: 1000;
1411

15-
> div {
12+
>div {
1613
display: flex;
1714
flex-wrap: wrap;
1815
padding-top: $grav-sp-m;
@@ -33,8 +30,8 @@ body > header,
3330
}
3431

3532
/* stylelint-disable-next-line selector-max-compound-selectors */
36-
&[aria-pressed] ~ .grav-c-nav-menu,
37-
&[aria-pressed='false'] ~ .grav-c-nav-menu {
33+
&[aria-pressed]~.grav-c-nav-menu,
34+
&[aria-pressed='false']~.grav-c-nav-menu {
3835
@include grav-transition(max-height, $grav-tr-speed-slow);
3936
max-height: 0;
4037
overflow: hidden;
@@ -48,7 +45,7 @@ body > header,
4845
}
4946

5047
/* stylelint-disable-next-line selector-max-compound-selectors */
51-
&[aria-pressed='true'] ~ .grav-c-nav-menu {
48+
&[aria-pressed='true']~.grav-c-nav-menu {
5249
max-height: 100vh;
5350

5451
@media (min-width: $grav-page-heading-trigger-breakpoint) {
@@ -69,7 +66,7 @@ body > header,
6966
}
7067

7168
// Special rule for adjacent elements
72-
+ * {
69+
+* {
7370
// This creates a gap equivalent to $grav-sp-vertical-gap-l applied to an element that has
7471
// the base font size, regardless of what the element's actual font-size is. This ensures
7572
// a consistent gap between the page header and the first item that follows it, regardless
@@ -122,11 +119,11 @@ body > header,
122119
// Header within a full-bleed body, should use its DIV
123120
// as a content container
124121
/* stylelint-disable-next-line selector-no-qualifying-type */
125-
body.grav-o-full-bleed > header,
122+
body.grav-o-full-bleed>header,
126123
.grav-o-full-bleed .grav-c-page-header {
127124
margin-top: 0;
128125

129-
> div {
126+
>div {
130127
@include grav-l-container;
131128
}
132129
}

packages/gravity-ui-web/src/sass/05-components/03-organisms/_hero.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,10 @@
2929
margin: (-1 * $container-vertical-shift) auto 0;
3030
padding: $container-vertical-shift $grav-sp-m $grav-sp-m $grav-sp-m;
3131

32-
> * {
32+
>* {
3333
max-width: $grav-page-content-max-width - ($container-horizontal-max-margin * 2) - ($container-horizontal-max-inset * 2);
3434
margin-right: auto;
3535
margin-left: auto;
3636
}
37-
38-
h1 {
39-
max-width: $grav-page-content-max-width - ($container-horizontal-max-margin * 2);
40-
line-height: 100%;
41-
}
4237
}
4338
}

0 commit comments

Comments
 (0)