scss/web-design-standards/_scss/components/_accordions.scss
// Variables
$accordion-border: 3px solid $color-gray-lightest;
// Accordion Styles
.usa-accordion,
.usa-accordion-bordered {
+ .usa-accordion,
+ .usa-accordion-bordered {
margin-top: 1rem;
}
> ul {
color: $color-base;
margin: 0;
padding: 0;
width: 100%;
> li {
background-color: $color-gray-lightest;
font-family: $font-sans;
list-style: none;
margin-bottom: 6px;
width: 100%;
}
}
button[aria-expanded=false] {
background-image: url('../img/plus.png');
background-image: url('../img/plus.svg');
background-repeat: no-repeat;
background-size: 1.3rem;
}
button {
background-color: $color-gray-lightest;
background-image: url('../img/minus.png');
background-image: url('../img/minus.svg');
background-position: right 3rem center;
background-repeat: no-repeat;
background-size: 13px;
color: $color-base;
cursor: pointer;
display: inline-block;
font-family: $font-sans;
margin: 0;
padding: 1.5rem 5.5rem 1.5rem 3rem;
width: 100%;
&:focus {
box-shadow: $focus-shadow;
}
&:hover {
background-color: $color-gray-lighter;
color: $color-base;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
}
}
}
.usa-accordion-bordered {
.usa-accordion-content {
border-bottom: $accordion-border;
border-left: $accordion-border;
border-right: $accordion-border;
}
}
.usa-accordion-content {
background-color: $color-white;
display: block;
overflow: auto;
padding: 3rem;
> *:first-child {
margin-top: 0;
}
> *:last-child {
margin-bottom: 0;
}
}