Visitar URL original
USWDS -Site - Layout Grid: Guidance refactor by mahoneycm · Pull Request #2276 · uswds/uswds-site · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5bbc27f
Refactor layout grid guidance to match utilities pages
mahoneycm Sep 13, 2023
410878f
Add copy code button to code blocks
mahoneycm Sep 13, 2023
60a2cb3
Reorder guidance sections
mahoneycm Sep 13, 2023
8b9ba1c
Move default responsive variant table to responsive variant guidance …
mahoneycm Sep 13, 2023
84f2b82
Remove unnecessary scope on td element
mahoneycm Sep 13, 2023
1be7e83
Merge branch 'main' of github.com:uswds/uswds-site into cm-refactor-g…
mahoneycm Dec 12, 2023
dd7566f
Merge branch 'main' of github.com:uswds/uswds-site into cm-refactor-g…
mahoneycm Mar 26, 2024
3a9ec23
Correct jump link target
mahoneycm Mar 26, 2024
c53ec07
Add changelog entry
mahoneycm Mar 28, 2024
a29dd4a
Replace grid-col units with column count
mahoneycm Mar 28, 2024
a9cf3a4
Add additional grid-col examples
mahoneycm Mar 28, 2024
2083ff3
Add grid-container size recommendations
mahoneycm Apr 4, 2024
5b6e4da
Fix grid container mixin display
mahoneycm Apr 4, 2024
c8e97e5
Format mixin table values
mahoneycm Apr 4, 2024
9585a40
Add grid-offsett to mixin table
mahoneycm Apr 4, 2024
f44acec
Add accepted values column to utility mixin table
mahoneycm Apr 4, 2024
5bda8b3
Move optional hyphen for optional suffixes into code block
mahoneycm May 2, 2024
df02e8c
Merge branch 'main' of github.com:uswds/uswds-site into cm-refactor-g…
mahoneycm May 2, 2024
2872121
Remove affectsContent from changelog
mahoneycm May 2, 2024
9747141
Add valueless utility class examples
mahoneycm May 2, 2024
93d0957
Fix utility class layout
mahoneycm May 2, 2024
57ef05b
Remove sass mixin header in favor of utility mixin section
mahoneycm May 2, 2024
329745f
Remove duplicate type front matter
mahoneycm May 2, 2024
e40df91
Update subnav to match page structure
mahoneycm May 2, 2024
23a5576
Add uswds theme settings notes to variables section
mahoneycm May 7, 2024
76e6fdc
Merge branch 'main' of https://github.com/uswds/uswds-site into cm-re…
Jun 6, 2024
245919e
Update theme settings section to point to settings documentation
mahoneycm Jul 2, 2024
3142fc4
Update subnav to replace variables with theme settings
mahoneycm Jul 2, 2024
9e076ec
Merge branch 'main' of github.com:uswds/uswds-site into cm-refactor-g…
mahoneycm Jul 2, 2024
957524e
Update utility mixin link
mahoneycm Jul 2, 2024
68a48b3
Add type attribute to accordion buttons
mahoneycm Jul 2, 2024
7cfdb75
Add conditional check for utility output guidance
mahoneycm Jul 12, 2024
8648c09
Remove now redundant responsive sizes table
mahoneycm Jul 12, 2024
f1c0466
Remove whitespace
mahoneycm Jul 12, 2024
3102d17
Correct mixin table values; Add order mixin
mahoneycm Jul 15, 2024
33c0451
Merge branch 'main' of github.com:uswds/uswds-site into cm-refactor-g…
mahoneycm Jul 23, 2024
4ef3432
Add missing values and move code blocks within wrapping parenthesis
mahoneycm Jul 25, 2024
87c040b
Improve theme settings guidance
mahoneycm Jul 25, 2024
c892bf4
Add semi-colons to mixin examples
mahoneycm Jul 25, 2024
0abcebb
Remove order utility from mixin table
mahoneycm Jul 25, 2024
7af5f03
Refactor mixin examples in utility table
mahoneycm Jul 25, 2024
ed1db94
Correct grid col classes in examples
mahoneycm Jul 25, 2024
68444ab
Add missing value for grid-gap
amyleadem Sep 5, 2024
f466ffc
Merge branch 'main' of https://github.com/uswds/uswds-site into cm-re…
Sep 5, 2024
a412db4
Update changelog date
thisisdano Nov 6, 2024
49338ec
Merge branch 'main' into cm-refactor-grid-guidance
thisisdano Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _data/changelogs/utilities-layout-grid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ title: Layout grid utility
type: utility
changelogURL:
items:
- date: 2024-11-06
summary: Refactored guidance page.
summaryAdditional: Improved layout for easier scanning and consistency across other utility pages.
affectsGuidance: true
githubPr: 2276
githubRepo: uswds-site
versionUswds:
- date: 2022-03-11
summary: Updated value of `tablet-lg` from `800px` to `880px`.
summaryAdditional:
Expand Down
68 changes: 35 additions & 33 deletions _includes/utilities/responsive-variants.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,41 +63,43 @@ <h4 class="font-lang-2xs margin-top-2 margin-bottom-05">Output</h4>
</tbody>
</table>

