Last active
December 19, 2015 10:59
-
-
Save bridgestew/5944269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ============================================================== | |
A few base styles plus column layout | |
=========================================================== */ | |
.wrap, | |
.main, | |
.secondary { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.wrap { | |
background-color: #e7ded3; | |
margin: 0 auto; | |
max-width: 634px; | |
overflow: hidden; /* to contain floats */ | |
padding: 10px; | |
} | |
h1 { | |
border-bottom: double 4px #bca785; | |
color: #6b8e23; | |
font-size: 26px; | |
margin-top: 0; | |
} | |
ul, p { | |
color: #333; | |
margin-top: 0; | |
margin-bottom: 1em; | |
} | |
a { | |
color: #369; | |
} | |
.main { | |
background-color: rgba(255, 255, 255, .4); | |
border-radius: 5px; | |
float: left; | |
padding: 0 10px; | |
width: 66.666%; | |
} | |
.secondary { | |
float: right; | |
padding-left: 10px; | |
width: 33.333%; | |
} | |
/* ============================================================== | |
The Accordion | |
=========================================================== */ | |
.accordion { | |
font-family: sans-serif; | |
line-height: 1.5; | |
} | |
.separator { | |
border-bottom: dashed 1px #bca785; | |
margin-bottom: 10px; | |
padding-bottom: 10px; | |
} | |
/* ---------------------------------- | |
Base title style - applies to all accordion titles | |
------------------------------- */ | |
.accordion__title { | |
font-size: 18px; | |
line-height: 1; | |
margin: 0; | |
overflow: hidden; /* to contain floats */ | |
} | |
/* Alternate title style - extends accordion__title */ | |
.accordion__title--alt { | |
font-family: serif; | |
font-size: 16px; | |
} | |
/* ---------------------------------- | |
Base toggle style - applies to all accordion toggles | |
------------------------------- */ | |
.accordion__toggle { | |
color: #004f95; | |
display: block; | |
padding: 10px 0; | |
} | |
/* Alternate toggle style - extends accordion__toggle */ | |
.accordion__toggle--alt { | |
color: #6b8e23; | |
} | |
/* ---------------------------------- | |
Base icon style - applies to all accordion toggles | |
------------------------------- */ | |
.icn { | |
background-position: left top; | |
background-repeat: no-repeat; | |
float: left; | |
margin-right: 5px; | |
/* image replacement styles in next 3 declarations */ | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
} | |
/* FAQ icon style - extends icn */ | |
.icn--accordion { | |
background-color: #004f95; | |
background-image: url("img/icn-accordion.png"); | |
border-radius: 50%; | |
height: 18px; | |
width: 18px; | |
} | |
/* Archive icon style - extends icn */ | |
.icn--accordion-alt { | |
background-image: url("img/icn-archive.png"); | |
height: 6px; | |
margin-top: 5px; | |
width: 6px; | |
} | |
.accordion__body { | |
overflow: hidden; | |
padding-left: 23px; | |
-webkit-transition: all .5s ease-in-out; | |
-moz-transition: all .5s ease-in-out; | |
-ms-transition: all .5s ease-in-out; | |
-o-transition: all .5s ease-in-out; | |
transition: all .5s ease-in-out; | |
visibility: hidden; | |
} | |
.accordion__body > * { | |
margin-top: 0; /* this might normally be addressed in reset styles */ | |
} | |
.accordion__body > :last-child { | |
margin-bottom: 0; | |
} | |
/* ---------------------------------- | |
States: styles that apply based on Javascript events | |
------------------------------- */ | |
.icn--is-selected { | |
background-position: left bottom; | |
} | |
.is-closed { | |
max-height: 0 !important; | |
} | |
.is-open { | |
max-height: 999px !important; /* work-around to animate unknown height */ | |
visibility: visible !important; | |
} | |
/* ---------------------------------- | |
Lists: styles that cancel User Agent styles for lists | |
------------------------------- */ | |
.list--unstyled { | |
list-style: none; | |
margin-bottom: 0; | |
margin-top: 0; | |
padding-left: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment