Category Archives: Snippets

Sass WordPress image alignment

When you are writing a wordpress theme from scratch you are probably going to need to write some css to get the image alignment classes in the WordPress editor to do something meaningful. If you are using sass to preprocess your css here a simple sass placeholder class that you could use in your in your theme and everytime you start a new one. I have created a gist on github that is really basic alignment stuff that you will probably always need. You can use it in your theme’s sass files simply by including it and then extending your post or page classes.

  @extend  %post__img;