Skip to content

Commit 07e2463

Browse files
committed
refactor(Pagination) implemented button scss styling mixin #566
1 parent ff267a4 commit 07e2463

File tree

3 files changed

+56
-9
lines changed

3 files changed

+56
-9
lines changed

sass/components/_global.scss

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ textarea {
1919
font-family: $font-stack;
2020
}
2121

22-
a { color: $link-color; text-decoration: none;
22+
a { color: $link-color; text-decoration: none;
2323
-webkit-tap-highlight-color: transparent; // Gets rid of tap active state
2424
}
2525

@@ -117,7 +117,7 @@ i {
117117

118118
// Modal
119119
html.noscroll {
120-
position: fixed;
120+
position: fixed;
121121
overflow-y: scroll;
122122
width: 100%;
123123
}
@@ -129,8 +129,9 @@ video.responsive-video {
129129
height: auto;
130130
}
131131

132+
// moved to own component styling file @see https://github.com/materializecss/materialize/issues/566
132133
// Pagination
133-
.pagination {
134+
/*.pagination {
134135
135136
li {
136137
display: inline-block;
@@ -192,7 +193,7 @@ video.responsive-video {
192193
white-space: nowrap;
193194
}
194195
}
195-
}
196+
}*/
196197

197198
// Breadcrumbs
198199
.breadcrumb {
@@ -526,7 +527,7 @@ $spacing-shortcuts: ("margin": "m", "padding": "p") !default;
526527
$spacing-directions: ("top": "t", "right": "r", "bottom": "b", "left": "l") !default;
527528
$spacing-horizontal: "x" !default;
528529
$spacing-vertical: "y" !default;
529-
$spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "auto": auto) !default;
530+
$spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "auto": auto) !default;
530531

531532
@each $property, $shortcut in $spacing-shortcuts{
532533
@each $name, $value in $spacing-values{
@@ -537,7 +538,7 @@ $spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5
537538
// (t, b, r, l) spacing
538539
@each $direction, $suffix in $spacing-directions{
539540
.#{$shortcut}#{$suffix}-#{$name}{
540-
#{$property}-#{$direction}: $value !important
541+
#{$property}-#{$direction}: $value !important
541542
}
542543
}
543544
// x spacing
@@ -552,7 +553,7 @@ $spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5
552553
.#{$shortcut}#{$spacing-vertical}-#{$name}{
553554
#{$property}-top: $value !important;
554555
#{$property}-bottom: $value !important;
555-
}
556-
}
556+
}
557+
}
557558
}
558-
}
559+
}

sass/components/_pagination.scss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Pagination
2+
.pagination {
3+
li {
4+
display: inline-block;
5+
vertical-align: top;
6+
7+
a {
8+
@include btn($height: 2rem, $padding-left: .66rem, $padding-right: .66rem, $font-size: 1.2rem);
9+
}
10+
11+
&.active a {
12+
@include btn-filled;
13+
}
14+
15+
&.disabled a {
16+
@include btn-disabled;
17+
}
18+
19+
i {
20+
font-size: 2rem;
21+
}
22+
}
23+
24+
li.pages ul li {
25+
display: inline-block;
26+
float: none;
27+
}
28+
}
29+
30+
@media #{$medium-and-down} {
31+
.pagination {
32+
width: 100%;
33+
34+
li.prev,
35+
li.next {
36+
width: 10%;
37+
}
38+
39+
li.pages {
40+
width: 80%;
41+
overflow: hidden;
42+
white-space: nowrap;
43+
}
44+
}
45+
}

sass/materialize.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@
4646
@import "components/pulse";
4747
@import "components/datepicker";
4848
@import "components/timepicker";
49+
@import "components/pagination";

0 commit comments

Comments
 (0)