From 6a20810ca4970a681bd34274851365af011694e3 Mon Sep 17 00:00:00 2001 From: Francis Brunelle Date: Sat, 29 Jun 2013 16:06:14 -0400 Subject: reset left padding for .media-list, .pagination and .pager --- less/pagination.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less/pagination.less') diff --git a/less/pagination.less b/less/pagination.less index 73c063be0..320387a67 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -3,6 +3,7 @@ // -------------------------------------------------- .pagination { display: inline-block; + padding-left: 0; margin: @line-height-computed 0; border-radius: @border-radius-base; } -- cgit v1.2.3 From 3bd42511f41d6ea0ee1aa51535267ab19d3bbd20 Mon Sep 17 00:00:00 2001 From: liuyl Date: Fri, 5 Jul 2013 20:17:20 +0800 Subject: refactor pagination --- less/pagination.less | 94 +++++++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 42 deletions(-) (limited to 'less/pagination.less') diff --git a/less/pagination.less b/less/pagination.less index 320387a67..8050ab90b 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -6,49 +6,59 @@ padding-left: 0; margin: @line-height-computed 0; border-radius: @border-radius-base; + + > li { + display: inline; // Remove list-style and block-level defaults + > a, + > span,{ + float: left; // Collapse white-space + padding: 4px 12px; + line-height: @line-height-base; + text-decoration: none; + background-color: @pagination-bg; + border: 1px solid @pagination-border; + border-left-width: 0; + } + } + + > li > a:hover, + > li > a:focus, + > .active > a, + > .active > span { + background-color: @pagination-active-bg; + } + > .active > a, + > .active > span { + color: @gray-light; + cursor: default; + } + + > .disabled { + span, + a, + a:hover, + a:focus { + color: @gray-light; + background-color: @pagination-bg; + cursor: default; + } + } + + > li:first-child { + > a, + > span { + border-left-width: 1px; + .border-left-radius(@border-radius-base); + } + } + + > li:last-child { + > a, + > span { + .border-right-radius(@border-radius-base); + } + } } -.pagination > li { - display: inline; // Remove list-style and block-level defaults -} -.pagination > li > a, -.pagination > li > span { - float: left; // Collapse white-space - padding: 4px 12px; - line-height: @line-height-base; - text-decoration: none; - background-color: @pagination-bg; - border: 1px solid @pagination-border; - border-left-width: 0; -} -.pagination > li > a:hover, -.pagination > li > a:focus, -.pagination > .active > a, -.pagination > .active > span { - background-color: @pagination-active-bg; -} -.pagination > .active > a, -.pagination > .active > span { - color: @gray-light; - cursor: default; -} -.pagination > .disabled > span, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: @gray-light; - background-color: @pagination-bg; - cursor: default; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - border-left-width: 1px; - .border-left-radius(@border-radius-base); -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - .border-right-radius(@border-radius-base); -} - // Sizing // -------------------------------------------------- -- cgit v1.2.3 From 969529c80eaa4946964c1e393b4cad420d13f4b2 Mon Sep 17 00:00:00 2001 From: liuyl Date: Fri, 5 Jul 2013 20:18:57 +0800 Subject: refactor pagination --- less/pagination.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'less/pagination.less') diff --git a/less/pagination.less b/less/pagination.less index 8050ab90b..48201b2ef 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -34,10 +34,10 @@ } > .disabled { - span, - a, - a:hover, - a:focus { + > span, + > a, + > a:hover, + > a:focus { color: @gray-light; background-color: @pagination-bg; cursor: default; -- cgit v1.2.3 From 6bda16f6beb9db168d52b5e1f291328d8fd5d7c9 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 7 Jul 2013 14:52:00 -0700 Subject: use nesting more in pagination.less --- less/pagination.less | 90 +++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 40 deletions(-) (limited to 'less/pagination.less') diff --git a/less/pagination.less b/less/pagination.less index 48201b2ef..45c53ebce 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -10,7 +10,7 @@ > li { display: inline; // Remove list-style and block-level defaults > a, - > span,{ + > span { float: left; // Collapse white-space padding: 4px 12px; line-height: @line-height-base; @@ -19,6 +19,19 @@ border: 1px solid @pagination-border; border-left-width: 0; } + &:first-child { + > a, + > span { + border-left-width: 1px; + .border-left-radius(@border-radius-base); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-base); + } + } } > li > a:hover, @@ -43,21 +56,6 @@ cursor: default; } } - - > li:first-child { - > a, - > span { - border-left-width: 1px; - .border-left-radius(@border-radius-base); - } - } - - > li:last-child { - > a, - > span { - .border-right-radius(@border-radius-base); - } - } } // Sizing @@ -65,34 +63,46 @@ // Large .pagination-large { - > li > a, - > li > span { - padding: @padding-large-vertical @padding-large-horizontal; - font-size: @font-size-large; - } - > li:first-child > a, - > li:first-child > span { - .border-left-radius(@border-radius-large); - } - > li:last-child > a, - > li:last-child > span { - .border-right-radius(@border-radius-large); + > li { + > a, + > span { + padding: @padding-large-vertical @padding-large-horizontal; + font-size: @font-size-large; + } + &:first-child { + > a, + > span { + .border-left-radius(@border-radius-large); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-large); + } + } } } // Small .pagination-small { - > li > a, - > li > span { - padding: @padding-small-vertical @padding-small-horizontal; - font-size: @font-size-small; - } - > li:first-child > a, - > li:first-child > span { - .border-left-radius(@border-radius-small); - } - > li:last-child > a, - > li:last-child > span { - .border-right-radius(@border-radius-small); + > li { + > a, + > span { + padding: @padding-small-vertical @padding-small-horizontal; + font-size: @font-size-small; + } + &:first-child { + > a, + > span { + .border-left-radius(@border-radius-small); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-small); + } + } } } -- cgit v1.2.3