Forum OpenACS Development: Valid CSS

Collapse
Posted by Richard Hamilton on
I have just run some new work through the W3C CSS validator to find any errors or superfluous code in my CSS.

The results that came back listed quite a few items in xowiki.css, lists.css and default-master.css, none of which are very important but all of which would probably benefit from being tidied up.

Would anyone like me to work on cleaning these up?

Regards
Richard

Warnings (65)
URI : http://www.sw-agent.com/resources/xowiki/xowiki.css
165 Same colors for color and background-color in two contexts a.admin:hover and div.xowiki-content .errorMsg
216 Same colors for color and background-color in two contexts .portlet-header and a:hover.rss
217 Same colors for color and background-color in two contexts td.list-list-pane and a:visited.rss
217 Same colors for color and background-color in two contexts .summarytextpos and a:visited.rss
217 Same colors for color and background-color in two contexts .list-paginator li and a:visited.rss
217 Same colors for color and background-color in two contexts .list-table tr.even and a:visited.rss
217 Same colors for color and background-color in two contexts DIV.contentbox and a:visited.rss
217 Same colors for color and background-color in two contexts .calendar tfoot .ttip and a:visited.rss
217 Same colors for color and background-color in two contexts .sa-dl-table-tr-2 and a:visited.rss
217 Same colors for color and background-color in two contexts .foregroundcontainer and a:visited.rss
217 Same colors for color and background-color in two contexts .calendar thead .title and a:visited.rss
217 Same colors for color and background-color in two contexts .calendar tbody td.selected and a:visited.rss
217 Same colors for color and background-color in two contexts .list-tiny tr.even and a:visited.rss
217 Same colors for color and background-color in two contexts .list-table tr.list-header and a:visited.rss
218 Same colors for color and background-color in two contexts .list-paginator li and a:link.rss
218 Same colors for color and background-color in two contexts .foregroundcontainer and a:link.rss
218 Same colors for color and background-color in two contexts .list-table tr.even and a:link.rss
218 Same colors for color and background-color in two contexts .list-table tr.list-header and a:link.rss
218 Same colors for color and background-color in two contexts td.list-list-pane and a:link.rss
218 Same colors for color and background-color in two contexts .list-tiny tr.even and a:link.rss
218 Same colors for color and background-color in two contexts .calendar tbody td.selected and a:link.rss
218 Same colors for color and background-color in two contexts .sa-dl-table-tr-2 and a:link.rss
218 Same colors for color and background-color in two contexts .calendar tfoot .ttip and a:link.rss
218 Same colors for color and background-color in two contexts DIV.contentbox and a:link.rss
218 Same colors for color and background-color in two contexts .summarytextpos and a:link.rss
218 Same colors for color and background-color in two contexts .calendar thead .title and a:link.rss
URI : http://www.sw-agent.com/resources/acs-templating/lists.css
69 .list-paginator li Same color for background-color and border-top-color
69 .list-paginator li Same color for background-color and border-left-color
69 .list-paginator li Same color for background-color and border-right-color
URI : http://www.sw-agent.com/resources/openacs-default-theme/styles/default-master.css
42 Same colors for color and background-color in two contexts #pagetextlinebreak and #main-navigation #main-navigation-active a
47 Same colors for color and background-color in two contexts #pagetextlinebreak and #main-navigation a:hover
88 Same colors for color and background-color in two contexts #pagetextlinebreak and #sub-navigation li a:hover
93 Same colors for color and background-color in two contexts #pagetextlinebreak and #sub-navigation li#sub-navigation-active a
141 Same colors for color and background-color in two contexts #pagetextlinebreak and .calendar thead .name
361 Same colors for color and background-color in two contexts #pagetextlinebreak and a.subsite-name
365 Same colors for color and background-color in two contexts #pagetextlinebreak and a.subsite-name:hover
578 Same colors for color and background-color in two contexts a.admin:hover and a.admin:link
578 Same colors for color and background-color in two contexts a.admin:hover and a.admin:visited
680 Same colors for color and background-color in two contexts #pagetextlinebreak and .portlet-title h1
694 Same colors for color and background-color in two contexts .list-paginator li and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .list-table tr.even and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .summarytextpos and .portlet-controls a:link
694 Same colors for color and background-color in two contexts DIV.contentbox and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .list-table tr.list-header and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .calendar tbody td.selected and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .sa-dl-table-tr-2 and .portlet-controls a:link
694 Same colors for color and background-color in two contexts td.list-list-pane and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .calendar thead .title and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .calendar tfoot .ttip and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .list-tiny tr.even and .portlet-controls a:link
694 Same colors for color and background-color in two contexts .foregroundcontainer and .portlet-controls a:link
698 Same colors for color and background-color in two contexts #pagetextlinebreak and .portlet-controls a:hover

Collapse
2: Re: Valid CSS (response to 1)
Posted by Richard Hamilton on
Actually, having looked at this a bit longer, I can see that the duplication depends entirely on the context that the classes are used in on every individual page. Classes will of course cascade dependent upon their containing ancestors, which could be completely different every time in the case of for example lists produced by list builder.

So if you have general purpose CSS designed for re-use in lots of different contexts, as we do, stripping out the dupliates from these warnings may cause problems everywhere but on this specific page. If I understand correctly it would make duplication of CSS attribute definitions unavoidable and inevitable in a system like this.

Does anyone have any comments on this?

Regards
Richard

Collapse
3: Re: Valid CSS (response to 1)
Posted by Richard Hamilton on
Oh, I also missed an actual error in default-master.css which probably should be fixed:

503 a.button .disabled Value Error : cursor not-allowed is not a cursor value : not-allowed not-allowed

Collapse
4: Re: Valid CSS (response to 1)
Posted by Gustaf Neumann on
note that the listed issues are not errors, but warnings. I have fixed xowiki.css and committed the changes to cvs.