Template:Tabella breve

;
[visualizza] [modifica] Documentazione


Abbreviazione
tb


Uso del Template modifica

Questo template permette di abbreviare i parametri naturali di stile Aiuto:Tabelle . Permette fino a 10 comandi di style CSS (del tipo "text-align:right;"), ognuno legato a un codice abbreviato.

Se si vuole aggiungere un nuovo style CSS, aggiungilo al (vocabolario) Modulo StyleVoc Modulo:StyleVoc .

Si può usare nell'elenco di parametri qualsiasi parametro naturale di stile pertinente, in qualsiasi combinazione con i codici abbreviati per chiamarlo.

Si usa il template {{Tabella breve}} o equivalentemente la sua forma contratta/breve {{tb}} (ATTENZIONE a non confondersi con {{TB}} ! } nel seguente modo:

  1. dalla tabella qui presente, che ricalca i casi presenti nel vocabolario StyleVoc, si sceglie la forma breve da usare
  2. si usano le forme brevi nel template (fino a 9 parametri) per comporre la stringa con tutte le espressioni di style da usare. Si avrà al posto del template la stringa di stile.
  3. si può a questo punto comporre il comando di stile usando la stringa oppure se necessario aggiungere comandi di stile CSS non presenti nell'elenco, al "volo", aggiungendoli alla stringa prima di chiudere il comando style nel seguente modo, composizione comando di stile: style="{{tb|rigth|bc}}" e per aggiungere comandi di stile non nell'elenco: style="{{tb|rigth|bc}}color:black;"

Nota bene: le abbreviazioni non vanno usate con il ";" finale che viene già provveduto dal template e dal modulo.


Note integrative sull'uso vocabolario modulo:

