尽管Joomla!可以通过模板重构核心输出的任何内容,然后渲染器仍然可能在内容中输出部分table,这些CSS对于模板开发者来说也是相当重要的。根据一些社区的研究,这些CSS标记清单如下:
.adminform
.article_seperator
.back_button
.blog
.blog_more
.blogsection
.button
.buttonheading
.category
.clr
.componentheading
.contact_email
.content_rating
.content_vote
.contentdescription
.contentheading
.contentpagetitle
.contentpane
.contentpaneopen
.contenttoc
.createdate
.fase4rdf
.footer
.frontpageheader
.inputbox
.latestnews
.mainlevel
.message
.modifydate
.module
.moduletable
.mostread
.newsfeed
.newsfeeddate
.newsfeedheading
.pagenav
.pagenav_next
.pagenav_prev
.pagenavbar
.pagenavcounter
.pathway
.polls
.pollsborder
.pollstableborder
.readon
.search
.searchintro
.sectionentry1
.sectionentry2
.sectionheader
.sitetitle
.small
.smalldark
.sublevel
.syndicate
.syndicate_text
.text_area
.toclink
.weblinks
.wrapper
关于这张清单请注意.
我们看到的很多设计有其自定义的CSS布局设计. 一些定义的是有优先顺序的.
比如:
a {color:blue;} a:link {color:red;}
.contentheading {color:blue;}
div.contentheading {color:red;}
链接的颜色和 .contentheading 的颜色将是红色的, 定义是特殊的(as .contentheading 是包含在一个 <div> 里面的)
在我们的模板例子中, 你常常会看到一些特殊的规则. 比如一个class 出现于 table. 下面是例子:
.moduletable table.moduletable
.moduletable 是一个包含组件的<div>的名字. table.moduletable 将应用一个样式到 table 类型是 ="moduletable" on it.
.moduletable 将应用自己的样式而不考虑 class 里面的定义.
a.contentpagetitle:link .contentpagetitle a:link
a.contentpagetitle:将应用样式只要有 a .contentpagetitle 标记的class 链接上.
.contentpagetitle a:link 会应用所有的INSIDE .contentpagetitle 链接.
这并不难理解, 这常常使绝大多数的样式应用比较容易,你也不希望看到有很多的特例.
一些有价值的链接:
http://www.htmldog.com/guides/cssadvanced/specificity/
http://www.meyerweb.com/eric/css/link-specificity.html
http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html
此刻我们的模板使用了很多 table, 实际上12个 这会导致页面访问慢. 为了减少 table 我们在使用 jdoc:include调用模块的时候要使用 $style参数。



