diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 9442927195..b707ef3093 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3746,24 +3746,19 @@ fieldset[disabled] .navbar-inverse .btn-navbar { } .pagination { - margin: 20px 0; -} - -.pagination ul { display: inline-block; - margin-bottom: 0; - margin-left: 0; + margin: 20px 0; border-radius: 4px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } -.pagination ul > li { +.pagination > li { display: inline; } -.pagination ul > li > a, -.pagination ul > li > span { +.pagination > li > a, +.pagination > li > span { float: left; padding: 4px 12px; line-height: 20px; @@ -3773,89 +3768,81 @@ fieldset[disabled] .navbar-inverse .btn-navbar { border-left-width: 0; } -.pagination ul > li > a:hover, -.pagination ul > .active > a, -.pagination ul > .active > span { +.pagination > li > a:hover, +.pagination > .active > a, +.pagination > .active > span { background-color: #f5f5f5; } -.pagination ul > .active > a, -.pagination ul > .active > span { +.pagination > .active > a, +.pagination > .active > span { color: #999999; cursor: default; } -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover { +.pagination > .disabled > span, +.pagination > .disabled > a, +.pagination > .disabled > a:hover { color: #999999; cursor: default; background-color: transparent; } -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { +.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 ul > li:last-child > a, -.pagination ul > li:last-child > span { +.pagination > li:last-child > a, +.pagination > li:last-child > span { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pagination-large ul > li > a, -.pagination-large ul > li > span { +.pagination-large > li > a, +.pagination-large > li > span { padding: 11px 19px; font-size: 17.5px; } -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { +.pagination-large > li:first-child > a, +.pagination-large > li:first-child > span { border-bottom-left-radius: 6px; border-top-left-radius: 6px; } -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { +.pagination-large > li:last-child > a, +.pagination-large > li:last-child > span { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { +.pagination-mini > li:first-child > a, +.pagination-small > li:first-child > a, +.pagination-mini > li:first-child > span, +.pagination-small > li:first-child > span { border-bottom-left-radius: 3px; border-top-left-radius: 3px; } -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { +.pagination-mini > li:last-child > a, +.pagination-small > li:last-child > a, +.pagination-mini > li:last-child > span, +.pagination-small > li:last-child > span { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } -.pagination-small ul > li > a, -.pagination-small ul > li > span { +.pagination-small > li > a, +.pagination-small > li > span { padding: 2px 10px; font-size: 11.9px; } -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { +.pagination-mini > li > a, +.pagination-mini > li > span { padding: 0 6px; font-size: 10.5px; } diff --git a/docs/components.html b/docs/components.html index a8a71842f8..8811a7e5e2 100644 --- a/docs/components.html +++ b/docs/components.html @@ -1189,29 +1189,25 @@
Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
-<div class="pagination"> - <ul> - <li><a href="#">Prev</a></li> - <li><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">Next</a></li> - </ul> -</div> +<ul class="pagination"> + <li><a href="#">Prev</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">Next</a></li> +</ul>@@ -1223,43 +1219,37 @@
Links are customizable for different circumstances. Use .disabled
for unclickable links and .active
to indicate the current page.
-<div class="pagination"> - <ul> - <li class="disabled"><a href="#">Prev</a></li> - <li class="active"><a href="#">1</a></li> - ... - </ul> -</div> +<ul class="pagination"> + <li class="disabled"><a href="#">Prev</a></li> + <li class="active"><a href="#">1</a></li> + ... +</ul>
You can optionally swap out active or disabled anchors for spans to remove click functionality while retaining intended styles.
-<div class="pagination"> - <ul> - <li class="disabled"><span>Prev</span></li> - <li class="active"><span>1</span></li> - ... - </ul> -</div> +<ul class="pagination"> + <li class="disabled"><span>Prev</span></li> + <li class="active"><span>1</span></li> + ... +</ul>
Fancy larger or smaller pagination? Add .pagination-large
, .pagination-small
, or .pagination-mini
for additional sizes.
-<div class="pagination pagination-large"> - <ul> - ... - </ul> -</div> -<div class="pagination"> - <ul> - ... - </ul> -</div> -<div class="pagination pagination-small"> - <ul> - ... - </ul> -</div> -<div class="pagination pagination-mini"> - <ul> - ... - </ul> -</div> -- -
Add one of two optional classes to change the alignment of pagination links: .pagination-centered
and .pagination-right
.
-<div class="pagination pagination-centered"> +<ul class="pagination pagination-large"> ... -</div> -- -
-<div class="pagination pagination-right"> +</ul> +<ul class="pagination"> ... -</div> +</ul> +<ul class="pagination pagination-small"> + ... +</ul> +<ul class="pagination pagination-mini"> + ... +</ul>diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index c185bff481..0446faf7e4 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -1121,29 +1121,25 @@
Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
-<div class="pagination"> - <ul> - <li><a href="#">Prev</a></li> - <li><a href="#">1</a></li> - <li><a href="#">2</a></li> - <li><a href="#">3</a></li> - <li><a href="#">4</a></li> - <li><a href="#">Next</a></li> - </ul> -</div> +<ul class="pagination"> + <li><a href="#">Prev</a></li> + <li><a href="#">1</a></li> + <li><a href="#">2</a></li> + <li><a href="#">3</a></li> + <li><a href="#">4</a></li> + <li><a href="#">Next</a></li> +</ul>@@ -1155,43 +1151,37 @@
Links are customizable for different circumstances. Use .disabled
for unclickable links and .active
to indicate the current page.
-<div class="pagination"> - <ul> - <li class="disabled"><a href="#">Prev</a></li> - <li class="active"><a href="#">1</a></li> - ... - </ul> -</div> +<ul class="pagination"> + <li class="disabled"><a href="#">Prev</a></li> + <li class="active"><a href="#">1</a></li> + ... +</ul>
You can optionally swap out active or disabled anchors for spans to remove click functionality while retaining intended styles.
-<div class="pagination"> - <ul> - <li class="disabled"><span>Prev</span></li> - <li class="active"><span>1</span></li> - ... - </ul> -</div> +<ul class="pagination"> + <li class="disabled"><span>Prev</span></li> + <li class="active"><span>1</span></li> + ... +</ul>
Fancy larger or smaller pagination? Add .pagination-large
, .pagination-small
, or .pagination-mini
for additional sizes.
-<div class="pagination pagination-large"> - <ul> - ... - </ul> -</div> -<div class="pagination"> - <ul> - ... - </ul> -</div> -<div class="pagination pagination-small"> - <ul> - ... - </ul> -</div> -<div class="pagination pagination-mini"> - <ul> - ... - </ul> -</div> -- -
Add one of two optional classes to change the alignment of pagination links: .pagination-centered
and .pagination-right
.
-<div class="pagination pagination-centered"> +<ul class="pagination pagination-large"> ... -</div> -- -
-<div class="pagination pagination-right"> +</ul> +<ul class="pagination"> ... -</div> +</ul> +<ul class="pagination pagination-small"> + ... +</ul> +<ul class="pagination pagination-mini"> + ... +</ul>diff --git a/less/pagination.less b/less/pagination.less index cad430dab3..a25d7bd018 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -1,27 +1,17 @@ // // Pagination (multiple pages) // -------------------------------------------------- - -// Space out pagination from surrounding content .pagination { - margin: @line-height-base 0; -} - -.pagination ul { - // Allow for text-based alignment display: inline-block; - // Reset default ul styles - margin-left: 0; - margin-bottom: 0; - // Visuals + margin: @line-height-base 0; border-radius: @border-radius-base; .box-shadow(0 1px 2px rgba(0,0,0,.05)); } -.pagination ul > li { +.pagination > li { display: inline; // Remove list-style and block-level defaults } -.pagination ul > li > a, -.pagination ul > li > span { +.pagination > li > a, +.pagination > li > span { float: left; // Collapse white-space padding: 4px 12px; line-height: @line-height-base; @@ -30,61 +20,50 @@ border: 1px solid @pagination-border; border-left-width: 0; } -.pagination ul > li > a:hover, -.pagination ul > .active > a, -.pagination ul > .active > span { +.pagination > li > a:hover, +.pagination > .active > a, +.pagination > .active > span { background-color: @pagination-background-active; } -.pagination ul > .active > a, -.pagination ul > .active > span { +.pagination > .active > a, +.pagination > .active > span { color: @grayLight; cursor: default; } -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover { +.pagination > .disabled > span, +.pagination > .disabled > a, +.pagination > .disabled > a:hover { color: @grayLight; background-color: transparent; cursor: default; } -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { +.pagination > li:first-child > a, +.pagination > li:first-child > span { border-left-width: 1px; .border-left-radius(@border-radius-base); } -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { +.pagination > li:last-child > a, +.pagination > li:last-child > span { .border-right-radius(@border-radius-base); } -// Alignment -// -------------------------------------------------- - -.pagination-centered { - text-align: center; -} -.pagination-right { - text-align: right; -} - - // Sizing // -------------------------------------------------- // Large .pagination-large { - ul > li > a, - ul > li > span { + > li > a, + > li > span { padding: @padding-large; font-size: @font-size-large; } - ul > li:first-child > a, - ul > li:first-child > span { + > li:first-child > a, + > li:first-child > span { .border-left-radius(@border-radius-large); } - ul > li:last-child > a, - ul > li:last-child > span { + > li:last-child > a, + > li:last-child > span { .border-right-radius(@border-radius-large); } } @@ -92,28 +71,28 @@ // Small and mini .pagination-mini, .pagination-small { - ul > li:first-child > a, - ul > li:first-child > span { + > li:first-child > a, + > li:first-child > span { .border-left-radius(@border-radius-small); } - ul > li:last-child > a, - ul > li:last-child > span { + > li:last-child > a, + > li:last-child > span { .border-right-radius(@border-radius-small); } } // Small .pagination-small { - ul > li > a, - ul > li > span { + > li > a, + > li > span { padding: @padding-small; font-size: @font-size-small; } } // Mini .pagination-mini { - ul > li > a, - ul > li > span { + > li > a, + > li > span { padding: @padding-mini; font-size: @font-size-mini; }