marcolago / flowtime.js

Flowtime.js HTML5/CSS3/JS Websites and Presentation Framework
https://marcolago.github.io/flowtime.js/
MIT License
1.34k stars 237 forks source link

numbered list start at specific number #39

Closed MaxKemman closed 9 years ago

MaxKemman commented 9 years ago

Thanks for this wonderful framework, I'm thorougly enjoying it. There seems to be an issue with starting a numbered list at a specific number (useful for continuing a numbered list on another slide). The HTML spec says it should be like the following: < ol start="6"> < li>This should be numbered 6< /li> < /ol>

But for some reason, flowtime.js doesn't recognize this and starts with number 1

marcolago commented 9 years ago

Hi. Thanks for using Flowtime.js.

The problem is that Flowtime use CSS counters to style the ordered list, so, if you want to reset the standar behaviour you have to edit the file in css/themes/default.css starting at the line 191:

.flowtime ol {
    counter-reset: list;
}

.flowtime ol li:before {
    content: counter(list) ".";
    counter-increment: list;
    font-size: 0.75em;
    color: #ffdd00;
    margin-right: 0.5rem;
    display: inline-block;
    position: relative;
    top: -0.075em;
}

removing the counter and fix some styles to fit your needs.

Let me know if you need further help. Thanks again.

MaxKemman commented 9 years ago

Thanks for the reply.

I wasn't quite sure how to fix it, apart from manually creating a css list that starts at 6, but hiding list items does the trick:

< li style="visibility:hidden; position:absolute">

marcolago commented 9 years ago

Hi. I've pushed a modifier CSS so you can try it yourself.

Add in your HTML the new CSS located in css/modifiers/standard-ol.css just after the default Flowtime Theme (or your custom theme) and the ordered lists should now behave as standard ones.

Let me know if this is the correct solution.

MaxKemman commented 9 years ago

That works fine, thanks for fixing it so quickly