#2 Dad (xevinx) wrote in s2component,
#2 Dad

Updates Updates Updates

Greetings all!

And welcome to another round of Component changes.

Today you will find a couple things changed that are both exciting and different.

First off, many of you may notice that the font size may be a little bit different.

This is because the default was set to 11px. Now it's set to 12px. It's not that all journals have to have a large font size, but we don't want livejournal getting a reputation that its hard to read. So mainly we wanted to change the default size. Some of you may be a little upset over this, but I have more exciting news that should make you happy....in a minute.

Also, some of the themes were changed slightly, including the default one, to be a little higher contrast. Once again, looking to make the defaults a little more legible. None of the color changes were drastic.

Also, my apologies for print_free_text() change...again...it wasn't intentional and will be changed back to print_free_text(Page p) soon.

Finally...here's the exciting bit...

Component (and Boxer) now use print_custom_head()! This essentially replaces the role that overrides did with S1.

No long will you need to override the entire stylesheet! (I hated that you had to)

How does it work?

So, now, instead of override print_stylesheet() and having the replace the entire stylesheet you can create a new function in your user/theme layer that looks like this:

function Page::print_custom_head() {
          body { font-size: 11px; }

Everything you enter here will be printed out after the stylesheet, so you'd only be changing the font size while leaving everything else the same.

I'm sure in the near distant future we'll be seeing more complex examples and tutorials on using print_custon_head, but this should get you started.

Thanks again, and sorry about print_free_text()...again.

(i love you guys because you're all so patient with me.... *wink* *wink* )
  • Post a new comment


    default userpic