{{#invoke:StyleVoc|vocabulary|right}}
produce : "text-align:right"
{{#invoke:StyleVoc|vocabulary|justify}}
produce : "text-align:justify"

Lista di parametri abbreviati modifica

Quando si aggiunge un nuovo codice, style CSS, per favore inseriscilo qui sotto in ordine alfabetico e aggiungilo al (vocabolario) Modulo StyleVoc Modulo:StyleVoc .

parametro naturale di stile abbreviazione linguaggio
naturale
tabella riga cella note
 
background-color: transparent; bgt transparent s ? n
 
border: 1px dotted black; ba. s n s
border: 1px solid black; ba border all s n s
border: 2px solid black; ba2 s n s
border: 3px solid black; ba3 s n s
border: 4px double black; bad s n s
 
border-bottom: 1px dotted black; bb. s n s
border-bottom: 2px dotted black; bb2. s n s
border-bottom: 1px solid black; bb border bottom s n s
border-bottom: 1px solid transparent; bbt1 s ? s
border-bottom: 2px solid black; bb2 s n s
border-bottom: 3px solid black; bb3 s n s
border-bottom: 4px double black; bbd s n s
 
border-collapse: collapse; bc border collapse n s n
 
border-left: 1px dotted black; bl. s n s
border-left: 1px solid black; bl border left s n s
border-left: 1px solid transparent; blt1 s ? s
border-left: 2px solid black; bl2 s n s
border-left: 3px solid black; bl3 s n s
border-left: 4px double black; bld s n s
 
border-right: 1px dotted black; br. s n s
border-right: 2px dotted black; br2. s n s
border-right: 1px solid black; br border right s n s
border-right: 1px solid transparent; brt1 s ? s
border-right: 2px solid black; br2 s n s
border-right: 3px solid black; br3 s n s
border-right: 4px double black; brd s n s
 
border-top: 1px dotted black; bt. s n s
border-top: 1px solid black; bt border top s n s
border-top: 1px solid transparent; btt1 s ? s 'order: none' doesn't work on many browsers, use transparent instead
border-top: 2px solid black; bt2 s n s
border-top: 3px solid black; bt3 s n s
border-top: 4px double black; btd s n s
 
webkit-transform:rotate(-90deg); -moz-transform:rotate(-90deg); -ms-transform:rotate(-90deg); -o-transform:rotate(-90deg); transform:rotate(-90deg); rot ? ? ?
 
direction: rtl; rtl ? ? s
 
float: left; fll float left s n n Breaks text flow.
float: right; flr float right s n n Breaks text flow.
 
font-size: 58%; xxs xx-smaller s s s
font-size: 69%; xs x-smaller s s s
font-size: 80%; sm80 s s s
font-size: 83%; sm smaller s s s
font-size: 85%; sm85 s s s
font-size: 90%; sm90 s s s
font-size: 92%; sm92 s s s equivalent to {{fine}}
font-size: 95%; sm95 s s s
font-size: 110%; sm110 s s s
font-size: 105%; fs105 s s s Used for PSM sub titles
font-size: 120%; lg larger s s s
font-size: 144%; xl x-larger s s s
font-size: 182%; xxl xx-larger s s s
font-size: 207%; 3xl xxx-larger s s s
font-size: 249%; 4xl xxxx-larger s s s
 
font-style: italic; fsi italic s s s
 
font-variant: small-caps; sc small caps s s s
 
font-weight: bold; fwb bold s s s
 
line-height: 100%; lh1 s s s
line-height: 100%; lh10
line-height: 110%; lh11 s s s
line-height: 120%; lh12 s s s
line-height: 130%; lh13 s s s
line-height: 150%; lh15 s s s
line-height: 200%; lh2 s s s
line-height: 200%; lh20
line-height: 95%; lh95 s s s
 
margin: 0 auto 0 auto; mc float s ? s
margin: 10px; ma10 s ? s
margin: 5px; ma5 s ? s
margin-bottom: 10px; mb10 s ? s
margin-bottom: 5px; mb5 s ? s
margin-left: 10px; ml10 s ? s
margin-left: 5px; ml5 s ? s
margin-right: 10px; mr10 s ? s
margin-right: 5px; mr5 s ? s
margin-right: auto; margin-left: auto; ma s ? s
margin-top: 10px; mt10 s ? s
margin-top: 5px; mt5 s ? s
 
padding-bottom: 0.5em; pb.5 s n s
padding-bottom: 0; pb0 s n s
padding-bottom: 1.0em; pb1 s n s
padding-bottom: 1.5em; pb15 s n s
padding-bottom: 2.0em; pb2 s n s
padding-bottom: 3.0em; pb3 s n s
padding-bottom: 4.0em; pb4 s n s
padding-bottom: 5.0em; pb5 s n s
 
padding-left: 1.0em;text-indent: -1.0em; it1 s n s
padding-left: 1.5em; text-indent: -1.0em; it1p.5 s n s
padding-left: 2.0em; text-indent: -1.0em; itp s n s|
padding-left: 2.0em;text-indent: -2.0em; it s n s
padding-left: 2.5em; text-indent: -2.0em; itp.5 s n s
padding-left: 3.0em; text-indent: -1.0em; it1p2 s n s
padding-left: 4.0em;text-indent: -2.0em; it42 s ? s PSM indent for literature section entries in the volume index.
 
padding-left: 0.5em; pl.5 s n s
padding-left: 0; pl0 s n s
padding-left: 1.0em; pl1 s n s
padding-left: 1.5em; pl15 s n s
padding-left: 2.0em; pl2 s n s
padding-left: 3.0em; pl3 s n s
padding-left: 3.5em; pl3.5 s n s
padding-left: 4.0em; pl4 s n s
padding-left: 5.0em; pl5 s n s
padding-left: 6.0em; pl6 s n s
padding-left: 7.0em; pl7 s n s
 
padding-right: 0.5em; pr.5 s n s
padding-right: 0; pr0 s n s
padding-right: 1.0em; pr1 s n s
padding-right: 1.5em; pr15 s n s
padding-right: 2.0em; pr2 s n s
padding-right: 3.0em; pr3 s n s
padding-right: 3.5em; pr3.5 s n s
padding-right: 4.0em; pr4 s n s
padding-right: 5.0em; pr5 s n s
padding-right: 6.0em; pr6 s n s
padding-right: 7.0em; pr7 s n s
 
padding-top: 0.5em; padding-bottom: 0.5em; ptb.5 s n s Padding title rows
padding-top: 1em; padding-bottom: 1em; ptb1 s n s
 
padding-top: 0.5em; pt.5 s n s
padding-top: 0; pt0 s n s
padding-top: 1.0em; pt1 s n s
padding-top: 1.5em; pt15 s n s
padding-top: 2.0em; pt2 s n s
padding-top: 3.0em; pt3 s n s
padding-top: 4.0em; pt4 s n s
padding-top: 5.0em; pt5 s n s
 
text-align: center; ac center s s s
text-align: justify; aj justify s s s
text-align: left; al left s s s
text-align: right; ar right s s s
 
text-transform: capitalize; cap capitalize s s s
text-transform: lowercase; lc lower case s s s
text-transform: uppercase; uc upper case s s s
 
vertical-align: baseline; vbs baseline s s s
vertical-align: bottom; vbm bottom s s s
vertical-align: middle; vmi middle s s s
vertical-align: text-bottom; vtb text bottom s s n Non si applica alle celle[1]
vertical-align: text-top; vtt text top n s s Non si applica alle celle[2]
vertical-align: top; vtp top n s s
 
white-space: nowrap; wnw nowrap ? ? s
 
width: 0%; w0 narrow s n s
width: 100%; wa full width s n s
width: 100em; w100
width: 20%; w20 fifth s n s
width: 25%; w25 quarter s n s
width: 33%; w33 third s n s
width: 40%; w40 two fifths s n s
width: 50%; w50 half s n s
width: 60%; w60 three fifths s n s
width: 67%; w67 two thirds s n s
width: 75%; w75 three quarters s n s
width: 80%; w80 four fifths

Esempi modifica

style="{{tb|ar|ba|sc}}"
produce style="text-align:right;border:1px solid black;font-variant:small-caps;;;;;;; ;"
style="{{Tabella breve|ar|vtb|pr2}}"
produce style="text-align:right; vertical-align:top; padding-right:2.0em;"

Combinazione di parametri naturali e abbreviati:

style="text-align:right;{{tb|pr2}}"
produce style="text-align:right;padding-right:2.0em;"

Il template è derivato da una semplice importazione del template inglese Table style elaborato poi per renderlo efficente ed efficace. Grazie a https://en.wikisource.org/.


Rotazione modifica

Di solito entro la cella si usa

| style="{{tb|...}} testo_cella

Lo stile rotazione è meglio applicarlo all'interno di un tag div con direttiva style.

| <div style="{{tb|rot}}"> testo_verticale </div> .

Altro esempio: Qui abbiamo applicato rot entro un div. La stringa rot che produce tb è qui unita ad altre direttive style non presenti tra le abbreviazioni e quindi aggiunte "al volo"; il pezzo di codice corrisponde a una cella la cui scritta Uomini in maiuscoletto verrà scritta in verticale. I parametri aggiunti facilitano il corretto allineamento e possono essere cambiati.

| style="{{tb|pl.5|pb1|vbm|bl3}}"| <div style="width:1pc;height:1pc;{{tb|pb.5|rot}}">{{Sc|Uomini}}</div>