K2 plays in Sandbox

After having talked to Scott, I have ported Sandbox’s semantic classes functions to K2. What this means is a hell of a lot more options for everyone to control their site via CSS and some changes in K2′s CSS.

The reason for these changes is an agreement I made with Scott to try and keep our class names as close as possible, hopefully paving the way for other people to adopt the same class naming convention. That, and Sandbox’s naming convention was better than ours in most respects.

This does not mean Sandbox and K2′s structures or CSS files are interchangable, mind you. Merely that there is some coherence between the two.

These are the changes:

  • .commentmetadata becomes .comment-meta
  • body.staticpage becomes body.page
  • .permalink becomes .single
  • .entry becomes .hentry
  • .editlink becomes .entry-edit
  • .tagdata becomes .entry-tags
  • .commentauthor becomes .bypostauthor
  • .aside becomes .category-aside
  • .metadata becomes .entry-meta

If you are a style author I recommend you do some quick search and replaces in your CSS file, as this will be the new default classes from r94 and up. Though you should really do a thorough walkthrough of your CSS to make sure it works as intended.

I also recommend everyone to get the latest revision and view source on your site to see the new semantic classes in effect.

And finally, this is a work in progress, so expect things to change slightly over the next few days.