Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sass image alignment placeholder for wordpress themes
%post__img{
img, .wp-caption{
display: block;
max-width:100%;
height: auto;
overflow: hidden;
&.alignleft{
float: left;
margin: 0.5em 1.5em 0.5em 0.5em ;
}
&.alignright{
float: right;
margin: 0.5em 0.5em 0.5em 1.5em;
}
&.aligncenter{
margin: 0 auto;
text-align: center;
}
.wp-caption-text{
text-align: center;
margin-bottom:0;
font-size:0.8em;
padding-bottom: 0.4em;
}
img{
margin:5px auto;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment