-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(utils): implement responsive layout system
- Loading branch information
Showing
15 changed files
with
252 additions
and
58 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
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
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
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,48 @@ | ||
@mixin kendo-utils--responsive-layout--col() { | ||
|
||
// Column | ||
.k-col { | ||
flex: 1 0 0%; | ||
} | ||
|
||
// Column Sizes | ||
@for $i from 1 through 100 { | ||
.k-col-size-#{$i} { | ||
flex: 0 0 auto; | ||
width: $i * 1%; | ||
} | ||
} | ||
|
||
@each $i, $n in $kendo-fraction-classes { | ||
.k-col-size-#{$i} { | ||
flex: 0 0 auto; | ||
width: $n; | ||
} | ||
} | ||
|
||
} | ||
|
||
@mixin kendo-utils--responsive-layout--col--responsive($key) { | ||
|
||
// Column responsive | ||
.k-col-#{$key} { | ||
flex: 1 0 0%; | ||
} | ||
|
||
// Column Sizes responsive | ||
@for $i from 1 through 100 { | ||
.k-col-#{$key}-size-#{$i} { | ||
flex: 0 0 auto; | ||
width: $i * 1%; | ||
} | ||
} | ||
|
||
@each $i, $n in $kendo-fraction-classes { | ||
.k-col-#{$key}-size-#{$i} { | ||
flex: 0 0 auto; | ||
width: $n; | ||
} | ||
} | ||
} | ||
|
||
|
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,22 @@ | ||
@mixin kendo-utils--responsive-layout--container() { | ||
|
||
// Page Container | ||
.k-container, | ||
.k-container-fluid { | ||
margin: 0 auto; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
box-sizing: border-box; | ||
} | ||
|
||
} | ||
|
||
@mixin kendo-utils--responsive-layout--container--responsive($key, $val) { | ||
|
||
// Page Container responsive | ||
.k-container { | ||
max-width: var(--kendo-container-#{$key}-max-width, #{$val}); | ||
} | ||
|
||
} |
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 @@ | ||
@mixin kendo-utils--responsive-layout--row() { | ||
|
||
// Row | ||
.k-row { | ||
display: flex; | ||
flex-flow: row wrap; | ||
box-sizing: border-box; | ||
|
||
> * { | ||
width: 100%; | ||
box-sizing: border-box; | ||
} | ||
} | ||
|
||
} |
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,22 @@ | ||
@import "./_container.scss"; | ||
@import "./_row.scss"; | ||
@import "./_col.scss"; | ||
|
||
|
||
@mixin kendo-utils--responsive-layout() { | ||
@include kendo-utils--responsive-layout--container(); | ||
@include kendo-utils--responsive-layout--row(); | ||
@include kendo-utils--responsive-layout--col(); | ||
|
||
@each $key, $val in $kendo-breakpoints { | ||
@include kendo-breakpoint-up($key) { | ||
@include kendo-utils--responsive-layout--col--responsive($key); | ||
} | ||
} | ||
|
||
@each $key, $val in $kendo-container-max-widths { | ||
@include kendo-breakpoint-up($key) { | ||
@include kendo-utils--responsive-layout--container--responsive($key, $val); | ||
} | ||
} | ||
} |
Oops, something went wrong.