JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<main>
<h1>Поиграться с <code>display: contents</code></h1>
<h2>Таблица <code>display: contents</code></h2>
<table role="table">
<caption id="Cap1">Книги, которые я, возможно, читал</caption>
<tr>
<th>Автор</th>
<th>Заголовок</th>
<th>Год</th>
<th>ISBN-13</th>
<th>ISBN-10</th>
</tr>
<tr>
<td>Miguel De Cervantes</td>
<td>The Ingenious Gentleman Don Quixote of La Mancha</td>
<td>1605</td>
<td>9783125798502</td>
<td>3125798507</td>
</tr>
<tr>
<td>Mary Shelley</td>
<td>Frankenstein; or, The Modern Prometheus</td>
<td>1818</td>
<td>9781530278442</td>
<td>1530278449</td>
</tr>
<tr>
<td>Herman Melville</td>
<td>Moby-Dick; or, The Whale</td>
<td>1851</td>
<td>9781530697908</td>
<td>1530697905</td>
</tr>
<tr>
<td>Emma Dorothy Eliza Nevitte Southworth</td>
<td>The Hidden Hand</td>
<td>1888</td>
<td>9780813512969</td>
<td>0813512964</td>
</tr>
<tr>
<td>F. Scott Fitzgerald</td>
<td>The Great Gatsby</td>
<td>1925</td>
<td>9780743273565</td>
<td>0743273567</td>
</tr>
<tr>
<td>George Orwell</td>
<td>Nineteen Eighty-Four</td>
<td>1948</td>
<td>9780451524935</td>
<td>0451524934</td>
</tr>
</table>
<h2>Список с <code>display: contents</code></h2>
<ul role="list">
<li>The Ingenious Gentleman Don Quixote of La Mancha</li>
<li>Frankenstein; or, The Modern Prometheus</li>
<li>Moby-Dick; or, The Whale</li>
<li>The Hidden Hand</li>
<li>The Great Gatsby</li>
<li>Nineteen Eighty-Four</li>
</ul>
<h2>Кнопка с <code>display: contents</code></h2>
<p class="button">
<button role="button" onclick="alert('There is that.');">Вы могли нажать меня?</button>
</p>
<p class="button">
<button role="button" tabindex="0" onkeypress="alert('Sweet');">Попробуйте с клавиатуры!</button>
</p>
<h2 role="heading" aria-level="2">Заголовок с <code>display: contents</code></h2>
<p>
Вы только что прочитали это
</p>
</main>
@import url("https://fonts.googleapis.com/css?family=Lato:400,400i,700");
body {
background-color: #6d695c;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAACVBMVEUAAAAAAAAAAACDY+nAAAAAA3RSTlMmDQBzGIDBAAAAG0lEQVR42uXIIQEAAADCMHj/0NdkQMws0HEeAqvwAUGJthrXAAAAAElFTkSuQmCC);
font-size: 100%;
color: #333;
font-family: Lato, Arial, sans-serif;
padding: 0;
margin: 0;
}
main {
display: block;
box-sizing: border-box;
width: auto;
padding: 1em 2vw;
margin: 1em 2vw;
color: #000;
background-color: rgba(204, 204, 204, 0.7);
border: 0.07em solid rgba(0, 0, 0, 0.5);
border-radius: 0.5em;
}
table {
margin: 1em 0;
border-collapse: collapse;
}
caption {
text-align: left;
font-style: italic;
padding: 0.25em 0.5em 0.5em 0.5em;
}
th,
td {
padding: 0.25em 0.5em 0.25em 1em;
vertical-align: text-top;
text-align: left;
text-indent: -0.5em;
}
th {
vertical-align: bottom;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
font-weight: bold;
}
tr:nth-child(even) {
background-color: rgba(255, 255, 255, 0.25);
}
tr:nth-child(odd) {
background-color: rgba(255, 255, 255, 0.5);
}
td:nth-of-type(2) {
font-style: italic;
}
th:nth-of-type(3),
td:nth-of-type(3) {
text-align: right;
}
div {
overflow: auto;
}
li {
margin-left: 2rem;
}
.button {
border: 2px solid #666;
width: 12em;
text-align: center;
padding: 1em .5em;
background-color: #ddd;
}
table, ul, button, h2:last-of-type {
display: contents;
}
Also see: Tab Triggers