-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(utils): add background position and size
- Loading branch information
1 parent
0bc7f44
commit 1681b4f
Showing
5 changed files
with
190 additions
and
0 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
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 @@ | ||
/// This is equivalent to `background-position: center;`. | ||
/// @example background-position: center; | ||
/// @name .k-bg-center | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: top;`. | ||
/// @example background-position: top; | ||
/// @name .k-bg-top | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: right;`. | ||
/// @example background-position: right; | ||
/// @name .k-bg-right | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: bottom;`. | ||
/// @example background-position: bottom; | ||
/// @name .k-bg-bottom | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: left;`. | ||
/// @example background-position: left; | ||
/// @name .k-bg-left | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: top left;`. | ||
/// @example background-position: top left; | ||
/// @name .k-bg-top-left | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: top right;`. | ||
/// @example background-position: top right; | ||
/// @name .k-bg-top-right | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: bottom left;`. | ||
/// @example background-position: bottom left; | ||
/// @name .k-bg-bottom-left | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-position: bottom right;`. | ||
/// @example background-position: bottom right; | ||
/// @name .k-bg-bottom-right | ||
/// @group background-position | ||
/// @contextType css | ||
|
||
@mixin kendo-utils--background--background-position() { | ||
|
||
// Background position utility classes | ||
$kendo-utils-background-position: k-map-get( $kendo-utils, "background-position" ) !default; | ||
@include generate-utils( bg, background-position, $kendo-utils-background-position ); | ||
|
||
} |
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 @@ | ||
/// This is equivalent to `background-size: auto;`. | ||
/// @example background-size: auto; | ||
/// @name .k-bg-auto | ||
/// @group background-size | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-size: cover;`. | ||
/// @example background-size: cover; | ||
/// @name .k-bg-cover | ||
/// @group background-size | ||
/// @contextType css | ||
|
||
/// This is equivalent to `background-size: contain;`. | ||
/// @example background-size: contain; | ||
/// @name .k-bg-contain | ||
/// @group background-size | ||
/// @contextType css | ||
|
||
@mixin kendo-utils--background--background-size() { | ||
|
||
// Background size utility classes | ||
$kendo-utils-background-size: k-map-get( $kendo-utils, "background-size" ) !default; | ||
@include generate-utils( bg, background-size, $kendo-utils-background-size ); | ||
|
||
} |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
@import "./_background-clip.scss"; | ||
@import "./_background-color.scss"; | ||
@import "./_background-position.scss"; | ||
@import "./_background-size.scss"; | ||
|
||
|
||
@mixin kendo-utils--background() { | ||
@include kendo-utils--background--background-clip(); | ||
@include kendo-utils--background--background-color(); | ||
@include kendo-utils--background--background-position(); | ||
@include kendo-utils--background--background-size(); | ||
} |