File tree Expand file tree Collapse file tree 4 files changed +25
-0
lines changed
Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @cloudfour/patterns " : minor
3+ ---
4+
5+ Add ` o-container__pad ` class
Original file line number Diff line number Diff line change 4040 }
4141}
4242
43+ /* *
44+ * Child elements that need a bit of inline padding to avoid the viewport edge.
45+ */
46+
47+ .o-container__pad {
48+ .o-container--pad & ,
49+ .o-container--pad-inline & {
50+ @include spacing .fluid-padding-inline ;
51+ }
52+ }
53+
4354/* *
4455 * Child elements intended to "fill" the container width. This negates any
4556 * inline padding and border radii.
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ There are times when a child element should attempt to fill the container conten
136136
137137Two child element classes exist for this purpose:
138138
139+ - ` o-container__pad ` : Adds the standard container padding to a child element.
139140- ` o-container__fill ` : Negates any inline padding so the element will reach the edges of the content container's padding.
140141- ` o-container__fill-pad ` : Also applies padding to the element so its content will align with that of the container.
141142
Original file line number Diff line number Diff line change 1212 <p >.c-card.c-card--contained</p >
1313 {% endblock %}
1414 {% endembed %}
15+ <p >This card gains the default container padding:</p >
16+ {% embed ' @cloudfour/components/card/card.twig' with {
17+ class : ' c-card--contained o-container__pad'
18+ } only %}
19+ {% block content %}
20+ <p >.c-card.c-card--contained.o-container__pad</p >
21+ {% endblock %}
22+ {% endembed %}
1523 <p >This card attempts to fill the container, padding included:</p >
1624 {% embed ' @cloudfour/components/card/card.twig' with {
1725 class : ' c-card--contained o-container__fill'
You can’t perform that action at this time.
0 commit comments