Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compass stylesheets #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
[ -d "$STYLESHEETS" ] && rm -r "$STYLESHEETS"
mkdir "$STYLESHEETS"

cp -r compass/frameworks/compass/stylesheets/* "$STYLESHEETS"
cp -r compass/core/stylesheets/* "$STYLESHEETS"

# rename all the files
for file in $(find "$STYLESHEETS" | grep scss$); do
Expand Down
54 changes: 54 additions & 0 deletions stylesheets/compass/configuration.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
$project-path: null !default;
$debug-configuration: false !default;
$compass-initialized: false !default;
$compass-configured: false !default;

@mixin debug-compass-configuration {
@if $debug-configuration {
/* Compass Configuration: */
@each $setting, $value in compass-configuration() {
/* #{$setting}: #{inspect($value)} */
}
}
}

// This mixin resets the compass configuration
// and then initializes it with the sass options
// set in the environment. It is immediately called during import.
// It's unlikely you'll need to call this mixin yourself.
@mixin compass-initializer($project-path: $project-path) {
@if not $compass-initialized and not using-compass-compiler() {
$default-configuration: reset-configuration();
$default-configuration: add-sass-configuration($project-path);
}
$compass-initialized: true !global;
@include debug-compass-configuration;
}
@include compass-initializer;

// `$options`:
// A map of compass configuration options.
// E.g. @include compass-configuration((asset-host:
// Keywords style ar
// `$reconfigure`:
// When unset, if compass-configuration is called more than once, a warning will
// be issued and all calls after the first will be ignored.
// When set to `false`, all subsequent calls will be ignored without a warning.
// When set to `true`, the configuration will be added to any existing configuration.
@mixin compass-configuration($options: (), $reconfigure: null, $arguments...) {
@if not at-stylesheet-root() {
// this should be @error once that exists.
@warn "include compass-configuration from the root level of your stylesheet."
}
@if not $compass-configured or $reconfigure {
$options: map-merge($options, keywords($arguments));
@if length($arguments) > 0 {
@warn "compass-configuration accepts keyword arguments or a single map of options. Got: #{inspect($arguments)}."
}
$invoke: add-configuration($options);
@include debug-compass-configuration;
$compass-configured: true !global;
} @else if $reconfigure == null {
@warn "Compass was already configured for this stylesheet."
}
}
3 changes: 2 additions & 1 deletion stylesheets/compass/css3.scss
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import "css3/text-shadow";
@import "css3/columns";
@import "css3/box-sizing";
@import "css3/box";
@import "css3/flexbox";
@import "css3/images";
@import "css3/background-clip";
@import "css3/background-origin";
Expand All @@ -14,6 +14,7 @@
@import "css3/transform";
@import "css3/transition";
@import "css3/appearance";
@import "css3/animation";
@import "css3/regions";
@import "css3/hyphenation";
@import "css3/filter";
Expand Down
122 changes: 122 additions & 0 deletions stylesheets/compass/css3/animation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
@import "compass/support";

// The prefixed support threshold for animation.
// Defaults to the $graceful-usage-threshold.
$animation-support-threshold: $graceful-usage-threshold !default;


// Name of any animation as a string.
$default-animation-name : null !default;

// Duration of the entire animation in seconds.
$default-animation-duration : null !default;

// Delay for start of animation in seconds.
$default-animation-delay : null !default;

// The timing function(s) to be used between keyframes. [ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier($number, $number, $number, $number)]
$default-animation-timing-function : null !default;

// The number of times an animation cycle is played. [infinite | $number]
$default-animation-iteration-count : null !default;

// Whether or not the animation should play in reverse on alternate cycles. [normal | alternate]
$default-animation-direction : null !default;

// What values are applied by the animation outside the time it is executing. [none | forwards | backwards | both]
$default-animation-fill-mode : null !default;

// Whether the animation is running or paused. [running | paused]
$default-animation-play-state : null !default;


