Hi all
I have made a few WordPress sites using OOCSS ideas. I use the grid
as-is from the OOCSS framework but I write the modules etc. myself.
It's mostly plain sailing but there are a few things you have to be
flexible about:
* WordPress occasionally has mark-up that you can't change easily.
e.g. the comment form (which is generated by WordPress core) is
wrapped in <div id="respond"></div>. You can change this but that is
quite brittle IMHO so I just relax the rules one-time if I need to
target it.
* WordPress has conventions for classes applied to widgets. Changing
mark-up here is a brittle strategy (esp. if you plan to use third
party plugins) so I go with the grain and consider .widget as the base
of a second module hierarchy.
* WYSIWYG generated content (by TinyMCE and friends) has a huge
impedance mismatch with OOCSS. In theory it's possible to hack TinyMCE
and WP to generate more "OOCSS friendly" markup but this is brittle as
1) some plugins depend on the default styles that TinyMCE applies, 2)
Plugins can add their own transformations to content generated by
TinyMCE. I just wrap anything that might come from TinyMCE in a
.wysiwyg class and use it to scope all the selectors that target this
content. This at least corrals the mischief you have to perform to
style this stuff.
I have an Sass & OOCSS WordPress starter theme 75% done but it's still
too rough for GitHub - sorry!
cheers
/Eoin/
>>>>>
object-oriented...@googlegroups.com.
>>>
object-oriented...@googlegroups.com.
>>
object-oriented...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/object-oriented-css/-/lmIZNrdcrM0J.
>
object-oriented...@googlegroups.com.
Eoin Kelly ::
http://www.eoinkelly.info :: @eoinkelly :: Flickr