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

fix radius and hover on Accordion #8706

Merged
merged 1 commit into from
Apr 30, 2016
Merged
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
28 changes: 22 additions & 6 deletions scss/components/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ $accordion-content-padding: 1rem !default;
@mixin accordion-container {
list-style-type: none;
background: $accordion-background;
border: $accordion-content-border;
border-bottom: 0;
border-radius: $global-radius;
margin-#{$global-left}: 0;
}

/// Adds styles for the accordion item. Apply this to the list item within an accordion ul.
@mixin accordion-item {
&:first-child > :first-child {
border-radius: $global-radius $global-radius 0 0;
}
&:last-child > :last-child {
border-radius: 0 0 $global-radius $global-radius;
}
}

/// Adds styles for the title of an accordion item. Apply this to the link within an accordion item.
@mixin accordion-title {
display: block;
Expand All @@ -60,7 +67,12 @@ $accordion-content-padding: 1rem !default;
font-size: rem-calc(12);
color: $accordion-item-color;
position: relative;
border-bottom: $accordion-content-border;
border: $accordion-content-border;
border-bottom: 0;
:last-child:not(.is-active) > & {
border-radius: 0 0 $global-radius $global-radius;
border-bottom: $accordion-content-border;
}

&:hover,
&:focus {
Expand All @@ -86,9 +98,13 @@ $accordion-content-padding: 1rem !default;
@mixin accordion-content {
padding: $accordion-content-padding;
display: none;
border-bottom: $accordion-content-border;
border: $accordion-content-border;
border-bottom: 0;
background-color: $accordion-content-background;
color: $accordion-content-color;
:last-child > &:last-child {
border-bottom: $accordion-content-border;
}
}

@mixin foundation-accordion {
Expand All @@ -97,7 +113,7 @@ $accordion-content-padding: 1rem !default;
}

.accordion-item {
// This class doesn't need styles!
@include accordion-item;
}

.accordion-title {
Expand Down