Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                #content.mw-body
	#bodyContent.mw-body-content
		#mw-content-text.mw-content-ltr
			.mw-parser-output
				h2 Chinese
				h3 Pronunciation
				div.toccolours.zhPron
					ul
						li data-zhPron-lect="cmn"
							span
								span.zhPron__lect <a href="#">Mandarin</a>
								span.zhPron__colon &#58;&#32;
								span.zhPron__lectVar <a href="#">Standard Chinese</a>
							ul.zhPron__romsList
								li data-zhPron-scheme="PY"
									details
										summary
											span
												span.zhPron__romName <a href="#">Pinyin</a>
												span.zhPron__colon &#58;&#32;
												span.zhPron__rom.Latn lang="cmn-Latn" yǎnyǎnyīxī
												span &#32;
												span.zhPron__romQual
													span.annotation-paren &#40;
													span <a href="#">Mainland</a>; note
													span.annotation-paren &#41;
										ul
											li data-zhPron-scheme="note"
												span
													span.zhPron__romName Note
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom ?
											li data-zhPron-scheme="ZHY"
												span
													span.zhPron__romName <a href="#">Zhuyin</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Bopo lang="cmn-Bopo" ㄧㄢˇ ㄧㄢˇ ㄧ ㄒㄧ
											li data-zhPron-scheme="SWZ"
												span
													span.zhPron__romName <a href="#">Sin Wenz</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Latn lang="cmn-Latn" ianjanjisi
											li data-zhPron-scheme="GR"
												span
													span.zhPron__romName <a href="#">Gwoyeu Romatzyh</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Latn lang="cmn-Bopo" yaanyaanyishi
											li data-zhPron-scheme="IPA"
												span
													span.zhPron__romName <a href="#">IPA</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.IPA foobar
								li
									details
										summary
											span
												span.zhPron__romName <a href="#">Pinyin</a>
												span.zhPron__colon &#58;&#32;
												span.zhPron__rom.Latn yānyānyīxí
												span &#32;
												span.zhPron__romQual
													span.annotation-paren &#40;
													span <a href="#">Taiwan</a>
													span.annotation-paren &#41;
										ul
											li data-zhPron-scheme="ZHY"
												span
													span.zhPron__romName <a href="#">Zhuyin</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Bopo lang="cmn-Bopo" ㄧㄢ ㄧㄢ ㄧ ㄒㄧ
											li data-zhPron-scheme="SWZ"
												span
													span.zhPron__romName <a href="#">Sin Wenz</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Latn lang="cmn-Latn" ianjanjisi
											li data-zhPron-scheme="GR"
												span
													span.zhPron__romName <a href="#">Gwoyeu Romatzyh</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.Latn lang="cmn-Bopo" yanyanyishi
											li data-zhPron-scheme="IPA"
												span
													span.zhPron__romName <a href="#">IPA</a>
													span.zhPron__colon &#58;&#32;
													span.zhPron__rom.IPA foobar
				p
					a href="https://superuser.com/q/638139" target="a" "disclosure widget"
				h3 ruby
				input type="checkbox" id="qsdfghjiuygtfcvbnjkl"
				div lang="zh" class="Hani"
					<ruby id="ffdlfkdfdfdfdfdfdfdfd">
						// <...> to avoid whitespace between tags (??????)
						<rb>鳳</rb>
						<rb>凤</rb><!--not sure if this is kosher html :D-->
						<rt>Fèng</rt>
					</ruby>
					<ruby>
						<rb>凰</rb>
						<rt>huáng</rt>
					</ruby>
					<ruby>
						<rb>城</rb>
						<rt>chéng</rt>
					</ruby>
              
            
!

CSS

              
                .zhPron
	width 30em
	max-width 100%
	box-sizing border-box
	
.zhPron details summary:hover
	cursor pointer
	background rgba(0, 255, 0, 0.15)
	
.zhPron details summary:hover ~ *
	background rgba(0, 255, 0, 0.10)

.zhPron details summary
	list-style none // no arrow (firefox)
	
.zhPron ::-webkit-details-marker
	display none // no arrow (chrome)
	
.zhPron__romQual
	background rgba(0, 255, 255, 0.15)
	font-size 80%
	vertical-align top
	
[data-zhPron-scheme="note"]
	background rgba(0, 255, 255, 0.15)
	
ruby rb:not(:first-of-type)
	display none
	
ruby.jiantizi rb:nth-of-type(1)
	display none
	
ruby.jiantizi rb:nth-of-type(2)
	display unset
              
            
!

JS

              
                // Nested Lists in Slim-lang
// https://stackoverflow.com/a/24496412

// stylesheets

let temp;

temp = document.createElement("link");
temp.rel = "stylesheet";
temp.href = "https://en.wiktionary.org/w/load.php?debug=false&lang=en&modules=ext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector";
document.head.appendChild(temp);

temp = document.createElement("link");
temp.rel = "stylesheet";
temp.href = "https://en.wiktionary.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector";
document.head.appendChild(temp);

temp = document.createElement("link");
temp.rel = "stylesheet";
temp.href = "https://en.wiktionary.org/w/load.php?debug=false&lang=en&modules=site.styles&only=styles&skin=vector";
document.head.appendChild(temp);

window.addEventListener("load", function() {
	document.getElementById("qsdfghjiuygtfcvbnjkl").addEventListener("click", function() {
		document.getElementById("ffdlfkdfdfdfdfdfdfdfd").classList.toggle("jiantizi");
	})
})
              
            
!
999px

Console