Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created September 13, 2014 11:25
Show Gist options
  • Save gunnarbittersmann/afc93e9451d140334caf to your computer and use it in GitHub Desktop.
Save gunnarbittersmann/afc93e9451d140334caf to your computer and use it in GitHub Desktop.
verse lines
/**
* verse lines
* use of l elements is a willful violation of the HTML specification
*/
html
{
font: 1.5em/1.5 Georgia, serif;
}
p, footer
{
margin: 2em;
max-width: 9em;
}
l
{
position: relative;
display: block;
padding-left: 2em;
text-indent: -2em;
padding-right: 1.5em;
}
l::after
{
position: absolute;
top: 0;
right: 0;
bottom: 1.5em; /* line height */
width: 1em;
overflow-y: hidden;
content: "↩↩↩↩↩↩"; /* as many characters as you would need */
word-wrap: break-word;
text-align: right;
}
cite
{
font-size: 0.75em
}
<p>
<l>I don’t want to change the world</l>
<l>I’m not looking for a new England</l>
<l>I’m just looking for another girl</l>
</p>
<footer><cite>Billy Bragg, New England</cite></footer>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment