Skip to content

Instantly share code, notes, and snippets.

@segovia94
Created September 18, 2015 19:39
Show Gist options
  • Save segovia94/2b8637c625a20f5d90ac to your computer and use it in GitHub Desktop.
Save segovia94/2b8637c625a20f5d90ac to your computer and use it in GitHub Desktop.
FAQ List for the CKEditor style dropdown
/* List FAQ */
.list-faq {
margin-top: 1em;
padding: 0;
list-style: none;
}
.list-faq > li {
padding: .5em .5em .5em 30px;
}
.list-faq > li:nth-child(odd):not(:first-child) {
border-top: dashed 1px #ddd;
}
.list-faq > li:nth-child(odd) {
color: #428BCA;
font-family: serif;
}
.list-faq > li:before {
content: 'Q:';
display: inline-block;
font-family: serif;
margin-left: -30px;
width: 30px;
}
.list-faq > li:nth-child(even) {
padding-top: 0;
}
.list-faq > li:nth-child(even):before {
content: 'A:';
float: left;
}
.list-faq > li:last-child:nth-child(odd):after {
content: 'Please add an Answer to this question.';
color: #CC5050;
display: block;
font-family: sans-serif;
}
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
* This file is used/requested by the 'Styles' button.
*/
if (typeof(CKEDITOR) !== 'undefined') {
CKEDITOR.addStylesSet( 'drupal',
[
{ name: 'FAQ', element: 'ul', attributes: { 'class': 'list-faq' } }
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment