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

Accordion Example: Correct color contrast (Issue #1132) #1200

Merged
merged 5 commits into from
Oct 25, 2019
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
18 changes: 11 additions & 7 deletions examples/accordion/css/accordion.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.Accordion {
margin: 0;
padding: 0;
border: 2px solid hsl(0, 0%, 82%);
border: 2px solid hsl(0, 0%, 52%);
border-radius: 7px;
width: 20em;
}
Expand All @@ -12,15 +12,15 @@
}

.Accordion.focus {
border-color: hsl(216, 94%, 73%);
border-color: hsl(216, 94%, 43%);
}

.Accordion.focus h3 {
background-color: hsl(0, 0%, 97%);
}

.Accordion > * + * {
border-top: 1px solid hsl(0, 0%, 82%);
border-top: 1px solid hsl(0, 0%, 52%);
}

.Accordion-trigger {
Expand All @@ -42,6 +42,10 @@
background: hsl(216, 94%, 94%);
}

.Accordion-trigger:focus {
outline: 4px solid transparent;
}

.Accordion *:first-child .Accordion-trigger {
border-radius: 5px 5px 0 0;
}
Expand All @@ -64,11 +68,11 @@ button {
}

.Accordion-trigger:focus .Accordion-title {
border-color: hsl(216, 94%, 73%);
border-color: hsl(216, 94%, 43%);
}

.Accordion-icon {
border: solid hsl(0, 0%, 62%);
border: solid currentColor;
border-width: 0 2px 2px 0;
height: 0.5rem;
pointer-events: none;
Expand All @@ -81,7 +85,7 @@ button {

.Accordion-trigger:focus .Accordion-icon,
.Accordion-trigger:hover .Accordion-icon {
border-color: hsl(216, 94%, 73%);
border-color: hsl(216, 94%, 43%);
}

.Accordion-trigger[aria-expanded="true"] .Accordion-icon {
Expand All @@ -105,7 +109,7 @@ fieldset {
}

input {
border: 1px solid hsl(0, 0%, 62%);
border: 1px solid hsl(0, 0%, 42%);
border-radius: 0.3em;
display: block;
font-size: inherit;
Expand Down