Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Igosuki/compass-mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
michaek committed Mar 10, 2015
2 parents 58b13a1 + 3b9212c commit 5bb2922
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/_animate.scss
@@ -1 +1 @@
@import "animation";
@import "animation/animate";
1 change: 1 addition & 0 deletions lib/compass/_functions.scss
Expand Up @@ -3,3 +3,4 @@
@import "functions/gradient_support";
@import "functions/constants";
@import "functions/display";
@import "functions/colors";
4 changes: 2 additions & 2 deletions lib/compass/css3/_box-shadow.scss
Expand Up @@ -50,13 +50,13 @@ $default-box-shadow-inset : false !default;
}

// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
// Includes default arguments for color, horizontal offset, vertical offset, blur length, spread length, and inset.
// Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset.
@mixin single-box-shadow(
$color : $default-box-shadow-color,
$hoff : $default-box-shadow-h-offset,
$voff : $default-box-shadow-v-offset,
$blur : $default-box-shadow-blur,
$spread : $default-box-shadow-spread,
$color : $default-box-shadow-color,
$inset : $default-box-shadow-inset
) {
@if not ($inset == true or $inset == false or $inset == inset) {
Expand Down
1 change: 1 addition & 0 deletions lib/compass/css3/_images.scss
@@ -1,5 +1,6 @@
@import "shared";
@import "../utilities/general/hacks";
@import "../functions";

// Background property support for vendor prefixing within values.
@mixin background(
Expand Down
37 changes: 37 additions & 0 deletions lib/compass/functions/_colors.scss
@@ -0,0 +1,37 @@
//
// A partial implementation of the Ruby colors functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
//

// a genericized version of lighten/darken so that negative values can be used.
@function adjust-lightness($color, $amount) {
@return adjust-color($color, $lightness: $amount);
}

// Scales a color's lightness by some percentage.
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
// This will never return a pure light or dark color unless the amount is 100%.
@function scale-lightness($color, $amount) {
@return scale-color($color, $lightness: $amount);
}

// a genericized version of saturate/desaturate so that negative values can be used.
@function adjust-saturation($color, $amount) {
@return adjust-color($color, $saturation: $amount);
}

// Scales a color's saturation by some percentage.
// If the amount is negative, the color is desaturated, if positive, it is saturated.
// This will never return a pure saturated or desaturated color unless the amount is 100%.
@function scale-saturation($color, $amount) {
@return scale-color($color, $saturation: $amount);
}

@function shade($color, $percentage) {
@return mix(#000000, $color, $percentage);
}

@function tint($color, $percentage) {
@return mix(#ffffff, $color, $percentage);
}

6 changes: 2 additions & 4 deletions lib/compass/typography/_vertical_rhythm.scss
Expand Up @@ -180,10 +180,8 @@ $base-half-leader: $base-leader / 2;
@if not($relative-font-sizing) and $font-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border";
}
border-#{$side}: {
style: $border-style;
width: $font-unit * $width / $font-size;
};
border-#{$side}-style: $border-style;
border-#{$side}-width: $font-unit * $width / $font-size;
padding-#{$side}: rhythm($lines, $font-size, $offset: $width);
}

Expand Down

0 comments on commit 5bb2922

Please sign in to comment.