Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
5f35ce20
Commit
5f35ce20
authored
9 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
.page>{a,span => .page-link}
parent
a878c4f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/components/pagination.md
+26
-26
docs/components/pagination.md
scss/_pagination.scss
+6
-12
scss/_pagination.scss
scss/mixins/_pagination.scss
+3
-6
scss/mixins/_pagination.scss
with
35 additions
and
44 deletions
+35
-44
docs/components/pagination.md
+
26
-
26
View file @
5f35ce20
...
...
@@ -19,18 +19,18 @@ Simple pagination inspired by Rdio, great for apps and search results. The large
<nav>
<ul
class=
"pagination"
>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Previous"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</a>
</li>
<li
class=
"page"
><a
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
href=
"#"
>
4
</a></li>
<li
class=
"page"
><a
href=
"#"
>
5
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
4
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
5
</a></li>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Next"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
class=
"sr-only"
>
Next
</span>
</a>
...
...
@@ -47,20 +47,20 @@ Links are customizable for different circumstances. Use `.disabled` for unclicka
<nav>
<ul
class=
"pagination"
>
<li
class=
"page disabled"
>
<a
href=
"#"
aria-label=
"Previous"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</a>
</li>
<li
class=
"page active"
>
<a
href=
"#"
>
1
<span
class=
"sr-only"
>
(current)
</span></a>
<a
class=
"page-link"
href=
"#"
>
1
<span
class=
"sr-only"
>
(current)
</span></a>
</li>
<li
class=
"page"
><a
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
href=
"#"
>
4
</a></li>
<li
class=
"page"
><a
href=
"#"
>
5
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
4
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
5
</a></li>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Next"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
class=
"sr-only"
>
Next
</span>
</a>
...
...
@@ -75,12 +75,12 @@ You can optionally swap out active or disabled anchors for `<span>`, or omit the
<nav>
<ul
class=
"pagination"
>
<li
class=
"page disabled"
>
<span
aria-label=
"Previous"
>
<span
class=
"page-link"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</span>
</li>
<li
class=
"page active"
><span>
1
<span
class=
"sr-only"
>
(current)
</span></span></li>
<li
class=
"page active"
><span
class=
"page-link"
>
1
<span
class=
"sr-only"
>
(current)
</span></span></li>
</ul>
</nav>
{% endexample %}
...
...
@@ -94,16 +94,16 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
<nav>
<ul
class=
"pagination pagination-lg"
>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Previous"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</a>
</li>
<li
class=
"page"
><a
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
3
</a></li>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Next"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
class=
"sr-only"
>
Next
</span>
</a>
...
...
@@ -116,16 +116,16 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
<nav>
<ul
class=
"pagination pagination-sm"
>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Previous"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
class=
"sr-only"
>
Previous
</span>
</a>
</li>
<li
class=
"page"
><a
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
href=
"#"
>
3
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
1
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
2
</a></li>
<li
class=
"page"
><a
class=
"page-link"
href=
"#"
>
3
</a></li>
<li
class=
"page"
>
<a
href=
"#"
aria-label=
"Next"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
class=
"sr-only"
>
Next
</span>
</a>
...
...
This diff is collapsed.
Click to expand it.
scss/_pagination.scss
+
6
-
12
View file @
5f35ce20
...
...
@@ -8,8 +8,7 @@
.page
{
display
:
inline
;
// Remove list-style and block-level defaults
>
a
,
>
span
{
.page-link
{
position
:
relative
;
float
:
left
;
// Collapse white-space
padding
:
$pagination-padding-y
$pagination-padding-x
;
...
...
@@ -21,22 +20,19 @@
border
:
$pagination-border-width
solid
$pagination-border-color
;
}
&
:first-child
{
>
a
,
>
span
{
.page-link
{
margin-left
:
0
;
@include
border-left-radius
(
$border-radius
);
}
}
&
:last-child
{
>
a
,
>
span
{
.page-link
{
@include
border-right-radius
(
$border-radius
);
}
}
}
.page
>
a
,
.page
>
span
{
.page
.page-link
{
@include
hover-focus
{
color
:
$pagination-hover-color
;
background-color
:
$pagination-hover-bg
;
...
...
@@ -44,8 +40,7 @@
}
}
.page.active
>
a
,
.page.active
>
span
{
.page.active
.page-link
{
@include
plain-hover-focus
{
z-index
:
2
;
color
:
$pagination-active-color
;
...
...
@@ -56,8 +51,7 @@
}
.page.disabled
{
>
span
,
>
a
{
.page-link
{
@include
plain-hover-focus
{
color
:
$pagination-disabled-color
;
cursor
:
$cursor-disabled
;
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_pagination.scss
+
3
-
6
View file @
5f35ce20
...
...
@@ -2,21 +2,18 @@
@mixin
pagination-size
(
$padding-vertical
,
$padding-horizontal
,
$font-size
,
$line-height
,
$border-radius
)
{
.page
{
>
a
,
>
span
{
.page-link
{
padding
:
$padding-vertical
$padding-horizontal
;
font-size
:
$font-size
;
line-height
:
$line-height
;
}
&
:first-child
{
>
a
,
>
span
{
.page-link
{
@include
border-left-radius
(
$border-radius
);
}
}
&
:last-child
{
>
a
,
>
span
{
.page-link
{
@include
border-right-radius
(
$border-radius
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets