diff --git a/css/materialize.css b/css/materialize.css index ef4e98fd46..9255839cc0 100644 --- a/css/materialize.css +++ b/css/materialize.css @@ -2,79 +2,163 @@ float: left; } @media only screen and (min-width: 0) { .row .col.small-1 { - width: 8.33333%; } + width: 8.33333%; + margin-left: 0; } .row .col.small-2 { - width: 16.66667%; } + width: 16.66667%; + margin-left: 0; } .row .col.small-3 { - width: 25%; } + width: 25%; + margin-left: 0; } .row .col.small-4 { - width: 33.33333%; } + width: 33.33333%; + margin-left: 0; } .row .col.small-5 { - width: 41.66667%; } + width: 41.66667%; + margin-left: 0; } .row .col.small-6 { - width: 50%; } + width: 50%; + margin-left: 0; } .row .col.small-7 { - width: 58.33333%; } + width: 58.33333%; + margin-left: 0; } .row .col.small-8 { - width: 66.66667%; } + width: 66.66667%; + margin-left: 0; } .row .col.small-9 { - width: 75%; } + width: 75%; + margin-left: 0; } .row .col.small-10 { - width: 83.33333%; } + width: 83.33333%; + margin-left: 0; } .row .col.small-11 { - width: 91.66667%; } + width: 91.66667%; + margin-left: 0; } .row .col.small-12 { - width: 100%; } } + width: 100%; + margin-left: 0; } + .row .col.small-offset-1 { + margin-left: 8.33333%; } + .row .col.small-offset-2 { + margin-left: 16.66667%; } + .row .col.small-offset-3 { + margin-left: 25%; } + .row .col.small-offset-4 { + margin-left: 33.33333%; } + .row .col.small-offset-5 { + margin-left: 41.66667%; } + .row .col.small-offset-6 { + margin-left: 50%; } + .row .col.small-offset-7 { + margin-left: 58.33333%; } + .row .col.small-offset-8 { + margin-left: 66.66667%; } + .row .col.small-offset-9 { + margin-left: 75%; } + .row .col.small-offset-10 { + margin-left: 83.33333%; } + .row .col.small-offset-11 { + margin-left: 91.66667%; } + .row .col.small-offset-12 { + margin-left: 100%; } } @media only screen and (min-width: 768px) { .row .col.medium-1 { - width: 8.33333%; } + width: 8.33333%; + margin-left: 0; } .row .col.medium-2 { - width: 16.66667%; } + width: 16.66667%; + margin-left: 0; } .row .col.medium-3 { - width: 25%; } + width: 25%; + margin-left: 0; } .row .col.medium-4 { - width: 33.33333%; } + width: 33.33333%; + margin-left: 0; } .row .col.medium-5 { - width: 41.66667%; } + width: 41.66667%; + margin-left: 0; } .row .col.medium-6 { - width: 50%; } + width: 50%; + margin-left: 0; } .row .col.medium-7 { - width: 58.33333%; } + width: 58.33333%; + margin-left: 0; } .row .col.medium-8 { - width: 66.66667%; } + width: 66.66667%; + margin-left: 0; } .row .col.medium-9 { - width: 75%; } + width: 75%; + margin-left: 0; } .row .col.medium-10 { - width: 83.33333%; } + width: 83.33333%; + margin-left: 0; } .row .col.medium-11 { - width: 91.66667%; } + width: 91.66667%; + margin-left: 0; } .row .col.medium-12 { - width: 100%; } } + width: 100%; + margin-left: 0; } + .row .col.medium-offset-1 { + margin-left: 8.33333%; } + .row .col.medium-offset-2 { + margin-left: 16.66667%; } + .row .col.medium-offset-3 { + margin-left: 25%; } + .row .col.medium-offset-4 { + margin-left: 33.33333%; } + .row .col.medium-offset-5 { + margin-left: 41.66667%; } + .row .col.medium-offset-6 { + margin-left: 50%; } + .row .col.medium-offset-7 { + margin-left: 58.33333%; } + .row .col.medium-offset-8 { + margin-left: 66.66667%; } + .row .col.medium-offset-9 { + margin-left: 75%; } + .row .col.medium-offset-10 { + margin-left: 83.33333%; } + .row .col.medium-offset-11 { + margin-left: 91.66667%; } + .row .col.medium-offset-12 { + margin-left: 100%; } } @media only screen and (min-width: 992px) { .row .col.large-1 { - width: 8.33333%; } + width: 8.33333%; + margin-left: 0; } .row .col.large-2 { - width: 16.66667%; } + width: 16.66667%; + margin-left: 0; } .row .col.large-3 { - width: 25%; } + width: 25%; + margin-left: 0; } .row .col.large-4 { - width: 33.33333%; } + width: 33.33333%; + margin-left: 0; } .row .col.large-5 { - width: 41.66667%; } + width: 41.66667%; + margin-left: 0; } .row .col.large-6 { - width: 50%; } + width: 50%; + margin-left: 0; } .row .col.large-7 { - width: 58.33333%; } + width: 58.33333%; + margin-left: 0; } .row .col.large-8 { - width: 66.66667%; } + width: 66.66667%; + margin-left: 0; } .row .col.large-9 { - width: 75%; } + width: 75%; + margin-left: 0; } .row .col.large-10 { - width: 83.33333%; } + width: 83.33333%; + margin-left: 0; } .row .col.large-11 { - width: 91.66667%; } + width: 91.66667%; + margin-left: 0; } .row .col.large-12 { - width: 100%; } } + width: 100%; + margin-left: 0; } } html { font-size: 14px; } diff --git a/index.html b/index.html index 6cab1ac668..dd24f9288b 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,9 @@ Materialize - - Roboto K + - + \ No newline at end of file diff --git a/sass/components/_global.scss b/sass/components/_global.scss index 31cbe28397..0e2558e28e 100644 --- a/sass/components/_global.scss +++ b/sass/components/_global.scss @@ -1,11 +1,12 @@ @charset "UTF-8"; // Media Query Ranges -$small-screen: 768px; +$small-screen: 480px; +$medium-screen: 768px; $large-screen: 992px; $small-and-up: "only screen and (min-width : 0)"; -$medium-and-up: "only screen and (min-width : #{$small-screen})"; +$medium-and-up: "only screen and (min-width : #{$medium-screen})"; $large-and-up: "only screen and (min-width : #{$large-screen})"; diff --git a/sass/components/_grid.scss b/sass/components/_grid.scss index fa79f7519f..b46b0f4859 100644 --- a/sass/components/_grid.scss +++ b/sass/components/_grid.scss @@ -8,7 +8,18 @@ $i: 1; @while $i <= $num-cols { $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.small-#{$i} { width: $perc; } + &.small-#{$i} { + width: $perc; + margin-left: 0; + } + $i: $i + 1; + } + $i: 1; + @while $i <= $num-cols { + $perc: unquote((100 / ($num-cols / $i)) + "%"); + &.small-offset-#{$i} { + margin-left: $perc; + } $i: $i + 1; } @@ -19,7 +30,18 @@ $i: 1; @while $i <= $num-cols { $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.medium-#{$i} { width: $perc; } + &.medium-#{$i} { + width: $perc; + margin-left: 0; + } + $i: $i + 1; + } + $i: 1; + @while $i <= $num-cols { + $perc: unquote((100 / ($num-cols / $i)) + "%"); + &.medium-offset-#{$i} { + margin-left: $perc; + } $i: $i + 1; } @@ -30,7 +52,17 @@ $i: 1; @while $i <= $num-cols { $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.large-#{$i} { width: $perc; } + &.large-#{$i} { + width: $perc; + margin-left: 0; + } + $i: $i + 1; + } + @while $i <= $num-cols { + $perc: unquote((100 / ($num-cols / $i)) + "%"); + &.large-offset-#{$i} { + margin-left: $perc; + } $i: $i + 1; } diff --git a/sass/components/_prefixer.scss b/sass/components/_prefixer.scss new file mode 100755 index 0000000000..050ec87848 --- /dev/null +++ b/sass/components/_prefixer.scss @@ -0,0 +1,360 @@ +//--------------------------------------------------- +// SASS Prefixer +// ------------------------------------------------- +// TABLE OF CONTENTS +// (*) denotes a syntax-sugar helper +// ------------------------------------------------- +// +// animation($args) +// animation-delay($delay) +// animation-direction($direction) +// animation-duration($duration) +// animation-fill-mode($mode) +// animation-iteration-count($count) +// animation-name($name) +// animation-play-state($state) +// animation-timing-function($function) +// background-size($args) +// border-radius($args) +// box-shadow($args) +// inner-shadow($args) * +// box-sizing($args) +// border-box() * +// content-box() * +// columns($args) +// column-count($count) +// column-gap($gap) +// column-rule($args) +// column-width($width) +// gradient($default,$start,$stop) * +// linear-gradient-top($default,$color1,$stop1,$color2,$stop2,[$color3,$stop3,$color4,$stop4])* +// linear-gradient-left($default,$color1,$stop1,$color2,$stop2,[$color3,$stop3,$color4,$stop4])* +// opacity($factor) +// transform($args) +// transform-origin($args) +// transform-style($style) +// rotate($deg) +// scale($factor) +// translate($x,$y) +// translate3d($x,$y,$z) +// translateHardware($x,$y) * +// text-shadow($args) +// transition($args) +// transition-delay($delay) +// transition-duration($duration) +// transition-property($property) +// transition-timing-function($function) + + +// Animation + +@mixin animation($args) { + -webkit-animation: $args; + -moz-animation: $args; + -ms-animation: $args; + -o-animation: $args; + animation: $args; +} +@mixin animation-delay($delay) { + -webkit-animation-delay: $delay; + -moz-animation-delay: $delay; + -ms-animation-delay: $delay; + -o-animation-delay: $delay; + animation-delay: $delay; +} +@mixin animation-direction($direction) { + -webkit-animation-direction: $direction; + -moz-animation-direction: $direction; + -ms-animation-direction: $direction; + -o-animation-direction: $direction; +} +@mixin animation-duration($duration) { + -webkit-animation-duration: $duration; + -moz-animation-duration: $duration; + -ms-animation-duration: $duration; + -o-animation-duration: $duration; +} +@mixin animation-fill-mode($mode) { + -webkit-animation-fill-mode: $mode; + -moz-animation-fill-mode: $mode; + -ms-animation-fill-mode: $mode; + -o-animation-fill-mode: $mode; + animation-fill-mode: $mode; +} +@mixin animation-iteration-count($count) { + -webkit-animation-iteration-count: $count; + -moz-animation-iteration-count: $count; + -ms-animation-iteration-count: $count; + -o-animation-iteration-count: $count; + animation-iteration-count: $count; +} +@mixin animation-name($name) { + -webkit-animation-name: $name; + -moz-animation-name: $name; + -ms-animation-name: $name; + -o-animation-name: $name; + animation-name: $name; +} +@mixin animation-play-state($state) { + -webkit-animation-play-state: $state; + -moz-animation-play-state: $state; + -ms-animation-play-state: $state; + -o-animation-play-state: $state; + animation-play-state: $state; +} +@mixin animation-timing-function($function) { + -webkit-animation-timing-function: $function; + -moz-animation-timing-function: $function; + -ms-animation-timing-function: $function; + -o-animation-timing-function: $function; + animation-timing-function: $function; +} + +// Backface-visibility + +@mixin backface-visibility($args) { + -webkit-backface-visibility: $args; + -moz-backface-visibility: $args; + -ms-backface-visibility: $args; + backface-visibility: $args; +} + + +// Background Size + +@mixin background-size($args) { + -webkit-background-size: $args; + background-size: $args; +} + + +// Border Radius + +@mixin border-radius($args) { + -webkit-border-radius: $args; + -moz-border-radius: $args; + border-radius: $args; + + background-clip: padding-box; +} + + +// Box Shadows + +@mixin box-shadow($args) { + -webkit-box-shadow: $args; + -moz-box-shadow: $args; + box-shadow: $args; +} +@mixin inner-shadow($args) { + @include box-shadow(inset $args); +} + + +// Box Sizing + +@mixin box-sizing($args) { + -webkit-box-sizing: $args; + -moz-box-sizing: $args; + box-sizing: $args; +} +@mixin border-box(){ + @include box-sizing(border-box); +} +@mixin content-box(){ + @include box-sizing(content-box); +} + + +// Columns + +@mixin columns($args) { + -webkit-columns: $args; + -moz-columns: $args; + columns: $args; +} +@mixin column-count($count) { + -webkit-column-count: $count; + -moz-column-count: $count; + column-count: $count; +} +@mixin column-gap($gap) { + -webkit-column-gap: $gap; + -moz-column-gap: $gap; + column-gap: $gap; +} +@mixin column-width($width) { + -webkit-column-width: $width; + -moz-column-width: $width; + column-width: $width; +} +@mixin column-rule($args) { + -webkit-column-rule: $args; + -moz-column-rule: $args; + column-rule: $args; +} + + +// Gradients + +@mixin gradient($default: #F5F5F5, $start: #EEE, $stop: #FFF) { + @include linear-gradient-top($default,$start,0%,$stop,100%); +} +@mixin linear-gradient-top($default,$color1,$stop1,$color2,$stop2) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop($stop1, $color1), color-stop($stop2 $color2)); + background-image: -webkit-linear-gradient(top, $color1 $stop1, $color2 $stop2); + background-image: -moz-linear-gradient(top, $color1 $stop1, $color2 $stop2); + background-image: -ms-linear-gradient(top, $color1 $stop1, $color2 $stop2); + background-image: -o-linear-gradient(top, $color1 $stop1, $color2 $stop2); + background-image: linear-gradient(top, $color1 $stop1, $color2 $stop2); +} +@mixin linear-gradient-top($default,$color1,$stop1,$color2,$stop2,$color3,$stop3) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop($stop1, $color1), color-stop($stop2 $color2), color-stop($stop3 $color3)); + background-image: -webkit-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -moz-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -ms-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -o-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3); +} +@mixin linear-gradient-top($default,$color1,$stop1,$color2,$stop2,$color3,$stop3,$color4,$stop4) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop($stop1, $color1), color-stop($stop2 $color2), color-stop($stop3 $color3), color-stop($stop4 $color4)); + background-image: -webkit-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -moz-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -ms-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -o-linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: linear-gradient(top, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); +} +@mixin linear-gradient-left($default,$color1,$stop1,$color2,$stop2) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left top, color-stop($stop1, $color1), color-stop($stop2 $color2)); + background-image: -webkit-linear-gradient(left, $color1 $stop1, $color2 $stop2); + background-image: -moz-linear-gradient(left, $color1 $stop1, $color2 $stop2); + background-image: -ms-linear-gradient(left, $color1 $stop1, $color2 $stop2); + background-image: -o-linear-gradient(left, $color1 $stop1, $color2 $stop2); + background-image: linear-gradient(left, $color1 $stop1, $color2 $stop2); +} +@mixin linear-gradient-left($default,$color1,$stop1,$color2,$stop2,$color3,$stop3) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left top, color-stop($stop1, $color1), color-stop($stop2 $color2), color-stop($stop3 $color3)); + background-image: -webkit-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -moz-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -ms-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: -o-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3); + background-image: linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3); +} +@mixin linear-gradient-left($default,$color1,$stop1,$color2,$stop2,$color3,$stop3,$color4,$stop4) { + background-color: $default; + background-image: -webkit-gradient(linear, left top, left top, color-stop($stop1, $color1), color-stop($stop2 $color2), color-stop($stop3 $color3), color-stop($stop4 $color4)); + background-image: -webkit-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -moz-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -ms-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: -o-linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); + background-image: linear-gradient(left, $color1 $stop1, $color2 $stop2, $color3 $stop3, $color4 $stop4); +} + + +// Opacity + +@mixin opacity($factor) { + $iefactor: $factor*100; + -ms-filter: "progid:DXImageTransform@mixin Microsoft@mixin Alpha(Opacity=${iefactor})"; + filter: "alpha(opacity=(${iefactor}))"; + -moz-opacity: $factor; + -khtml-opacity: $factor; + opacity: $factor; +} + + +// Text Shadow + +@mixin text-shadow($args) { + text-shadow: $args; +} + + +// Transforms + +@mixin transform($args) { + -webkit-transform: $args; + -moz-transform: $args; + -ms-transform: $args; + -o-transform: $args; + transform: $args; +} +@mixin transform-origin($args) { + -webkit-transform-origin: $args; + -moz-transform-origin: $args; + -ms-transform-origin: $args; + -o-transform-origin: $args; + transform-origin: $args; +} +@mixin transform-style($style) { + -webkit-transform-style: $style; + -moz-transform-style: $style; + -ms-transform-style: $style; + -o-transform-style: $style; + transform-style: $style; +} +@mixin rotate($deg:45deg){ + @include transform(rotate($deg)); +} +@mixin scale($factor:.5){ + @include transform(scale($factor)); +} +@mixin translate($x,$y){ + @include transform(translate($x,$y)); +} +@mixin translate3d($x,$y,$z) { + @include transform(translate3d($x,$y,$z)); +} +@mixin translateHardware($x,$y) { + @include translate($x,$y); + -webkit-transform: translate3d($x,$y,0); + -moz-transform: translate3d($x,$y,0); + -o-transform: translate3d($x,$y,0); + -ms-transform: translate3d($x,$y,0); + transform: translate3d($x,$y,0); +} + + +// Transitions + +@mixin transition($args:200ms) { + -webkit-transition: $args; + -moz-transition: $args; + -o-transition: $args; + -ms-transition: $args; + transition: $args; +} +@mixin transition-delay($delay:0) { + -webkit-transition-delay: $delay; + -moz-transition-delay: $delay; + -o-transition-delay: $delay; + -ms-transition-delay: $delay; + transition-delay: $delay; +} +@mixin transition-duration($duration:200ms) { + -webkit-transition-duration: $duration; + -moz-transition-duration: $duration; + -o-transition-duration: $duration; + -ms-transition-duration: $duration; + transition-duration: $duration; +} +@mixin transition-property($property:all) { + -webkit-transition-property: $property; + -moz-transition-property: $property; + -o-transition-property: $property; + -ms-transition-property: $property; + transition-property: $property; +} +@mixin transition-timing-function($function:ease) { + -webkit-transition-timing-function: $function; + -moz-transition-timing-function: $function; + -o-transition-timing-function: $function; + -ms-transition-timing-function: $function; + transition-timing-function: $function; +} + diff --git a/sass/materialize.scss b/sass/materialize.scss index 41c435c8c4..fb8183d1ef 100644 --- a/sass/materialize.scss +++ b/sass/materialize.scss @@ -1,5 +1,7 @@ @charset "UTF-8"; +@import "components/prefixer"; + @import "components/global"; @import "components/grid"; @import "components/typography";