Visitar URL original
USWDS - Button group: Fix margins on nested button groups by amyleadem · Pull Request #5885 · uswds/uswds · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Move styles to .scss; add explanation for test results
  • Loading branch information
amyleadem
amyleadem committed Apr 24, 2024
commit 48ff5d8aa1b98b6989bd0d6d8ef04dd2d7a54c62
Comment thread
mejiaj marked this conversation as resolved.
Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test prefix is added at the start of the filename. For example: test-usa-button-group--nested.twig.

I realize component template is hardcoded, but in the future we should avoid additional hardcoded components to allow for easier test template creation. As-is this hardcoded test template is okay.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the file names in the button group /test-patterns/ directory to reflect the common naming convention for these files in 85f2945

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<style>
.usa-button-group__item {
margin-top:0;
margin-bottom:0;
display: flex;
}
</style>
<div class="usa-prose measure-5 padding-2 border-1px border-gray-20 margin-bottom-4">
<p class="font-body-lg text-bold margin-top-0">Test nested button groups</p>
<p>Confirm that buttons inside nested button groups are:</p>
<ul>
<li>The same height as their sibling buttons</li>
<li>The same height as their parent buttons</li>
</ul>
</div>

<h3>Nested button group</h3>
<ul class="usa-button-group">
Expand Down Expand Up @@ -35,7 +36,7 @@
<a href="#" class="usa-button usa-button--outline maxw-15">Button with long text </a>
</li>
<li class="usa-button-group__item">
<ul class="usa-button-group">
<ul class="usa-button-group usa-button-group--segmented">
<li class="usa-button-group__item">
<a href="#" class="usa-button usa-button--outline maxw-10">Nested Button</a>
</li>
Expand Down