diff --git a/src/components/CourseEditor.vue b/src/components/CourseEditor.vue index 511ed15..35a231a 100644 --- a/src/components/CourseEditor.vue +++ b/src/components/CourseEditor.vue @@ -1,191 +1,212 @@ diff --git a/src/styles/_mixins.scss b/src/styles/_mixins.scss index 76b53aa..e83d77c 100644 --- a/src/styles/_mixins.scss +++ b/src/styles/_mixins.scss @@ -1,120 +1,120 @@ @import "variables"; // Makes the @content apply to the given $breakpointName and wider. @mixin media-breakpoint-up($breakpointName) { $width: map-get($breakpoints, $breakpointName); @if $width { @media (min-width: $width) { @content; } } @else { @error "Impossible to find breakpoint #{$breakpointName}"; } } @function strip-unit($num) { @return $num / ($num * 0 + 1); } @mixin fluid-font($min-vw, $max-vw, $min-font-size, $max-font-size) { $u1: unit($min-vw); $u2: unit($max-vw); $u3: unit($min-font-size); $u4: unit($max-font-size); @if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 { & { font-size: $min-font-size; @media screen and (min-width: $min-vw) { font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})); } @media screen and (min-width: $max-vw) { font-size: $max-font-size; } } } } @mixin container() { margin-right: auto; margin-left: auto; padding-right: 0.5rem; padding-left: 0.5rem; @each $breakpoint, $container-max-width in $container-max-widths { @include media-breakpoint-up($breakpoint) { width: $container-max-width; max-width: 100%; } } } @mixin input() { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; font-size: 1rem; - height: 2.25rem; + min-height: 2.25rem; line-height: 1; vertical-align: top; -moz-appearance: none; -webkit-appearance: none; &:disabled { cursor: not-allowed; } } @mixin card-padding() { @each $breakpoint, $card-padding in $card-paddings { @include media-breakpoint-up($breakpoint) { padding: $card-padding; padding-bottom: $card-padding + 0.5rem; max-width: 100%; } } } /// Gives a card depth effect. /// @param {Number} $depth - depth level (between 1 and 5) /// @link http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality Google Design /// @requires {function} top-shadow /// @requires {function} bottom-shadow @mixin card($depth) { background-color: $card-bg; @include card-padding(); @if $depth < 1 { box-shadow: none; } @else if $depth > 5 { @warn "Invalid $depth `#{$depth}` for mixin `card`."; } @else { box-shadow: bottom-shadow($depth), top-shadow($depth); } } /// Computes a top-shadow for a card effect. /// @param {Number} $depth - depth level /// @return {List} @function top-shadow($depth) { $primary-offset: nth(1.5 3 10 14 19, $depth) * 1px; $blur: nth(1.5 3 10 14 19, $depth) * 4px; $color: rgba(black, nth(0.12 0.16 0.19 0.25 0.3, $depth)); @return 0 $primary-offset $blur $color; } /// Computes a bottom-shadow for a card effect. /// @param {Number} $depth - depth level /// @return {List} @function bottom-shadow($depth) { $primary-offset: nth(1.5 3 6 10 15, $depth) * 1px; $blur: nth(1 3 3 5 6, $depth) * 4px; $color: rgba(black, nth(0.24 0.23 0.23 0.22 0.22, $depth)); @return 0 $primary-offset $blur $color; }