User:Sarri.greek/test/style.css

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Note: You may have to bypass your browser’s cache to see the changes. In addition, after saving a sitewide CSS file such as MediaWiki:Common.css, it will take 5-10 minutes before the changes take effect, even if you clear your cache.

  • Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
  • Konqueror and Chrome: click Reload or press F5;
  • Opera: clear the cache in Tools → Preferences;
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

/* <nowiki>
	Sarri.greek 2023.02.04. at https://el.wiktionary.org/wiki/Template:ol-multi/style.css
	Table of Contents with numbered list
	in 2 or 3 columns
	Test at [[wikt:en:User:Sarri.greek/test]]
	If used at a page, write
		<noinclude><templatestyles src="User:Sarri.greek/test/style.css " /></noinclude>
source
https://stackoverflow.com/questions/4098195/can-ordered-list-produce-result-that-looks-like-1-1-1-2-1-3-instead-of-just-1
help. 
https://en.wiktionary.org/wiki/Wiktionary:Grease_pit/2023/February#Asking_for_help_from_volunteer_programmers_for_TOC
	Erutuon says: add .your-class-name
	e.g. class="mw-collapsible your-class-name" -- Do I have to put class="myclass" everywhere?
	*/

/* Fully numbered nested lists like 1, 1.1, 1,2, 1.2.1, 1.2.2... 
	To reset numbers, write at your page:
	make number 2 <li style="counter-reset: item 1;">
	make number 3 <li style="counter-reset: item 2;">
*/

/* write  <table class="tocwikt otherclassyouwant">  Does this suffice?*/
.tocwikt ol li {display:block;} /* hide original list counter */

/* all lines must have equal height */
.tocwikt li { 
	line-height: 1.5em; 
} 
.tocwikt ol, li { 
	padding-top: 0; 
	padding-bottom: 0; 
	margin-top: 0; 
	margin-bottom: 0; 
}

.tocwikt ol > li:first-child {counter-reset: item;} /* reset counter */
.tocwikt ol > li {counter-increment: item; } /* increment counter */
.tocwikt ol > li:before {content:counters(item, ".") " "; } /* print counter */


/* </nowiki> */