pagination.less 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // Pagination (multiple pages)
  3. // --------------------------------------------------
  4. .pagination {
  5. display: inline-block;
  6. padding-left: 0;
  7. margin: @line-height-computed 0;
  8. border-radius: @border-radius-base;
  9. > li {
  10. display: inline; // Remove list-style and block-level defaults
  11. > a,
  12. > span {
  13. position: relative;
  14. float: left; // Collapse white-space
  15. padding: @padding-base-vertical @padding-base-horizontal;
  16. line-height: @line-height-base;
  17. text-decoration: none;
  18. color: @pagination-color;
  19. background-color: @pagination-bg;
  20. border: 1px solid @pagination-border;
  21. margin-left: -1px;
  22. }
  23. &:first-child {
  24. > a,
  25. > span {
  26. margin-left: 0;
  27. .border-left-radius(@border-radius-base);
  28. }
  29. }
  30. &:last-child {
  31. > a,
  32. > span {
  33. .border-right-radius(@border-radius-base);
  34. }
  35. }
  36. }
  37. > li > a,
  38. > li > span {
  39. &:hover,
  40. &:focus {
  41. color: @pagination-hover-color;
  42. background-color: @pagination-hover-bg;
  43. border-color: @pagination-hover-border;
  44. }
  45. }
  46. > .active > a,
  47. > .active > span {
  48. &,
  49. &:hover,
  50. &:focus {
  51. z-index: 2;
  52. color: @pagination-active-color;
  53. background-color: @pagination-active-bg;
  54. border-color: @pagination-active-border;
  55. cursor: default;
  56. }
  57. }
  58. > .disabled {
  59. > span,
  60. > span:hover,
  61. > span:focus,
  62. > a,
  63. > a:hover,
  64. > a:focus {
  65. color: @pagination-disabled-color;
  66. background-color: @pagination-disabled-bg;
  67. border-color: @pagination-disabled-border;
  68. cursor: not-allowed;
  69. }
  70. }
  71. }
  72. // Sizing
  73. // --------------------------------------------------
  74. // Large
  75. .pagination-lg {
  76. .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
  77. }
  78. // Small
  79. .pagination-sm {
  80. .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
  81. }