Skip to content

Instantly share code, notes, and snippets.

@media317
Created March 8, 2017 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save media317/3834a53f4bb0dd5f46103c43dd14f6e5 to your computer and use it in GitHub Desktop.
Save media317/3834a53f4bb0dd5f46103c43dd14f6e5 to your computer and use it in GitHub Desktop.
FAQ toggle CSS
/* # FAQ
--------------------------------------------- */
.entry-content .faq-list,
.entry-content .faq-list li {
list-style: none;
margin: 0;
padding: 0;
}
.entry-content .faq-list ul {
margin-left: 0;
}
.entry-content .faq-list li {
border: none;
border-radius: 3px;
background: #fff;
margin-bottom: 15px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
-webkit-box-shadow: 0px 5px 30px 0px rgba(38,50,56,0.15);
-moz-box-shadow: 0px 5px 30px 0px rgba(38,50,56,0.15);
box-shadow: 0px 5px 30px 0px rgba(38,50,56,0.15);
}
.entry-content .faq-list li:hover {
-webkit-box-shadow: 0px 3px 10px 0px rgba(38,50,56,0.15);
-moz-box-shadow: 0px 3px 10px 0px rgba(38,50,56,0.15);
box-shadow: 0px 3px 10px 0px rgba(38,50,56,0.15);
}
.entry-content .faq-list li .question {
display: block;
font-weight: 500;
border: none;
padding: 25px 35px 22px 60px;
position: relative;
}
.entry-content .faq-list li .question.on {
background: #F5F7F8;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
color: #263238;
}
.entry-content .faq-list li .question:before {
content: "\f132";
font-family: "dashicons";
color: #CFD8DC;
left: 25px;
margin-right: 10px;
position: absolute;
top: 29px;
}
.entry-content .faq-list li .question.on:before {
content: "\f460";
font-family: "dashicons";
}
.single-post .entry-content .faq-list li .answer {
border-top: 1px solid #ECEFF1;
display: none;
font-size: 16px;
padding: 25px 35px 25px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment