google reader css

Like many people I use Google Reader, and like many people I share stories that I find particularly interesting with my friends on reader. However when redesigning my blog I wanted a way to incorporate reader into it. I looked at various wordpress plug-ins that could get the job done, but none seemed to fit my needs precisely right.

I finally found what I was looking for at Google Reader itself, via their add a clip feature (you can find this link by clicking on in the left side navigation area). When you use google reader they give you everything you could ask for, title, color scheme, number of shared items to post and whether or not to post item sources. You can find google reader stylized for my site, in my sidebar (as of this writing).

All of this is wonderful except for one minor thing, google provides no assistance at all when it comes to the option of no color scheme. That means no xhtml source to examine or css source. You could get around that with firefox’s view selection source feature, however if you don’t have firefox this provides no help at all.

It is with that in mind that I am writing this post, below is sample xhtml source code, that I will explain after the code is posted.


<div id="readerpublishermodule0" class="reader-publisher-module">
<h3>robert’s shared items</h3>
<ul>
<li>
<a class="i" title="Happy Birthday, iMac" href="#">Happy Birthday, iMac</a>
<div class="s">
from <a href="#">The Unofficial Apple Weblog (TUAW)</a>
</div>
</li>
<li>
<a class="i" title="Happy Birthday, iMac" href="#">Happy Birthday, iMac</a>
<div class="s">
from <a href="#">The Unofficial Apple Weblog (TUAW)</a>
</div>
</li>
<li>
<a class="i" title="Happy Birthday, iMac" href="#">Happy Birthday, iMac</a>
<div class="s">
from <a href="#">The Unofficial Apple Weblog (TUAW)</a>
</div>
</li>
<li>
<a class="i" title="Happy Birthday, iMac" href="#">Happy Birthday, iMac</a>
<div class="s">
from <a href="#">The Unofficial Apple Weblog (TUAW)</a>
</div>
</li>
<li>
<a class="i" title="Happy Birthday, iMac" href="#">Happy Birthday, iMac</a>
<div class="s">
from <a href="#">The Unofficial Apple Weblog (TUAW)</a>
</div>
</li>
</ul>
<div class="f">
<a href="#">Read more…</a>
</div>
</div>

The primary container for the shared items is a selector named “reader-publisher-module”, it contains everything provided by google reader. The header provided by google is contained in a h3 element inside of the main container. Each headline link and source link is contained inside of a list element inside of the main container as well. The headline link is held inside this list item in a selector with the name “i”. The source is held inside this list element in a container named “s”. The read more link is contained inside of a selector named “f” inside of the main container.

Listed below is the css used in my current theme to make google reader appear appropriately, hopefully it can help you if you need it.


/* google reader from section */
.reader-publisher-module .s {
text-indent: 5px;
}


/* from link */
.reader-publisher-module .s a {
color: #660505;
text-decoration: none;
}


/* headline link */
.reader-publisher-module .i {
font-size: 10pt;
font-weight: bold;
line-height: 10pt;
text-decoration: none;
display: block;
}


/* google reader read more section */
.reader-publisher-module .f {
display: none;
}


.reader-publisher-module .f a {
}

This information was hard for me to find, so hopefully listing it here will help someone, if you need any further assistance post a comment, and I will see what I do do.

This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.