View Single Post
Old 01-14-2015, 03:50 AM   #10
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 173
Karma: 40000
Join Date: Oct 2013
Device: kindle
Hey, thanks. That looks good in my kindle non-touch (this one), and I think in books where there isn't only poetry this could be a case of "graceful degradation": if you have a reader that supports pseudo-elements you see the numbers, but if you don't you're still able to read the text.

Granted, if it is a long poem we're talking about this might not be a viable solution. In this latter case I'd go for manually inserting the numbers befor each 5th verse, and the spaces in the other lines, combined with a monospaced font (like they do here). Or I wouldn't, after all. Sounds like a hell of a job

Anyway, if you add this

Code:
ul {
    counter-reset: counter;
    margin-left: 1.25em;
	text-indent: -.5em;
}
The verses become more readable

EDIT I was just suggested another solution, which does not involve the counter: use an <OL> instead of<UL>, and hide all the numbers but the 5n-th by giving them a transparent background.
Spoiler:

Code:
ol li:before {
    width:100px;
    height:30px;
    background-color:#FFF;
    content:"";
    display:inline-block;
    position:relative;
    margin-left: -100px;
}
ol li:nth-child(5n):before {
    background-color:transparent;
}


This looks fine in calibre and sigil, and in ADE it just shows all the numbers.

However, besides the dot after the numbers, which apparently is unavoidable w/o the counter, this solution raises a weird problem on my kindle: it only works for the first page. Once you turn it, all the numbers show. On the "Paperwhite" it works fine though.

Anyway, credits go to this guy.

Last edited by 1v4n0; 01-14-2015 at 05:47 AM.
1v4n0 is offline   Reply With Quote