Skip to content

Commit 810ed0e

Browse files
authored
Misc. layout adjustments (#1849)
* Increase horizontal container padding * Slightly reduce cloud space * Tweaks to Sky Nav spacing * Slightly reduce max container padding * Other misc. sizing tweaks
1 parent 0b9d528 commit 810ed0e

File tree

8 files changed

+23
-20
lines changed

8 files changed

+23
-20
lines changed

.changeset/fifty-terms-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': major
3+
---
4+
5+
Adjusted breakpoints, max-widths and padding sizes of all full-width patterns (most notably the Container and Deck objects and the Sky Nav component) to better compose actual site content.

src/components/cloud-cover/cloud-cover.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ $_gap: ms.step(1);
2424
/// crunch those numbers together.
2525
///
2626
/// @param {Number} $amount [1] - Optional multiplier for default space.
27-
/// @param {Number} $vh [14vh] - Amount of horizontal space in the result.
28-
/// @param {Number} $vw [14vw] - Amount of vertical space in the result.
27+
/// @param {Number} $vh [12vh] - Amount of horizontal space in the result.
28+
/// @param {Number} $vw [3vw] - Amount of vertical space in the result.
2929
/// @return {Calc}
3030
/// @access private
3131

32-
@function _cloud-space($amount: 1, $vh: 14vh, $vw: 4vw) {
32+
@function _cloud-space($amount: 1, $vh: 12vh, $vw: 3vw) {
3333
@if $amount == 1 {
3434
@return calc(#{$vh} + #{$vw});
3535
}

src/components/sky-nav/sky-nav.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $_label-pad-vertical: ms.step(-9);
4545

4646
// Use the widest standard layout `max-width` plus buffer for horizontal space
4747
$_max-width: #{unit.strip(size.$max-width-spread) +
48-
unit.strip($_space-horizontal * 2)}em;
48+
unit.strip($_space-horizontal * 3)}em;
4949

5050
// Height of masthead on small screens.
5151
$_masthead-height-sm: ms.step(7);
@@ -153,20 +153,22 @@ $_masthead-height-sm: ms.step(7);
153153
* The logo link element.
154154
*
155155
* 1. We apply whitespace to this element directly so its hit area is larger
156-
* than it would be if whitespace were applied to the parent element.
156+
* than it would be if whitespace were applied to the parent element. We use
157+
* a bit less space for the logo since it has circular edges that feels
158+
* misaligned when only the curves touch the edges.
157159
* 2. Prevents Flexbox squashing when menu items overflow.
158160
*/
159161
.c-sky-nav__logo {
160162
align-items: center;
161163
block-size: 100%; /* 1 */
162164
display: flex;
163165
flex: none; /* 2 */
164-
padding: 0 $_space-horizontal; /* 1 */
166+
padding: 0 math.div($_space-horizontal, 1.5); /* 1 */
165167

166168
@media (min-width: $_breakpoint-wide) {
167169
block-size: auto;
168170
display: block;
169-
padding: $_space-vertical $_space-horizontal; /* 1 */
171+
padding-block: $_space-vertical; /* 1 */
170172
}
171173
}
172174

src/components/sky-nav/sky-nav.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
@see https://github.com/twigjs/twig.js/issues/262
8282
#}
8383
{% if include_main_demo %}
84-
<main class="o-container u-pad-1" id="{{ main_id }}">
84+
<main class="o-container o-container--pad" id="{{ main_id }}">
8585
<div class="o-container__content">
8686
<p>Hello world! This is the main content.</p>
8787
</div>

src/prototypes/speaking-listing/example/example.twig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
tag_name: 'h2',
2828
content: 'Future Events',
2929
} only %}
30-
{% embed '@cloudfour/objects/deck/deck.twig' with {
31-
class: 'o-deck--3-column@l'
32-
} %}
30+
{% embed '@cloudfour/objects/deck/deck.twig' %}
3331
{% block content %}
3432
{% for item in future %}
3533
<a href="#" class="media-link">
@@ -55,9 +53,7 @@
5553
tag_name: 'h2',
5654
content: 'Our Talks',
5755
} only %}
58-
{% embed '@cloudfour/objects/deck/deck.twig' with {
59-
class: 'o-deck--3-column@l'
60-
} %}
56+
{% embed '@cloudfour/objects/deck/deck.twig' %}
6157
{% block content %}
6258
{% for item in speaking %}
6359
{% embed '@cloudfour/components/card/card.twig' with {

src/tokens/size/padding.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ module.exports = {
2020
container: {
2121
horizontal: {
2222
min: {
23-
value: modularRem(-1),
23+
value: modularRem(1),
2424
comment:
2525
'Minimum inline (horizontal) fluid padding for container objects.',
2626
},
2727
max: {
28-
value: modularRem(3),
28+
value: modularRem(5),
2929
comment:
3030
'Maximum inline (horizontal) padding for container objects.',
3131
},

src/tokens/size/shirts.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"s": { "value": "30em" },
55
"m": { "value": "40em" },
66
"l": { "value": "60em" },
7-
"xl": { "value": "80em" },
8-
"xxl": { "value": "100em" },
9-
"xxxl": { "value": "120em" }
7+
"xl": { "value": "72em" },
8+
"xxl": { "value": "84em" },
9+
"xxxl": { "value": "96em" }
1010
}
1111
}

src/tokens/size/sizing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
width: {
2626
card_column: {
2727
min: {
28-
value: '15em',
28+
value: '16em',
2929
comment: 'The minimum space to display a default card in a grid.',
3030
},
3131
},

0 commit comments

Comments
 (0)