mirror of
https://github.com/pierre42100/comunic
synced 2025-06-21 17:45:18 +00:00
First commit
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
@import "direction";
|
||||
@import "range";
|
@ -0,0 +1,37 @@
|
||||
@function opposite-direction($dir) {
|
||||
@if $dir == 'left' {
|
||||
@return right;
|
||||
}
|
||||
@else if $dir == 'right' {
|
||||
@return left;
|
||||
}
|
||||
@else if $dir == 'ltr' {
|
||||
@return rtl;
|
||||
}
|
||||
@else if $dir == 'rtl' {
|
||||
@return ltr;
|
||||
}
|
||||
@else if $dir == 'top' {
|
||||
@return bottom;
|
||||
}
|
||||
@else if $dir == 'bottom' {
|
||||
@return top;
|
||||
}
|
||||
@else {
|
||||
@warn "#{$dir} is not a direction! Make sure your direction is all lowercase!";
|
||||
@return false;
|
||||
}
|
||||
}
|
||||
|
||||
@function named-direction($dir) {
|
||||
@if $dir == 'ltr' {
|
||||
@return left;
|
||||
}
|
||||
@else if $dir == 'rtl' {
|
||||
@return right;
|
||||
}
|
||||
@else {
|
||||
@warn "#{$dir} is not a valid HTML direction! Make sure you are using a valid HTML direction";
|
||||
@return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
@function lower-bound($range){
|
||||
@if length($range) <= 0 {
|
||||
@return 0;
|
||||
}
|
||||
@return nth($range,1);
|
||||
}
|
||||
|
||||
@function upper-bound($range) {
|
||||
@if length($range) < 2 {
|
||||
@return 999999999999;
|
||||
}
|
||||
@return nth($range, 2);
|
||||
}
|
Reference in New Issue
Block a user