Rails Guides CSS

6 views
Skip to first unread message

Jaime Iniesta

unread,
Apr 7, 2010, 5:46:56 PM4/7/10
to rubyonra...@googlegroups.com
So, now that the Rails Guides validate as XHTML 1.0 Strict, I thought
it would be cool to finish the job and validate its CSS, too.

But it doesn't:

http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fedgeguides.rubyonrails.org%2Findex.html

I contacted Jason Zimdars, author of the design, and he gave me 3
solutions. So, first, we should decide what to do: leave it as it is,
with validation errors, or fix it, possibly changing a bit the look of
the site (rounded corners and stuff).

And second, we'd need a volunteer for this, as I'm not good with CSS,
I don't feel able for this task.

You'll find below Jason's reply. What do you think we should do?

---------- Forwarded message ----------
From: Jason Zimdars <ja...@thinkcage.com>
Date: 2010/4/7
Subject: Re: Rails Guides CSS
To: Jaime Iniesta <jaimei...@gmail.com>


Hey Jaime!

We're kind of in a bind with regard to those properties. Some of them
are CSS3 like border-radius so running the validator against that spec
would clear a couple of errors.

The properties the start with -webkit and -moz are proprietary
vendor-specific properties that only work in their respective
browsers. They more or less correspond to the official CSS3 property
but don't validate. According to the W3 this is the correct way to
specify these even though the validator doesn't seem to recognize
them.

So there are a few options:

1. Leave it alone and live with validation errors
2. Remove the properties and live without the rounded corner and
drop-shadow visual enhancements
3. Use a PNG/background-image solution to render the same visual
effect without vendor specific CSS. We get the visual styles and
validation.

 I think any of these is an acceptable solution, it's a matter of
preference. If validation is more important than visual style, then #2
is the way to go. In fact those effects are only visible in Safari,
Chrome, and later versions of Firefox — IE doesn't support them. Still
I think those browsers are likely the majority of traffic to the site
— not many developers using IE. For IE the effects just degrade to
square and no-shadows. Option #3 offers the best of both but does
complicate the mark-up and CSS making changes more difficult later on
especially since there are graphic assets to consider.

Hope that helps.

Best,

Jason

On Apr 7, 2010, at 1:08 PM, Jaime Iniesta wrote:

> Hi Jason!
>
> I've been working these days to make the Rails Guides validate XHTML
> 1.0 Strict, and, on the risk of being too anal retentive with this,
> I've checked CSS validation but it looks like there are a few details
> that could be fixed:
>
> http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fedgeguides.rubyonrails.org%2Findex.html
>
> Maybe you could have a look at it if you feel like it. I think you're
> the author of this design, isn't it?
>
> Thanks!

Mike Gunderloy

unread,
Apr 7, 2010, 5:52:57 PM4/7/10
to rubyonra...@googlegroups.com
Oh c'mon. Validation is an tool, not a wonderful thing in its own right. Making the site look worse in good browsers, or requiring extra work from the designer (who isn't getting paid) just so we can check off the "valid CSS" box are both bad ideas.

My vote: leave it as is. We're grown up enough to stand the horror of not being valid.

Mike

Pratik

unread,
Apr 7, 2010, 5:56:36 PM4/7/10
to rubyonra...@googlegroups.com
What Mike said.

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-do...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-docs?hl=en.
>
>

--
http://m.onkey.org | http://twitter.com/lifo

Xavier Noria

unread,
Apr 7, 2010, 6:16:37 PM4/7/10
to rubyonra...@googlegroups.com
Jaime thank you for checking also this.

I am sure your effort with XHTML will pay off, and I hope those
reported issues in IE8 are fixed now (can't test it myself).

CSS is a different story in my view. If validation was trivial to
accomplish I'd say go for it, but since it is not I'd touch that only
if the site looks horrible in some mainstream and modern browser.

It was worth looking into nonetheless, thank you!

Jaime Iniesta

unread,
Apr 8, 2010, 3:24:24 AM4/8/10
to rubyonra...@googlegroups.com
2010/4/8 Xavier Noria <f...@hashref.com>:

> CSS is a different story in my view. If validation was trivial to
> accomplish I'd say go for it, but since it is not I'd touch that only
> if the site looks horrible in some mainstream and modern browser.

That's my opinion, too. Better leave it as it is now: fixing XHTML was
one thing, but dealing with CSS surely is not worth the effort.

Just sharing it with you to make sure you also thought like this.

Reply all
Reply to author
Forward
0 new messages