From: Chris Rebert Date: Sun, 7 Jul 2013 21:52:00 +0000 (-0700) Subject: use nesting more in pagination.less X-Git-Tag: v3.0.0-rc1~176^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8412%2Fhead;p=thirdparty%2Fbootstrap.git use nesting more in pagination.less --- diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index d3bea53f3c..88eaf2cfa7 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3323,6 +3323,19 @@ button.close { border-left-width: 0; } +.pagination > li:first-child > a, +.pagination > li:first-child > span { + border-left-width: 1px; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; +} + +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + .pagination > li > a:hover, .pagination > li > a:focus, .pagination > .active > a, @@ -3345,19 +3358,6 @@ button.close { background-color: #ffffff; } -.pagination > li:first-child > a, -.pagination > li:first-child > span { - border-left-width: 1px; - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; -} - -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - .pagination-large > li > a, .pagination-large > li > span { padding: 14px 16px; diff --git a/less/pagination.less b/less/pagination.less index 48201b2ef2..45c53ebcef 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); + } + } } }