// Create a named animation sequence that can be applied to elements later.
//
// $name - The name of your animation.
// @content - The keyframes of the animation.
@mixin keyframes($name, $deprecated-prefixes...) {
$warned: warn-about-useless-prefix-arguments($deprecated-prefixes...);

@include with-each-prefix(css-animation, $animation-support-threshold) {
// It would be nice if we could dynamically construct directive names.
@if $current-prefix == -moz { @-moz-keyframes #{$name} { @content; } }
@if $current-prefix == -webkit { @-webkit-keyframes #{$name} { @content; } }
@if $current-prefix == -o { @-o-keyframes #{$name} { @content; } }
@if $current-prefix == -ms { @-ms-keyframes #{$name} { @content; } }
@if $current-prefix == null { @keyframes #{$name} { @content; } }
}
}

// @private
@mixin animation-properties($properties) {
@include prefixed-properties(css-animation, $animation-support-threshold, $properties);
}


// Apply any number of animation names.
@mixin animation-name($name...) {
$name: set-arglist-default($name, $default-animation-name);
@include animation-properties((animation-name: $name));
}

// Apply any number of animation durations.
@mixin animation-duration($duration...) {
$duration: set-arglist-default($duration, $default-animation-duration);
@include animation-properties((animation-duration: $duration));
}

// Apply any number of animation delays.
@mixin animation-delay($delay...) {
$delay: set-arglist-default($delay, $default-animation-delay);
@include animation-properties((animation-delay: $delay));
}

// Apply any number of animation timing functions.
@mixin animation-timing-function($function...) {
$function: set-arglist-default($function, $default-animation-timing-function);
@include animation-properties((animation-timing-function: $function));
}

// Apply any number of animation iteration counts.
@mixin animation-iteration-count($count...) {
$count: set-arglist-default($count, $default-animation-iteration-count);
@include animation-properties((animation-iteration-count: $count));
}

// Apply any number of animation directions.
@mixin animation-direction($direction...) {
$direction: set-arglist-default($direction, $default-animation-direction);
@include animation-properties((animation-direction: $direction));
}

// Apply any number of animation fill modes.
@mixin animation-fill-mode($mode...) {
$mode: set-arglist-default($mode, $default-animation-fill-mode);
@include animation-properties((animation-fill-mode: $mode));
}

// Apply any number of animation play states.
@mixin animation-play-state($state...) {
$state: set-arglist-default($state, $default-animation-play-state);
@include animation-properties((animation-play-state: $state));
}

// @private
@function default-animation() {
@return compact($default-animation-name
$default-animation-duration
$default-animation-timing-function
$default-animation-delay
$default-animation-iteration-count
$default-animation-direction
$default-animation-fill-mode
$default-animation-play-state);
}

// Shortcut to apply any number of animations to an element, with all the settings.
//
// $animation... : Name and settings. [<values> | default]
@mixin animation($animation...) {
$animation: if(length($animation) > 0, $animation, default-animation());
@include animation-properties((animation: $animation));
}
21 changes: 11 additions & 10 deletions stylesheets/compass/css3/appearance.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
@import "shared";
// Appearance
@import "compass/support";

// Change the appearance for Mozilla, Webkit and possibly the future.
// The appearance property is currently not present in any newer CSS specification.
//
// There is no official list of accepted values, but you might check these source:
// Mozilla : https://developer.mozilla.org/en/CSS/-moz-appearance
// Webkit : http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365
// (search for 'appearance' within the page)

@mixin appearance($ap) {
$ap: unquote($ap);
@include experimental(appearance, $ap,
-moz, -webkit, not -o, not -ms, not -khtml, official
);
//
// * [Mozilla](https://developer.mozilla.org/en/CSS/-moz-appearance)
// * [Webkit](http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365)
// (search for 'appearance' within the page)
@mixin appearance($appearance) {
// There is no caniuse tracking for appearance.
$appearance: unquote($appearance);
@include with-prefix(-moz) { -moz-appearance: $appearance; }
@include with-prefix(-webkit) { -webkit-appearance: $appearance; }
}
66 changes: 29 additions & 37 deletions stylesheets/compass/css3/background-clip.scss
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
@import "shared";
// Background Clip
@import "compass/support";

// The default value is `padding-box` -- the box model used by modern browsers.
//
// If you wish to do so, you can override the default constant with `border-box`
//
// To override to the default border-box model, use this code:
// $default-background-clip: border-box
// The the user threshold for background-clip support. Defaults to `$critical-usage-threshold`
$background-clip-support-threshold: $critical-usage-threshold !default;

// The default border-box model: [border-box | padding-box | content-box]
$default-background-clip: padding-box !default;

// Clip the background (image and color) at the edge of the padding or border.
//
// Legal Values:
//
// * padding-box
// * border-box
// * text

@mixin background-clip($clip: $default-background-clip) {
// webkit and mozilla use the deprecated short [border | padding]
$clip: unquote($clip);
$deprecated: $clip;
@if $clip == padding-box { $deprecated: padding; }
@if $clip == border-box { $deprecated: border; }
// Support for webkit and mozilla's use of the deprecated short form
@include experimental(background-clip, $deprecated,
-moz,
-webkit,
not -o,
not -ms,
not -khtml,
not official
);
@include experimental(background-clip, $clip,
not -moz,
not -webkit,
not -o,
not -ms,
-khtml,
official
);
// Clip the background (image and color) at the edge of the padding, border, or content.
// $clip... : [padding-box | border-box | content-box]
@mixin background-clip($clip...) {
$output: ();
$deprecated: ();

@if (length($clip) > 0) {
@each $layer in $clip {
$output: append($output, unquote($layer), comma);
$deprecated: append($deprecated, legacy-box($layer), comma);
}
} @else {
$output: $default-background-clip;
$deprecated: legacy-box($default-background-clip);
}

@include with-each-prefix(background-img-opts, $background-clip-support-threshold) {
@if $current-prefix == -moz or $current-prefix == -webkit {
// Legacy versions of Mozilla support a different syntax, prefixed.
@include prefix-prop(background-clip, $deprecated);
} @else {
@include prefix-prop(background-clip, $output);
}
}
}
63 changes: 29 additions & 34 deletions stylesheets/compass/css3/background-origin.scss
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
// Override `$default-background-origin` to change the default.
// Background Origin
@import "compass/support";

@import "shared";
// The the user threshold for background-origin support. Defaults to `$critical-usage-threshold`
$background-origin-threshold: $critical-usage-threshold !default;


// The default background-origin: [border-box | padding-box | content-box]
$default-background-origin: content-box !default;

// Position the background off the edge of the padding, border or content
//
// * Possible values:
// * `padding-box`
// * `border-box`
// * `content-box`
// * browser defaults to `padding-box`
// * mixin defaults to `content-box`

// Set the origin of the background (image and color) at the edge of the padding, border, or content.
//
// $origin... : [padding-box | border-box | content-box]
@mixin background-origin($origin...) {
$output: ();
$deprecated: ();

@mixin background-origin($origin: $default-background-origin) {
$origin: unquote($origin);
// webkit and mozilla use the deprecated short [border | padding | content]
$deprecated: $origin;
@if $origin == padding-box { $deprecated: padding; }
@if $origin == border-box { $deprecated: border; }
@if $origin == content-box { $deprecated: content; }
@if (length($origin) > 0) {
@each $layer in $origin {
$output: append($output, unquote($layer), comma);
$deprecated: append($deprecated, legacy-box($layer), comma);
}
} @else {
$output: $default-background-origin;
$deprecated: legacy-box($default-background-origin);
}

// Support for webkit and mozilla's use of the deprecated short form
@include experimental(background-origin, $deprecated,
-moz,
-webkit,
not -o,
not -ms,
not -khtml,
not official
);
@include experimental(background-origin, $origin,
not -moz,
not -webkit,
-o,
-ms,
-khtml,
official
);
@include with-each-prefix(background-img-opts, $background-origin-threshold) {
@if $current-prefix == -moz or $current-prefix == -webkit {
// Legacy versions of Mozilla support a different syntax, prefixed.
@include prefix-prop(background-origin, $deprecated)
} @else {
@include prefix-prop(background-origin, $output)
}
}
}
Loading