Permalink
Browse files

Implemented autoloader for loading all classes (moving towards PSR-0 …

…compliance).

Moved all classes into seperate files with no 'side-effects' for PSR compliance.
Updated casing of all classname references for the autoloader; all
classnaming needs to be StudlyCaps now.
Added options class (with getters and setters) to abstract out some of the fiddly options.
Added new options to the command line utility and a little refactoring.
Added flexbox aliases for to cover all common implementations.
Added formatters option and some default formatters.
Added newlines option to provide consistent output when required.
Selector aliases now accept arguments.
`disable` and `enable` options have been flipped in order of priority so you
can easily disable all then enable just what you need.
  • Loading branch information...
1 parent 0d92ba3 commit 3fd598c6992440114b82038893c0f555508d5790 @peteboere committed Dec 29, 2012
View
@@ -9,11 +9,11 @@
;
;----------------------------------------------------------------
-; Property aliases
+; Property aliases.
[properties]
- ; Animations
+ ; Animations.
animation[] = -webkit-animation
animation[] = -moz-animation
animation[] = -o-animation
@@ -42,60 +42,43 @@
animation-timing-function[] = -moz-animation-timing-function
animation-timing-function[] = -o-animation-timing-function
- ; Backface visibility
+ ; Backface visibility.
backface-visibility[] = -webkit-backface-visibility
backface-visibility[] = -moz-backface-visibility
backface-visibility[] = -ms-backface-visibility
- ; Background clip
+ ; Background clip.
background-clip[] = -webkit-background-clip
background-clip[] = -moz-background-clip
- ; Background origin
+ ; Background origin.
background-origin[] = -webkit-background-origin
background-origin[] = -moz-background-origin
- ; Background size
+ ; Background size.
background-size[] = -webkit-background-size
background-size[] = -moz-background-size
- ; Border radius
+ ; Border radius.
border-radius[] = -webkit-border-radius
border-top-left-radius[] = -webkit-border-top-left-radius
border-top-right-radius[] = -webkit-border-top-right-radius
border-bottom-left-radius[] = -webkit-border-bottom-left-radius
border-bottom-right-radius[] = -webkit-border-bottom-right-radius
- ; Border-image
+ ; Border-image.
border-image[] = -webkit-border-image
border-image[] = -moz-border-image
border-image[] = -o-border-image
- ; Flexbox (old, but supported implementation)
- box-align[] = -webkit-box-align
- box-align[] = -moz-box-align
- box-align[] = -ms-box-align
- box-direction[] = -webkit-box-direction
- box-direction[] = -moz-box-direction
- box-direction[] = -ms-box-direction
- box-flex[] = -webkit-box-flex
- box-flex[] = -moz-box-flex
- box-flex[] = -ms-box-flex
- box-orient[] = -webkit-box-orient
- box-orient[] = -moz-box-orient
- box-orient[] = -ms-box-orient
- box-pack[] = -webkit-box-pack
- box-pack[] = -moz-box-pack
- box-pack[] = -ms-box-pack
-
- ; Box shadow
+ ; Box shadow.
box-shadow[] = -webkit-box-shadow
- ; Box sizing
+ ; Box sizing.
box-sizing[] = -webkit-box-sizing
box-sizing[] = -moz-box-sizing
- ; Columns
+ ; Columns.
columns[] = -webkit-columns
columns[] = -moz-columns
column-count[] = -webkit-column-count
@@ -119,43 +102,93 @@
column-width[] = -webkit-column-width
column-width[] = -moz-column-width
- ; Hyphens
+ ; Flexbox (2012).
+ ;
+ ; Merges two similar versions of the flexbox spec:
+ ; - September 2012 (for non IE): http://www.w3.org/TR/2012/CR-css3-flexbox-20120918
+ ; - March 2012 (for IE10): http://www.w3.org/TR/2012/WD-css3-flexbox-20120322
+ ;
+ ; The early 2012 spec mostly differs only in syntax to the later one, with the notable
+ ; exception of not supporting seperate properties for <flex-grow>, <flex-shrink>
+ ; and <flex-basis>. These properties are available in both 2012 implementations via
+ ; <flex> shorthand.
+ ;
+ ; Support for the early 2012 syntax implemented in IE10 is achieved here in part with
+ ; property aliases, and in part with property/value aliases later in this file.
+ ;
+ align-content[] = -webkit-align-content
+ align-items[] = -webkit-align-items
+ align-self[] = -webkit-align-self
+ flex[] = -webkit-flex
+ flex[] = -ms-flex
+ flex-basis[] = -webkit-flex-basis
+ flex-direction[] = -webkit-flex-direction
+ flex-direction[] = -ms-flex-direction
+ flex-flow[] = -webkit-flex-flow
+ flex-flow[] = -ms-flex-flow
+ flex-grow[] = -webkit-flex-grow
+ flex-shrink[] = -webkit-flex-shrink
+ flex-wrap[] = -webkit-flex-wrap
+ flex-wrap[] = -ms-flex-wrap
+ justify-content[] = -webkit-justify-content
+ order[] = -webkit-order
+ order[] = -ms-flex-order
+
+ ; Flexbox (2009).
+ box-align[] = -webkit-box-align
+ box-align[] = -moz-box-align
+ box-direction[] = -webkit-box-direction
+ box-direction[] = -moz-box-direction
+ box-flex[] = -webkit-box-flex
+ box-flex[] = -moz-box-flex
+ box-flex-group[] = -webkit-box-flex-group
+ box-flex-group[] = -moz-box-flex-group
+ box-lines[] = -webkit-box-lines
+ box-lines[] = -moz-box-lines
+ box-ordinal-group[] = -webkit-box-ordinal-group
+ box-ordinal-group[] = -moz-box-ordinal-group
+ box-orient[] = -webkit-box-orient
+ box-orient[] = -moz-box-orient
+ box-pack[] = -webkit-box-pack
+ box-pack[] = -moz-box-pack
+
+ ; Hyphens.
hyphens[] = -webkit-hyphens
hyphens[] = -moz-hyphens
hyphens[] = -ms-hyphens
- ; Outline radius
+ ; Outline radius.
outline-radius[] = -moz-outline-radius
outline-top-left-radius[] = -moz-outline-radius-topleft
outline-top-right-radius[] = -moz-outline-radius-topright
outline-bottom-left-radius[] = -moz-outline-radius-bottomleft
outline-bottom-right-radius[] = -moz-outline-radius-bottomright
- ; Perspective
+ ; Perspective.
perspective[] = -webkit-perspective
perspective[] = -moz-perspective
perspective[] = -ms-perspective
perspective-origin[] = -webkit-perspective-origin
perspective-origin[] = -moz-perspective-origin
perspective-origin[] = -ms-perspective-origin
- ; Tab size
+ ; Tab size.
tab-size[] = -moz-tab-size
tab-size[] = -o-tab-size
- ; Text align last
+ ; Text align last.
text-align-last[] = -webkit-text-align-last
text-align-last[] = -moz-text-align-last
- ; Text decoration
+ ; Text decoration.
text-decoration-color[] = -moz-text-decoration-color
text-decoration-line[] = -moz-text-decoration-line
text-decoration-style[] = -moz-text-decoration-style
- ; Text overflow (Opera mini support)
+ ; Text overflow (Opera mini support).
text-overflow[] = -o-text-overflow
- ; Transforms
+ ; Transforms.
transform[] = -webkit-transform
transform[] = -moz-transform
transform[] = -ms-transform
@@ -168,7 +201,7 @@
transform-style[] = -moz-transform-style
transform-style[] = -ms-transform-style
- ; Transitions
+ ; Transitions.
transition[] = -webkit-transition
transition[] = -moz-transition
transition[] = -o-transition
@@ -185,7 +218,7 @@
transition-timing-function[] = -moz-transition-timing-function
transition-timing-function[] = -o-transition-timing-function
- ; User select (non standard)
+ ; User select (non standard).
user-select[] = -webkit-user-select
user-select[] = -moz-user-select
user-select[] = -ms-user-select
@@ -194,26 +227,61 @@
;----------------------------------------------------------------
-; Property:value aliases
+; Property:value aliases.
[values]
- ; Flexbox TBC.
+ ; Flexbox (2012).
+ display:flex[] = display:-webkit-flex
+ display:flex[] = display:-ms-flexbox
+ display:inline-flex[] = display:-webkit-inline-flex
+ display:inline-flex[] = display:-ms-inline-flexbox
+
+ ; Flexbox (early 2012).
+ align-content:flex-start[] = -ms-flex-line-pack:start
+ align-content:flex-end[] = -ms-flex-line-pack:end
+ align-content:center[] = -ms-flex-line-pack:center
+ align-content:space-between[] = -ms-flex-line-pack:justify
+ align-content:space-around[] = -ms-flex-line-pack:distribute
+ align-content:stretch[] = -ms-flex-line-pack:stretch
+
+ align-items:flex-start[] = -ms-flex-align:start
+ align-items:flex-end[] = -ms-flex-align:end
+ align-items:center[] = -ms-flex-align:center
+ align-items:baseline[] = -ms-flex-align:baseline
+ align-items:stretch[] = -ms-flex-align:stretch
+
+ align-self:auto[] = -ms-flex-item-align:auto
+ align-self:flex-start[] = -ms-flex-item-align:start
+ align-self:flex-end[] = -ms-flex-item-align:end
+ align-self:center[] = -ms-flex-item-align:center
+ align-self:baseline[] = -ms-flex-item-align:baseline
+ align-self:stretch[] = -ms-flex-item-align:stretch
+
+ justify-content:flex-start[] = -ms-flex-pack:start
+ justify-content:flex-end[] = -ms-flex-pack:end
+ justify-content:center[] = -ms-flex-pack:center
+ justify-content:space-between[] = -ms-flex-pack:justify
+ justify-content:space-around[] = -ms-flex-pack:distribute
+
+ ; Flexbox (2009).
+ display:box[] = display:-webkit-box
+ display:box[] = display:-moz-box
;----------------------------------------------------------------
-; Function aliases
+; Function aliases.
[functions]
- ; Calc
+ ; Calc.
calc[] = -webkit-calc
calc[] = -moz-calc
- ; Element
+ ; Element.
element[] = -moz-element
- ; Gradients
+ ; Gradients.
linear-gradient[] = -webkit-linear-gradient
linear-gradient[] = -moz-linear-gradient
linear-gradient[] = -ms-linear-gradient
@@ -223,7 +291,7 @@
radial-gradient[] = -ms-radial-gradient
radial-gradient[] = -o-radial-gradient
- ; Repeating gradients
+ ; Repeating gradients.
repeating-linear-gradient[] = -webkit-repeating-linear-gradient
repeating-linear-gradient[] = -moz-repeating-linear-gradient
repeating-linear-gradient[] = -ms-repeating-linear-gradient
@@ -235,16 +303,16 @@
;----------------------------------------------------------------
-; @rule aliases
+; @rule aliases.
[at-rules]
- ; Keyframes
+ ; Keyframes.
keyframes[] = -webkit-keyframes
keyframes[] = -moz-keyframes
keyframes[] = -o-keyframes
- ; Viewport
+ ; Viewport.
viewport[] = -webkit-viewport
viewport[] = -moz-viewport
viewport[] = -ms-viewport
View
@@ -1,9 +1,17 @@
1.9
---
-Added functions API for defining custom functions inside plugins.
+Added flexbox aliases for both 2009 and 2012 edition specs.
+Added a legacy-flexbox plugin for auto-generating the flexbox 2009 spec equivilant properties.
+Updated selector aliases to take arguments at runtime.
Updated plugin API to use distinct 'enable' and 'disable' handlers.
+The disable option is now resolved before the enable option so you can easily disable all plugins
+and then specify the plugins you want to apply.
+Added functions API for defining custom functions inside plugins.
Improved gradient function aliasing to handle new angle keywords ('to left', 'at center' etc.).
Added svg-gradients plugin for simulating CSS3 gradients with data-uris.
+Added formatting option so custom formatters can be defined for un-minified output (see wiki for options).
+Added newlines option to force the style of newlines in output (see wiki for options).
+Updated command line utility to employ the new options.
1.8
@@ -16,7 +24,7 @@ Debug option renamed to 'minify'; debug option will still work as before but is
New minify option optionally takes an array of advanced minification parameters.
Expanded trace option to take an optional array of log parameters;
log params available are stubs, selector_count, errors and compile_time.
-Added csscrush::stat method to retrieve logged parameters.
+Added CssCrush::stat method to retrieve logged parameters.
Improved cross OS support.
Improved minification.
Major refactoring.
@@ -31,7 +39,7 @@ Added options for enabling and disabling plugins at runtime.
Added property sorter plugin.
Added support for SASS-like @include/@extend syntax for invoking mixins and extends.
Boilerplate option now accepts a filename string as a boilerplate template.
-csscrush::string method now uses document_root as a default context for finding linked resources.
+CssCrush::string method now uses document_root as a default context for finding linked resources.
Updated command line appication.
Updated aliases and initial value files.
Fixed parsing issue introduced in 1.6.1.
@@ -65,7 +73,7 @@ Fixed some test cases.
1.5.2
-----
Resolved issue #32.
-csscrush::inline method now defaults to not printing a boilerplate.
+CssCrush::inline method now defaults to not printing a boilerplate.
Updated aliases file.
@@ -108,7 +116,7 @@ Added Prepend.css - Optionally prepend css to every input.
Fix for issue #21.
Reorganized aliases file with some additions.
Initial-values updated.
-Updated csscrush::string method to correctly handle import statements.
+Updated CssCrush::string method to correctly handle import statements.
1.4
Oops, something went wrong.

0 comments on commit 3fd598c

Please sign in to comment.