From 12c765adb6436920b37bb8c5d512a3fc6ac7fe10 Mon Sep 17 00:00:00 2001 From: zmmbreeze Date: Wed, 8 May 2013 17:35:13 +0800 Subject: [PATCH 1/2] fix counter bug when `ol > li > ol` --- index.html | 7 ++++++- markdown.css | 6 +++--- markdown.less | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 1dc9106..168ebe5 100644 --- a/index.html +++ b/index.html @@ -71,7 +71,12 @@

Lists

Ordered lists

    -
  1. here’s one line from a numbered list
  2. +
  3. here’s one line from a numbered list +
      +
    1. Test
    2. +
    3. Test
    4. +
    +
  4. here’s another
  5. in markdown, the actual numbers don’t matter—you can toggle this with the class markdown-ones
diff --git a/markdown.css b/markdown.css index 9bd3c5e..8d4007f 100644 --- a/markdown.css +++ b/markdown.css @@ -101,18 +101,18 @@ padding-left: 34px; padding-left: 4ch; } -.markdown li:after { +.markdown li:before { position: absolute; top: 0; left: 0; } -.markdown ul > li:after { +.markdown ul > li:before { content: "*"; } .markdown ol { counter-reset: ol; } -.markdown ol > li:after { +.markdown ol > li:before { content: counter(ol) "."; counter-increment: ol; } diff --git a/markdown.less b/markdown.less index 3639384..b64fc1c 100644 --- a/markdown.less +++ b/markdown.less @@ -95,13 +95,13 @@ padding-left: @four-space-css3; } - li:after { + li:before { position: absolute; top: 0; left: 0; } - ul>li:after { + ul>li:before { content: @ul-tick; } @@ -109,7 +109,7 @@ // Auto-increments the numbering for ordered lists. counter-reset:ol; } - ol>li:after { + ol>li:before { content: counter(ol) "."; counter-increment: ol; } @@ -222,4 +222,4 @@ ol>li:after { content: "1."; } -} \ No newline at end of file +} From 9547764f1977e92229e23951dc7582b692a37b04 Mon Sep 17 00:00:00 2001 From: zmmbreeze Date: Wed, 8 May 2013 17:36:22 +0800 Subject: [PATCH 2/2] reset index.html --- index.html | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.html b/index.html index 168ebe5..1dc9106 100644 --- a/index.html +++ b/index.html @@ -71,12 +71,7 @@

Lists

Ordered lists

    -
  1. here’s one line from a numbered list -
      -
    1. Test
    2. -
    3. Test
    4. -
    -
  2. +
  3. here’s one line from a numbered list
  4. here’s another
  5. in markdown, the actual numbers don’t matter—you can toggle this with the class markdown-ones