One of the points we agreed during f-2-f skinning discussion in 4.x was to use shortened names for our rich classes as this could reduce HTML page code and increase performance espesially for cases with Iteration components.
So we need to create some short article with naming convention for CSS classes which we could then use in internal development and to provide as one of the requirements article to commiters. Here are my initial thoughts:
Rich CSS class name should be defined using for example next pattern:
rf-<component name abbreviation>[-[<component part abbreviation>]-[some subpart abbreviation][- <state abbreviation>][some utility modificator abbreviation]]
Set of examples:
- rf-dt-c - rich class for cell (td) of datatable component
- rf-dt-hdr - rich class for header row of dataTable component
- rf-dt-hdr-c - rich class for header cell(td) of dataTable compoonent
- rf-edt-r-sel - rich class for selected row(tr) of extendedDataTable component
- rf-cb-itm-hov - rich class for combobox item in hovered state.
This article was generated from the following discussion: rich CSS classes naming convention
Component parts and subparts abbreviation table:
Component Part | Header 2 |
---|---|
header | hdr |
footer | ftr |
border | brd |
item | itm |
list | lst |
row | r |
cell | c |
input | inp |
field | fld |
button | btn |
table | tbl |
shadow | shdw |
link | lnk |
content | сnt |
body | b |
definition | dfn |
term | trm |
container | cntr |
group | gr |
icon | ico |
label | lbl |
leaf | lf |
node | nd |
handle | hnd |
Component/parts states abbreviations:
Component State | Abbreviation |
---|---|
selected | sel |
active | act |
inactive | inact |
hovered | hov |
disabled | dis |
higlighted | hl |
expanded | exp |
collapsed | colps |
frame/iframe | frm |
custom | cst |
initial | init |
remaining | rmng |
progress | prgs |
complete | cmpl |
finish | fin |
hidden | hdn |
loading | ldn |
first | first |
last | last |
fast forward | fastfwd |
fast rewind | fastrwd |
previous | prev |
next | next |
left | lft |
right | rgh |
text | txt |
close | cls |
Controls abbreviations
Component State | Abbreviation |
---|---|
add | add |
clear | clr |
upload | upl |
stop | stop |
status | st |
facet | fct |
Component abbreviations:
Component | Abbreviation |
---|---|
togglePanel | tgp |
togglePanelItem | tgp-itm |
accordion | ac |
accordionItem | ac-itm |
collapsiblePanel | cp |
collapsibleSubTableToggler | csttg |
tabPanel | tbp |
tab | tab |
ordered list | olst |
unordered list | ulst |
definition list | dlst |
panelMenu | pm |
panelMenuItem | pm-itm |
panelMenuGroup | pm-gr |
tree | tr |
treeNode | trn |
dataScroller | ds |
status | st |
Messages:
Component | Abbreviation |
---|---|
summary | sum |
message | msg |
detail | det |
info | inf |
warning | wrn |
error | err |
fatal | ftl |
Other
Sometimes we used some style classes like xxx-bold or xxx-width. Such usage restricted in 4.x. All the properties should be moved to corresponding general classes.
Comments