<p class="utility-text margin-top-4">Set whether a utility family outputs with responsive variants by setting the value of <code>$[utility_family]-settings.responsive</code> in your <a href="{{ site.baseurl }}/documentation/settings">USWDS settings configuration</a>. When modifying settings stored as a map, undefined map elements will keep their default values.</p>
{% if page.utilities %}
<p class="utility-text margin-top-4">Set whether a utility family outputs with responsive variants by setting the value of <code>$[utility_family]-settings.responsive</code> in your <a href="{{ site.baseurl }}/documentation/settings">USWDS settings configuration</a>. When modifying settings stored as a map, undefined map elements will keep their default values.</p>

<div class="example border-left-05 border-secondary-light padding-left-105 margin-top-2 margin-bottom-2 bg-white">
<h4 class="font-lang-2xs margin-top-0 margin-bottom-05">Example</h4>
<pre class=" font-mono-xs margin-0 padding-0 bg-transparent">
@use "uswds-core" with (
$background-color-settings: (
responsive: true
)
);
</pre>
</div>
<div class="example border-left-05 border-secondary-light padding-left-105 margin-top-2 margin-bottom-2 bg-white">
<h4 class="font-lang-2xs margin-top-0 margin-bottom-05">Example</h4>
<pre class=" font-mono-xs margin-0 padding-0 bg-transparent">
@use "uswds-core" with (
$background-color-settings: (
responsive: true
)
);
</pre>
</div>

<table class="usa-table--borderless site-table-responsive site-table-simple">
<thead>
<tr>
<th scope="col" class="display-inline-flex">Utility variable</th>
<th scope="col" class="tablet:maxw-card-lg display-inline-flex">Default</th>
</tr>
</thead>
<tbody class="font-mono-2xs">
{% for utility in page.utilities %}
<table class="usa-table--borderless site-table-responsive site-table-simple">
<thead>
<tr>
<th scope="row" data-title="Utility variable" class="tablet:text-no-wrap display-inline-flex">
<span class="text-normal">
${{ utility.var }}-settings.responsive
</span>
</th>
<td data-title="Default" class="tablet:maxw-card-lg display-inline-flex">
<span>
{% if utility.responsive %}<span class="output-true">true</span>{% else %}false{% endif %}
</span>
</td>
<th scope="col" class="display-inline-flex">Utility variable</th>
<th scope="col" class="tablet:maxw-card-lg display-inline-flex">Default</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody class="font-mono-2xs">
{% for utility in page.utilities %}
<tr>
<th scope="row" data-title="Utility variable" class="tablet:text-no-wrap display-inline-flex">
<span class="text-normal">
${{ utility.var }}-settings.responsive
</span>
</th>
<td data-title="Default" class="tablet:maxw-card-lg display-inline-flex">
<span>
{% if utility.responsive %}<span class="output-true">true</span>{% else %}false{% endif %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</section>
Loading