Skip to content

Commit a87fc04

Browse files
authored
Merge pull request #33 from kni-labs/cover
add cover
2 parents cd17d02 + bdd6842 commit a87fc04

File tree

5 files changed

+1636
-8
lines changed

5 files changed

+1636
-8
lines changed

.hound.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit a936336763eacb049c9b5f6bfe16896759ef0bb4
1+
Subproject commit daff4620aa00d3fee9998a4da8bc563fecfde458

knapsack/_layout.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,25 @@
6464
}
6565
}
6666

67+
//- Mixin: Cover
68+
///
69+
/// Useful shortcut for setting background size to cover
70+
///
71+
/// @param {variable} $x [center] - x position
72+
/// @param {variable} $y [center] - y position
73+
/// @group layout
74+
/// @example
75+
/// div.hero {
76+
/// @include cover(top, center);
77+
/// }
78+
79+
@mixin cover($x: center, $y: center) {
80+
width: 100%;
81+
height: 100%;
82+
background-size: cover;
83+
background-repeat: no-repeat;
84+
background-position: $x $y;
85+
}
6786
//- Mixin: Full Page
6887
///
6988
/// Create a responsive full page section with intelligent defaults.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "knapsack",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "A handy bag of sass utilities and mixins",
55
"main": "knapsack/_index.scss",
66
"repository": {

0 commit comments

Comments
 (0)