Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1207: Refactor accordions to use Flexbox. #1208

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 12 additions & 5 deletions dist/css/arizona-bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/arizona-bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/arizona-bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/arizona-bootstrap.min.css.map

Large diffs are not rendered by default.

1,344 changes: 799 additions & 545 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions scss/_collapse.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Overrides & custom for the Collapse component

// make entire accordion header clickable for accessibility and UX
// Make entire accordion header clickable for accessibility and UX
.accordion {
.card-header {
padding: 0;
Expand All @@ -19,30 +19,35 @@
}

.btn {
display: block;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: .75rem 1.25rem;
color: $dark-silver;
text-align: left;
text-transform: none;

&::after {
position: absolute;
top: 2px;
right: 20px;
display: inline-block;
margin-left: 1rem;
// stylelint-disable-next-line
font-family: "Material Icons Sharp";
font-size: 2em;
font-variant-ligatures: no-common-ligatures;
line-height: 1rem;
content: "expand_more";
}

}

.btn[aria-expanded="true"] {
&::after {
content: "expand_less";
}
}

.btn-link {
color: $dark-silver;
}
}
}
24 changes: 12 additions & 12 deletions site/content/docs/2.0/components/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
<div class="accordion" id="ex1_accordionExample">
<div class="card">
<div class="card-header" id="ex1_headingOne">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#ex1_collapseOne" aria-expanded="true" aria-controls="ex1_collapseOne">
Collapsible Group Item #1
<button class="btn" type="button" data-toggle="collapse" data-target="#ex1_collapseOne" aria-expanded="true" aria-controls="ex1_collapseOne">
<span class="btn-link">Collapsible Group Item #1</span>
</button>
</div>
<div id="ex1_collapseOne" class="collapse show" aria-labelledby="ex1_headingOne" data-parent="#ex1_accordionExample">
Expand All @@ -93,8 +93,8 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
</div>
<div class="card">
<div class="card-header" id="ex1_headingTwo">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#ex1_collapseTwo" aria-expanded="false" aria-controls="ex1_collapseTwo">
Collapsible Group Item #2
<button class="btn collapsed" type="button" data-toggle="collapse" data-target="#ex1_collapseTwo" aria-expanded="false" aria-controls="ex1_collapseTwo">
<span class="btn-link">Collapsible Group Item #2</span>
</button>
</div>
<div id="ex1_collapseTwo" class="collapse" aria-labelledby="ex1_headingTwo" data-parent="#ex1_accordionExample">
Expand All @@ -105,8 +105,8 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
</div>
<div class="card">
<div class="card-header" id="ex1_headingThree">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#ex1_collapseThree" aria-expanded="false" aria-controls="ex1_collapseThree">
Collapsible Group Item #3
<button class="btn collapsed" type="button" data-toggle="collapse" data-target="#ex1_collapseThree" aria-expanded="false" aria-controls="ex1_collapseThree">
<span class="btn-link">Collapsible Group Item #3</span>
</button>
</div>
<div id="ex1_collapseThree" class="collapse" aria-labelledby="ex1_headingThree" data-parent="#ex1_accordionExample">
Expand All @@ -125,8 +125,8 @@ Depending on your use case, you might want to include a heading tag (`.h2`, `.h3
<div class="card">
<div class="card-header" id="ex2_headingOne">
<h3 class="my-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#ex2_collapseOne" aria-expanded="true" aria-controls="ex2_collapseOne">
Collapsible Group Item #1
<button class="btn" type="button" data-toggle="collapse" data-target="#ex2_collapseOne" aria-expanded="true" aria-controls="ex2_collapseOne">
<span class="btn-link">Collapsible Group Item #1</span>
</button>
</h3>
</div>
Expand All @@ -139,8 +139,8 @@ Depending on your use case, you might want to include a heading tag (`.h2`, `.h3
<div class="card">
<div class="card-header" id="ex2_headingTwo">
<h3 class="my-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#ex2_collapseTwo" aria-expanded="false" aria-controls="ex2_collapseTwo">
Collapsible Group Item #2
<button class="btn collapsed" type="button" data-toggle="collapse" data-target="#ex2_collapseTwo" aria-expanded="false" aria-controls="ex2_collapseTwo">
<span class="btn-link">Collapsible Group Item #2</span>
</button>
</h3>
</div>
Expand All @@ -153,8 +153,8 @@ Depending on your use case, you might want to include a heading tag (`.h2`, `.h3
<div class="card">
<div class="card-header" id="ex2_headingThree">
<h3 class="my-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#ex2_collapseThree" aria-expanded="false" aria-controls="ex2_collapseThree">
Collapsible Group Item #3
<button class="btn collapsed" type="button" data-toggle="collapse" data-target="#ex2_collapseThree" aria-expanded="false" aria-controls="ex2_collapseThree">
<span class="btn-link">Collapsible Group Item #3</span>
</button>
</h3>
</div>
Expand Down
Loading