@@ -14,13 +14,28 @@ $_ground-nav-border-width: sizes.$edge-medium;
1414$_ground-nav-border-style : solid ;
1515$_ground-nav-border-color : colors .$gray-light ;
1616
17- .c-ground-nav__action ,
18- .c-ground-nav__content {
19- padding : $_ground-nav-space ;
17+ /* *
18+ * 1. We establish vertical whitespace for the action to simplify alignment of
19+ * the illustration, but other whitespace is assumed to be handled by the
20+ * container object to promote alignment with adjacent sections.
21+ * 2. Allow illustration to be positioned relative to this container.
22+ */
23+
24+ .c-ground-nav__action {
25+ padding-bottom : $_ground-nav-space ; /* 1 */
26+ padding-top : $_ground-nav-space ; /* 1 */
27+ position : relative ; /* 2 */
2028}
2129
2230.c-ground-nav__action-inner {
23- position : relative ;
31+ /* *
32+ * Starting at this viewport, we want to position the illustration relative to
33+ * the inner element (away from the nearest horizontal edge).
34+ */
35+
36+ @media (min-width : breakpoint .$m ) {
37+ position : relative ;
38+ }
2439
2540 @media (min-width : breakpoint .$l ) {
2641 align-items : center ;
@@ -47,13 +62,19 @@ $_ground-nav-border-color: colors.$gray-light;
4762 */
4863
4964.c-ground-nav__action-illustration {
50- bottom : $_ground-nav-negative-space ;
65+ bottom : 0 ;
5166 position : absolute ;
52- right : $_ground-nav-negative-space ;
67+ right : 0 ;
5368 width : 40% ;
5469
70+ /* *
71+ * We position ourselves relative to a max-width container starting at this
72+ * breakpoint, so we have to adjust the bottom position to account for the
73+ * change in whitespace.
74+ */
75+
5576 @media (min-width : breakpoint .$m ) {
56- right : 0 ;
77+ bottom : $_ground-nav-negative-space ;
5778 width : calc (100% / 3 );
5879 }
5980
0 commit comments