Skip to content

Commit 6b59e85

Browse files
authored
Fix Ground Nav Feature Width (#2205)
While testing the updated Ground Nav in WordPress, I noticed that if the feature content was too short, and there was only one feature showing, it chould shrink and look odd. This PR remedies that by applying a min-width to the feature container.
1 parent 8f47011 commit 6b59e85

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.changeset/thick-roses-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudfour/patterns": patch
3+
---
4+
5+
Bugfix: This addresses an issue where when a single Ground Nav feature was set with very short content, the feature could appear too narrow.

src/components/ground-nav/ground-nav.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@
7373

7474
/**
7575
* 1. Keep contents from overflowing border-radius
76-
* 2. Used to position the features side-by-side on large screens
76+
* 2. Min width to keep promos with short content from shrinking
77+
* 3. Used to position the features side-by-side on large screens
7778
*/
7879
.c-ground-nav__features-inner {
7980
@include border-radius.conditional;
8081
contain: paint; // 1
82+
min-inline-size: 100%; // 2
8183

8284
@media (width >= breakpoint.$l) {
83-
display: flex; // 2
85+
display: flex; // 3
86+
min-inline-size: size.$max-width-prose; // 2
8487
}
8588
}
8689

src/components/ground-nav/ground-nav.twig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
{% endblock %}
1313
{% endembed %}
1414
<p>
15-
Cloud Four helps organizations solve complex responsive web
16-
design and development challenges every day.
17-
Let's connect so we can tailor a solution to fit your needs.
15+
Cloud Four helps every day.
1816
</p>
1917
</div>
2018
{% embed '@cloudfour/objects/button-group/button-group.twig' only %}

src/utilities/size/demo/block-size.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
full (in a 150px tall container)
55
</div>
66
</div>
7-
<div style="height:150px;">
7+
<div style="height:150px;" class="t-alternate">
88
<div class="u-size-block-auto u-pad-n1 u-rounded t-dark t-alternate u-text-center">
99
auto (in a 150px tall container)
1010
</div>

0 commit comments

Comments
 (0)