Skip to content

Instantly share code, notes, and snippets.

@kevinruscoe
Last active November 2, 2023 18:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinruscoe/a45342753cc9bfcb7bf8 to your computer and use it in GitHub Desktop.
Save kevinruscoe/a45342753cc9bfcb7bf8 to your computer and use it in GitHub Desktop.
Sass default WordPress editor styles.
/**
* WordPress WYSIWYG Editor Styles
*
* Some nice SCSS styles. Fixes the alignment left/right issues when using them in the editor.
* There's a load of more 'defaults' over at http://digwp.com/2010/05/default-wordpress-css-styles-hooks/
* which is where this was original 'borrowed' from. Cheers Jeff Starr (@perishable)!
*
* @author Kevin Ruscoe (@kevdotbadger)
* @link http://digwp.com/2010/05/default-wordpress-css-styles-hooks/ Original author
* @link https://twitter.com/perishable Twitter of original author
*/
.entry-content {
img {
margin: 0 0 1.5em;
}
}
.alignleft,
img.alignleft {
margin-right: 1.5em;
display: inline;
float: left;
}
.alignright,
img.alignright {
margin-left: 1.5em;
display: inline;
float: right;
}
.aligncenter,
img.aligncenter {
margin-right: auto;
margin-left: auto;
display: block;
clear: both;
}
.wp-caption {
margin-bottom: 1.5em;
text-align: center;
padding-top: 5px;
img {
border: 0 none;
padding: 0;
margin: 0;
}
p.wp-caption-text {
line-height: 1.5;
font-size: 10px;
margin: 0;
}
}
.wp-smiley {
margin: 0 !important;
max-height: 1em;
}
blockquote {
&.left {
margin-right: 20px;
text-align: right;
margin-left: 0;
width: 33%;
float: left;
}
&.right {
margin-left: 20px;
text-align: left;
margin-right: 0;
width: 33%;
float: right;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment