-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from belsman/feature/responsive-utils-width
feat: add responsive percentage ratio to the utils module
- Loading branch information
Showing
17 changed files
with
729 additions
and
215 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
@use "../theme.scss" as *; | ||
@use '../theme.scss' as *; | ||
|
||
$breakpoints: ( | ||
"xs": 0px, | ||
"sm": 600px, | ||
"md": 1024px, | ||
"lg": 1440px, | ||
"xl": 1920px | ||
); | ||
$breakpoints: $breakpoints; |
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
32 changes: 32 additions & 0 deletions
32
packages/vcl/flex-grid/demo/example-percentage-based-width.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<code>row</code> | ||
<div class="container demo"> | ||
<div class="row"> | ||
<div class="w-33p"><div class="democontent">.w-33p</div></div> | ||
<div class="w-33p"><div class="democontent">.w-33p</div></div> | ||
<div class="w-33p"><div class="democontent">.w-33p</div></div> | ||
</div> | ||
</div> | ||
|
||
<span>responsive percentage based width</span> | ||
<div class="container demo"> | ||
<div class="row"> | ||
<div class="w-100p w-lg-60p"> | ||
<div class="democontent">.w-100p .w-lg-60p</div> | ||
</div> | ||
<div class="w-100p w-lg-40p"> | ||
<div class="democontent">.w-100p .w-lg-40p</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<span>responsive width with golden cut</span> | ||
<div class="container demo"> | ||
<div class="row"> | ||
<div class="w-100p w-lg-gca"> | ||
<div class="democontent">.w-100p .w-lg-gca</div> | ||
</div> | ||
<div class="w-100p w-lg-gcb"> | ||
<div class="democontent">.w-100p .w-lg-gcb</div> | ||
</div> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
@forward "./clearfix.scss"; | ||
@forward './clearfix.scss'; | ||
@forward './percent-based-size.scss'; |
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,33 @@ | ||
@use 'sass:math'; | ||
|
||
@mixin percent-based-height-step5($suffix) { | ||
@if $suffix { | ||
$suffix: '-' + $suffix; | ||
} @else { | ||
$suffix: ''; | ||
} | ||
|
||
@for $i from 1 through 20 { | ||
$per: $i * 5; | ||
|
||
.h#{$suffix}-#{$per}p { | ||
height: math.percentage(math.div($per, 100)); | ||
} | ||
} | ||
} | ||
|
||
@mixin percent-based-width-step5($suffix) { | ||
@if $suffix { | ||
$suffix: '-' + $suffix; | ||
} @else { | ||
$suffix: ''; | ||
} | ||
|
||
@for $i from 1 through 20 { | ||
$per: $i * 5; | ||
|
||
.w#{$suffix}-#{$per}p { | ||
width: math.percentage(math.div($per, 100)); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.