-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pager styles for material (#10)
* feat: add Pager styling * chore(pager): improve Pager styling * chore(pager): move layout styles to layout file * chore(pager): improve styling * refactor(pager): improve styles reuse * chore: add pager fixture
- Loading branch information
Showing
7 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Pager</title> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<!-- TODO: determine way to include the theme and font conditionally, to allow cross-theme tests --> | ||
<link rel="stylesheet" href="/packages/material/dist/all.css" /> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | ||
<style> | ||
body { | ||
font-size: 14px; | ||
font-family: Roboto, Arial, sans-serif; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="test-area"> | ||
|
||
<div class="k-pager-wrap k-widget k-floatwrap" data-role="pager"> | ||
<a href="#" title="Go to the first page" class="k-link k-pager-nav k-pager-first k-state-disabled" tabindex="-1"><span class="k-icon k-i-arrow-end-left"></span></a> | ||
<a href="#" title="Go to the previous page" class="k-link k-pager-nav k-state-disabled" tabindex="-1"><span class="k-icon k-i-arrow-60-left"></span></a> | ||
|
||
<ul class="k-pager-numbers k-reset"> | ||
<li class="k-current-page"><span class="k-link k-pager-nav">1</span></li> | ||
<li><span class="k-state-selected">1</span></li> | ||
<li><a tabindex="-1" href="#" class="k-link">2</a></li> | ||
<li><a tabindex="-1" href="#" class="k-link">3</a></li> | ||
<li><a tabindex="-1" href="#" class="k-link">4</a></li> | ||
<li><a tabindex="-1" href="#" class="k-link">5</a></li> | ||
</ul> | ||
|
||
<a href="#" title="Go to the next page" class="k-link k-pager-nav" tabindex="-1"><span class="k-icon k-i-arrow-60-right"></span></a> | ||
|
||
<a href="#" title="Go to the last page" class="k-link k-pager-nav k-pager-last" tabindex="-1"><span class="k-icon k-i-arrow-end-right"></span></a> | ||
|
||
<span class="k-pager-sizes k-label"> | ||
<!-- dropdown --> | ||
<span class="k-widget k-dropdown k-header" unselectable="on" tabindex="0"> | ||
<span unselectable="on" class="k-dropdown-wrap k-state-default"> | ||
<span unselectable="on" class="k-input">20</span> | ||
<span unselectable="on" class="k-select" aria-label="select"> | ||
<span class="k-icon k-i-arrow-60-down"></span> | ||
</span> | ||
</span> | ||
</span> | ||
items per page | ||
</span> | ||
|
||
<a href="#" class="k-pager-refresh k-link" title="Refresh"><span class="k-icon k-i-reload"></span></a> | ||
|
||
<span class="k-pager-info k-label">1 - 20 of 91 items</span> | ||
</div> | ||
|
||
|
||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@import "variables"; | ||
@import "mixins"; | ||
|
||
|
||
// Dependencies | ||
@import "common/all"; | ||
@import "common/icons"; | ||
|
||
|
||
// Component | ||
@import "pager/layout"; | ||
@import "pager/theme"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$pager-buttons-size: 36px !default; | ||
$pager-buttons-padding: 0 !default; | ||
|
||
@import "~@progress/kendo-theme-default/scss/pager/layout"; | ||
|
||
@include exports ('pager/layout/material') { | ||
$pager-elements-margin: 8px !default; | ||
$pager-elements-margin-lg: 32px !default; | ||
|
||
.k-pager-wrap { | ||
.k-pager-input, | ||
.k-pager-numbers, | ||
.k-pager-sizes { | ||
margin: 0 $pager-elements-margin; | ||
} | ||
|
||
.k-pager-sizes>.k-dropdown { | ||
margin: 0 $pager-elements-margin 0 0; | ||
} | ||
|
||
.k-pager-info { | ||
margin: 0 $pager-elements-margin-lg; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$pager-text: rgba(0, 0, 0, .54) !default; | ||
$pager-numbers-text: $base-text !default; | ||
|
||
@import "~@progress/kendo-theme-default/scss/pager/theme"; | ||
|
||
@include exports("pager/theme/material") { | ||
.k-pager-wrap { | ||
.k-pager-nav, | ||
.k-pager-numbers .k-link, | ||
.k-pager-numbers .k-state-selected, | ||
>.k-link { | ||
border-radius: 50%; | ||
} | ||
} | ||
} |