├── .gitignore
├── template-medium.txt
├── csstidyphp
├── .gitignore
├── Docs
│ ├── media
│ │ ├── empty.png
│ │ ├── background.png
│ │ └── style.css
│ ├── errors.html
│ ├── classtrees_csstidy.html
│ ├── index.html
│ ├── li_csstidy.html
│ ├── todolist.html
│ └── csstidy
│ │ ├── _class_csstidy_print_php.html
│ │ ├── _class_csstidy_optimise_php.html
│ │ └── _class_csstidy_php.html
├── testing
│ ├── unit-tests
│ │ ├── _files.php
│ │ ├── csst
│ │ │ ├── selectors
│ │ │ │ ├── type.csst
│ │ │ │ ├── id.csst
│ │ │ │ ├── universal.csst
│ │ │ │ ├── class.csst
│ │ │ │ ├── errors
│ │ │ │ │ ├── duplicate-combinator.csst
│ │ │ │ │ └── dangling-combinator.csst
│ │ │ │ ├── adjacent.csst
│ │ │ │ ├── child.csst
│ │ │ │ ├── active.csst
│ │ │ │ ├── attribute-set.csst
│ │ │ │ ├── descendant.csst
│ │ │ │ ├── focus.csst
│ │ │ │ ├── grouping.csst
│ │ │ │ ├── hover.csst
│ │ │ │ ├── lang.csst
│ │ │ │ ├── link.csst
│ │ │ │ ├── combinator-compressed.csst
│ │ │ │ ├── universal-shorthand.csst
│ │ │ │ ├── visited.csst
│ │ │ │ ├── first-child.csst
│ │ │ │ ├── universal-optimization.csst
│ │ │ │ ├── attribute-equals.csst
│ │ │ │ ├── simple.csst
│ │ │ │ ├── attribute-begins.csst
│ │ │ │ ├── attribute-contains.csst
│ │ │ │ ├── chain.csst
│ │ │ │ ├── merge-optimization.csst
│ │ │ │ ├── same-merge-siblings.csst
│ │ │ │ ├── merge-preserve.csst
│ │ │ │ ├── same-nomerge.csst
│ │ │ │ └── pseudo-elements.csst
│ │ │ ├── special
│ │ │ │ ├── iezoom.csst
│ │ │ │ ├── hex.csst
│ │ │ │ ├── cursor.csst
│ │ │ │ ├── font-face_woff.csst
│ │ │ │ ├── ie-hacks-sort.csst
│ │ │ │ ├── ie-hacks.csst
│ │ │ │ ├── same-atmedia-merge.csst
│ │ │ │ ├── font-face-simple.csst
│ │ │ │ ├── atmedia-decimals.csst
│ │ │ │ ├── same-atmedia-nomerge.csst
│ │ │ │ ├── font-face-mini.csst
│ │ │ │ ├── newlines.csst
│ │ │ │ ├── complex-gradient.csst
│ │ │ │ ├── font-face-atmedia.csst
│ │ │ │ ├── font-face-atmedia-2.csst
│ │ │ │ └── font-face.csst
│ │ │ ├── values
│ │ │ │ ├── number-float.csst
│ │ │ │ ├── number-trailingzero.csst
│ │ │ │ ├── number-zero.csst
│ │ │ │ ├── number-missingzero.csst
│ │ │ │ ├── number-signed.csst
│ │ │ │ ├── number-leadingzero.csst
│ │ │ │ ├── important.csst
│ │ │ │ ├── number-missingunit.csst
│ │ │ │ ├── colors.csst
│ │ │ │ ├── font-family.csst
│ │ │ │ └── quoted-strings.csst
│ │ │ ├── shorthands
│ │ │ │ ├── font-face.csst
│ │ │ │ ├── font-weight-general.csst
│ │ │ │ ├── font-weight-noopt.csst
│ │ │ │ ├── margin-noopt.csst
│ │ │ │ ├── background-general.csst
│ │ │ │ ├── padding-noopt.csst
│ │ │ │ ├── font-noopt.csst
│ │ │ │ ├── font-general.csst
│ │ │ │ ├── background-noopt.csst
│ │ │ │ ├── bugshorthand1.csst
│ │ │ │ ├── bugshorthand2.csst
│ │ │ │ ├── margin-general.csst
│ │ │ │ ├── padding-general.csst
│ │ │ │ └── bugshorthand3.csst
│ │ │ ├── README
│ │ │ ├── print-plain
│ │ │ │ ├── ie-hacks.csst
│ │ │ │ ├── atvalues.csst
│ │ │ │ ├── font-face-atmedia.csst
│ │ │ │ ├── simple-highest.csst
│ │ │ │ ├── simple-high.csst
│ │ │ │ ├── simple-default.csst
│ │ │ │ ├── simple-low.csst
│ │ │ │ └── font-face-atmedia-2.csst
│ │ │ ├── vendor-prefixed
│ │ │ │ └── webkit-gradient.csst
│ │ │ └── properties
│ │ │ │ ├── preserve-merging.csst
│ │ │ │ ├── multiple-properties.csst
│ │ │ │ ├── importance.csst
│ │ │ │ ├── css1.csst
│ │ │ │ ├── css21.csst
│ │ │ │ ├── css2.csst
│ │ │ │ └── css3.csst
│ │ ├── class.csstidy_reporter.php
│ │ ├── class.csstidy_harness.php
│ │ ├── test.csst.php
│ │ ├── class.Text_Diff_Renderer_parallel.php
│ │ └── class.csstidy_csst.php
│ ├── unit-tests.inc
│ └── unit-tests.php
├── template3.tpl
├── template2.tpl
├── template.tpl
├── template1.tpl
├── cssparsed.css
├── composer.json
├── .gitattributes
├── NEWS
├── class.csstidy_ctype.php
├── cssparse.css
├── README
├── class.csstidy_print.php
└── lang.inc.php
├── win
└── csstidy.exe
├── csstidy.sublime-commands
├── .gitattributes
├── Main.sublime-menu
├── csstidy.sublime-settings
├── README.md
├── csstidy.php
├── csstidy.py
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | *.tmp
2 |
--------------------------------------------------------------------------------
/template-medium.txt:
--------------------------------------------------------------------------------
1 |
2 | | {|| { |||; |}
3 | ||}||
4 | |
5 | |
--------------------------------------------------------------------------------
/csstidyphp/.gitignore:
--------------------------------------------------------------------------------
1 | testing/simpletest*
2 | testing/Text*
3 | nbproject*
4 |
--------------------------------------------------------------------------------
/win/csstidy.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fitnr/SublimeCSSTidy/HEAD/win/csstidy.exe
--------------------------------------------------------------------------------
/csstidyphp/Docs/media/empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fitnr/SublimeCSSTidy/HEAD/csstidyphp/Docs/media/empty.png
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/_files.php:
--------------------------------------------------------------------------------
1 |
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/id.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | ID selector
3 | --CSS--
4 | a#foo {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a#foo' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/universal.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Universal selector
3 | --CSS--
4 | * {display: inherit;}
5 | --EXPECT--
6 | array (
7 | '*' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/iezoom.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | IE Zoom
3 | --CSS--
4 | #content {
5 | zoom: 1;
6 | }
7 | --EXPECT--
8 | array (
9 | '#content' =>
10 | array (
11 | 'zoom' => '1',
12 | ),
13 | )
14 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/class.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Class selector
3 | --CSS--
4 | a.foo {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a.foo' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/errors/duplicate-combinator.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Duplicate combinator selector
3 | --CSS--
4 | div + + b {display: inherit;}
5 | --EXPECT--
6 | array (
7 | )
8 | --SETTINGS--
9 | discard_invalid_selectors=1
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/hex.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | --CSS--
3 | li:before { content: "\00BB \0020"; }
4 | --EXPECT--
5 | array (
6 | 'li:before' =>
7 | array (
8 | 'content' => '"\\00BB \\0020"',
9 | ),
10 | )
11 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/adjacent.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Adjacent selector
3 | --CSS--
4 | a + b {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a + b' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/child.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Child selector
3 | --CSS--
4 | table > tr {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'table > tr' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/active.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Dynamic active selector
3 | --CSS--
4 | a:active {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a:active' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/attribute-set.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Attribute selector
3 | --CSS--
4 | a[foo] {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a[foo]' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/descendant.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Descendant selector
3 | --CSS--
4 | table tr {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'table tr' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/focus.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Dynamic focus selector
3 | --CSS--
4 | a:focus {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a:focus' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/grouping.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Grouped selectors
3 | --CSS--
4 | h1,h2,h3 {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'h1,h2,h3' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/hover.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Dynamic hover selector
3 | --CSS--
4 | a:hover {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a:hover' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/lang.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Language selector
3 | --CSS--
4 | div:lang(en) {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'div:lang(en)' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/link.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Not-visited link selector
3 | --CSS--
4 | a:link {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a:link' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/combinator-compressed.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Combinator selector
3 | --CSS--
4 | a>b {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a>b' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/universal-shorthand.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Universal selector shorthand
3 | --CSS--
4 | .foo {display: inherit;}
5 | --EXPECT--
6 | array (
7 | '.foo' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/visited.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Visited link selector
3 | --CSS--
4 | a:visited {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a:visited' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-float.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Floating point
3 | --CSS--
4 | a { font-size:01.5010em }
5 | --EXPECT--
6 | array (
7 | 'a' =>
8 | array (
9 | 'font-size' => '1.501em',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-trailingzero.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Trailing zeros
3 | --CSS--
4 | a { font-size:1.000em }
5 | --EXPECT--
6 | array (
7 | 'a' =>
8 | array (
9 | 'font-size' => '1em',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/first-child.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | First child selector
3 | --CSS--
4 | p:first-child {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'p:first-child' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/universal-optimization.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Universal selector optimization
3 | --CSS--
4 | *.foo {display: inherit;}
5 | --EXPECT--
6 | array (
7 | '.foo' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/attribute-equals.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Attribute equals selector
3 | --CSS--
4 | a[foo="warning"] {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a[foo="warning"]' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/simple.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Simple selector
3 | --CSS--
4 | a[foo="bar"].class#id:hover {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a[foo="bar"].class#id:hover' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-zero.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Zero
3 | --CSS--
4 | a { font-size:0px; line-height:00.00 }
5 | --EXPECT--
6 | array (
7 | 'a' =>
8 | array (
9 | 'font-size' => '0',
10 | 'line-height' => '0',
11 | ),
12 | )
13 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/attribute-begins.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Begins hyphen-separated attribute list selector
3 | --CSS--
4 | a[foo|="en"] {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a[foo|="en"]' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/cursor.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | multiples cursor rules
3 | --CSS--
4 | a {
5 | cursor: pointer;
6 | cursor: hand;
7 | }
8 | --EXPECT--
9 | array (
10 | 'a' =>
11 | array (
12 | 'cursor' => 'pointer',
13 | 'cursor ' => 'hand',
14 | ),
15 | )
16 |
--------------------------------------------------------------------------------
/csstidyphp/template3.tpl:
--------------------------------------------------------------------------------
1 | |{||{|||;|}||}||||
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/attribute-contains.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Contained in space-separated attribute list selector
3 | --CSS--
4 | a[foo~="warning"] {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a[foo~="warning"]' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/chain.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Chained selector
3 | --CSS--
4 | a * > div[attr="value"].class + div#id:hover {display: inherit;}
5 | --EXPECT--
6 | array (
7 | 'a * > div[attr="value"].class + div#id:hover' =>
8 | array (
9 | 'display' => 'inherit',
10 | ),
11 | )
12 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-missingzero.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Missing zero
3 | --CSS--
4 | a { font-size:0.1em }
5 | b { font-size:.1em }
6 | --EXPECT--
7 | array (
8 | 'a,b' =>
9 | array (
10 | 'font-size' => '.1em',
11 | ),
12 | )
13 | --SETTINGS--
14 | merge_selectors=2
--------------------------------------------------------------------------------
/csstidyphp/template2.tpl:
--------------------------------------------------------------------------------
1 | | {
2 | ||{|||;|}|
3 | |
4 | }
5 | ||||
6 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/errors/dangling-combinator.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Dangling combinator selector
3 | --CSS--
4 | + b {display: inherit;}
5 | b > {font-family: inherit;}
6 | asdf {font-size: inherit;}
7 | --EXPECT--
8 | array (
9 | )
10 | --SETTINGS--
11 | optimise_shorthands=0
12 | discard_invalid_selectors=1
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-signed.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Signed
3 | --CSS--
4 | a { font-size:-1em }
5 | b { font-size:+1em }
6 | --EXPECT--
7 | array (
8 | 'a' =>
9 | array (
10 | 'font-size' => '-1em',
11 | ),
12 | 'b' =>
13 | array (
14 | 'font-size' => '1em',
15 | ),
16 | )
17 |
--------------------------------------------------------------------------------
/csstidy.sublime-commands:
--------------------------------------------------------------------------------
1 | [
2 | { "caption": "Tidy CSS", "command": "css_tidy" },
3 | { "caption": "Tidy CSS (Highest Compression)", "command": "css_tidy", "args": {"template": "highest", "preserve_css": "true" } },
4 | { "caption": "Tidy CSS (Low Compression)", "command": "css_tidy", "args": {"template": "low", "preserve_css": "true" } }
5 |
6 | ]
7 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/merge-optimization.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Merge selectors optimization
3 | --CSS--
4 | h1 {display: inherit;}
5 | h2 {display: inherit;}
6 | h3 {display: inherit;}
7 | --EXPECT--
8 | array (
9 | 'h1,h2,h3' =>
10 | array (
11 | 'display' => 'inherit',
12 | ),
13 | )
14 | --SETTINGS--
15 | merge_selectors=2
--------------------------------------------------------------------------------
/csstidyphp/template.tpl:
--------------------------------------------------------------------------------
1 | | {
2 | || {
3 | |||;
4 | |}|
5 |
6 | |
7 | }
8 |
9 | |||
10 | |
11 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-leadingzero.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Leading zeros
3 | --CSS--
4 | a { font-size:0001em; foo:00.1em; line-height:00.1; bar:-00.1;}
5 | --EXPECT--
6 | array (
7 | 'a' =>
8 | array (
9 | 'font-size' => '1em',
10 | 'foo' => '.1em',
11 | 'line-height' => '.1',
12 | 'bar' => '-.1',
13 | ),
14 | )
15 |
--------------------------------------------------------------------------------
/csstidyphp/template1.tpl:
--------------------------------------------------------------------------------
1 | | {
2 | ||
3 | {
4 | | ||;
5 | |}|
6 |
7 | |
8 |
9 | }
10 |
11 | | ||
12 | |
13 |
--------------------------------------------------------------------------------
/csstidyphp/cssparsed.css:
--------------------------------------------------------------------------------
1 | code#copytext {
2 | white-space:pre;
3 | font-family:Verdana
4 | }
5 |
6 | .at {
7 | color:#00008b
8 | }
9 |
10 | .format {
11 | color:gray
12 | }
13 |
14 | .property {
15 | color:green
16 | }
17 |
18 | .selector {
19 | color:blue
20 | }
21 |
22 | .value {
23 | color:red;
24 | left:500px
25 | }
26 |
27 | .comment {
28 | color:orange
29 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Standard to msysgit
5 | *.doc diff=astextplain
6 | *.DOC diff=astextplain
7 | *.docx diff=astextplain
8 | *.DOCX diff=astextplain
9 | *.dot diff=astextplain
10 | *.DOT diff=astextplain
11 | *.pdf diff=astextplain
12 | *.PDF diff=astextplain
13 | *.rtf diff=astextplain
14 | *.RTF diff=astextplain
15 |
--------------------------------------------------------------------------------
/csstidyphp/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cerdic/css-tidy",
3 | "description": "CSSTidy is a CSS minifier",
4 | "license": "LGPL-2.1",
5 | "authors": [
6 | {
7 | "name": "Cédric MORIN",
8 | "email": "changeme@mailinator.com"
9 | }
10 | ],
11 | "autoload" : {
12 | "classmap": ["."]
13 | },
14 | "require": {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/font-face.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test font-face optimization (no optimization)
3 | --CSS--
4 | @font-face {
5 | src: url("fonts/share.ttf") format("truetype");
6 | }
7 | --FULLEXPECT--
8 | array (
9 | ' '=> array(
10 | '@font-face' =>
11 | array (
12 | 'src' => 'url(fonts/share.ttf) format("truetype")',
13 | ),
14 | ),
15 | )
16 | --SETTINGS--
17 | optimise_shorthands=0
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/important.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests !important
3 | --CSS--
4 | a {
5 | color:red !important;
6 | size:2 ! important;
7 | foo:2! important;
8 | bar:2!important;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'color' => 'red!important',
15 | 'size' => '2!important',
16 | 'foo' => '2!important',
17 | 'bar' => '2!important',
18 | ),
19 | )
20 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/font-weight-general.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test font-weight optimization (full)
3 | --CSS--
4 | a {
5 | font-weight: bold;
6 | }
7 | b {
8 | font-weight: normal;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'font-weight' => '700',
15 | ),
16 | 'b' =>
17 | array (
18 | 'font-weight' => '400',
19 | ),
20 | )
21 | --SETTINGS--
22 | compress_font-weight=true
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/font-weight-noopt.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test font-weight optimization (no optimization)
3 | --CSS--
4 | a {
5 | font-weight: bold;
6 | }
7 | b {
8 | font-weight: normal;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'font-weight' => 'bold',
15 | ),
16 | 'b' =>
17 | array (
18 | 'font-weight' => 'normal',
19 | ),
20 | )
21 | --SETTINGS--
22 | compress_font-weight=false
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/number-missingunit.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Missing unit
3 | --CSS--
4 | a {
5 | font-size:1.0;
6 | line-height:1.0;
7 | color:123456;
8 | font:1em/1.0 verdana;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'font-size' => '1px',
15 | 'line-height' => '1',
16 | 'color' => '#123456',
17 | 'font' => '1em/1 verdana',
18 | ),
19 | )
20 | --SETTINGS--
21 | optimise_shorthands=0
--------------------------------------------------------------------------------
/csstidyphp/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Standard to msysgit
5 | *.doc diff=astextplain
6 | *.DOC diff=astextplain
7 | *.docx diff=astextplain
8 | *.DOCX diff=astextplain
9 | *.dot diff=astextplain
10 | *.DOT diff=astextplain
11 | *.pdf diff=astextplain
12 | *.PDF diff=astextplain
13 | *.rtf diff=astextplain
14 | *.RTF diff=astextplain
15 |
16 | *.html -text
17 | *.css -text
18 | *.php -text
19 | *.csst -text
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/same-merge-siblings.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | merge multiples siblings occurences of same seletor
3 | --SETTINGS--
4 | merge_selectors = 0
5 | --CSS--
6 | h1,h2 {font-size:1em;}
7 | h1 {display: inherit;}
8 | h1 {font-size:2em;}
9 | --EXPECT--
10 | array (
11 | 'h1,h2' =>
12 | array (
13 | 'font-size' => '1em',
14 | ),
15 | 'h1' =>
16 | array (
17 | 'display' => 'inherit',
18 | 'font-size' => '2em',
19 | ),
20 | )
21 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/margin-noopt.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test margin optimization
3 | --CSS--
4 | a {
5 | margin-left: 10px;
6 | margin-right: 10px;
7 | margin-top: 10px;
8 | margin-bottom: 10px;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'margin-left' => '10px',
15 | 'margin-right' => '10px',
16 | 'margin-top' => '10px',
17 | 'margin-bottom' => '10px',
18 | ),
19 | )
20 | --SETTINGS--
21 | optimise_shorthands=0
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/colors.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test color optimisation
3 | --CSS--
4 | a {
5 | foo:rgb(0,0,0);
6 | bar:black;
7 | baz:#ffaabb;
8 | qux:#f00;
9 | quux:blanchedalmond;
10 | quuux:rgb(0,0,1);
11 | }
12 | --EXPECT--
13 | array (
14 | 'a' =>
15 | array (
16 | 'foo' => '#000',
17 | 'bar' => '#000',
18 | 'baz' => '#fab',
19 | 'qux' => 'red',
20 | 'quux' => '#ffebcd',
21 | 'quuux' => '#000001',
22 | ),
23 | )
24 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/merge-preserve.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Merge selectors optimization off
3 | --SETTINGS--
4 | merge_selectors = 0
5 | --CSS--
6 | h1 {display: inherit;}
7 | h2 {display: inherit;}
8 | h3 {display: inherit;}
9 | --EXPECT--
10 | array (
11 | 'h1' =>
12 | array (
13 | 'display' => 'inherit',
14 | ),
15 | 'h2' =>
16 | array (
17 | 'display' => 'inherit',
18 | ),
19 | 'h3' =>
20 | array (
21 | 'display' => 'inherit',
22 | ),
23 | )
24 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/background-general.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general background optimization
3 | --CSS--
4 | a {
5 | background-color: white;
6 | background-image: url(123);
7 | background-repeat: no-repeat;
8 | background-position: 1px 1px;
9 | background-attachment: scroll;
10 | }
11 | --EXPECT--
12 | array (
13 | 'a' =>
14 | array (
15 | 'background' => 'url(123) no-repeat 1px 1px #fff',
16 | ),
17 | )
18 | --SETTINGS--
19 | optimise_shorthands=3
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/same-nomerge.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Don't merge multiples occurences of same seletor
3 | --SETTINGS--
4 | merge_selectors = 0
5 | --CSS--
6 | h1 {display: inherit;}
7 | h1,h2 {font-size:1em;}
8 | h1 {font-size:2em;}
9 | --EXPECT--
10 | array (
11 | 'h1' =>
12 | array (
13 | 'display' => 'inherit',
14 | ),
15 | 'h1,h2' =>
16 | array (
17 | 'font-size' => '1em',
18 | ),
19 | 'h1 ' =>
20 | array (
21 | 'font-size' => '2em',
22 | ),
23 | )
24 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/padding-noopt.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test padding optimization (no optimization)
3 | --CSS--
4 | a {
5 | padding-left: 10px;
6 | padding-right: 10px;
7 | padding-top: 10px;
8 | padding-bottom: 10px;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'padding-left' => '10px',
15 | 'padding-right' => '10px',
16 | 'padding-top' => '10px',
17 | 'padding-bottom' => '10px',
18 | ),
19 | )
20 | --SETTINGS--
21 | optimise_shorthands=0
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/font-noopt.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general font optimization (no optimization)
3 | --CSS--
4 | a {
5 | font-weight: bold;
6 | font-size: 12px;
7 | line-height: 2em;
8 | font-family: Arial, sans-serif;
9 | }
10 | --EXPECT--
11 | array (
12 | 'a' =>
13 | array (
14 | 'font-weight' => '700',
15 | 'font-size' => '12px',
16 | 'line-height' => '2em',
17 | 'font-family' => 'Arial,sans-serif',
18 | ),
19 | )
20 | --SETTINGS--
21 | optimise_shorthands=0
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/class.csstidy_reporter.php:
--------------------------------------------------------------------------------
1 | array(
11 | '@font-face' =>
12 | array (
13 | 'font-family' => '"Unibody8SmallCaps Regular"',
14 | 'src' => 'url(fonts/unibody_8-smallcaps-webfont.woff) format("woff")',
15 | ),
16 | )
17 | )
18 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/font-general.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general font optimization
3 | --CSS--
4 | a {
5 | font-weight: bold;
6 | font-size: 12px;
7 | line-height: 2em;
8 | font-family: Arial, "Trebuchet MS", serif;
9 | }
10 | b {
11 | font: 14px/1.25 Trebuchet MS, Arial, Tahoma, sans-serif;
12 | }
13 | --EXPECT--
14 | array (
15 | 'a' =>
16 | array (
17 | 'font' => '700 12px/2em Arial,"Trebuchet MS",serif',
18 | ),
19 | 'b' =>
20 | array (
21 | 'font' => '14px/1.25 "Trebuchet MS",Arial,Tahoma,sans-serif',
22 | ),
23 | )
24 | --SETTINGS--
25 | optimise_shorthands=2
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/selectors/pseudo-elements.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Pseudo elements selectors
3 | --CSS--
4 | P:first-line { display: inherit; }
5 | P:first-letter { font-size: inherit; }
6 | H1:before { font-family: inherit; }
7 | H1:after { font-weight: inherit; }
8 | --EXPECT--
9 | array (
10 | 'P:first-line' =>
11 | array (
12 | 'display' => 'inherit',
13 | ),
14 | 'P:first-letter' =>
15 | array (
16 | 'font-size' => 'inherit',
17 | ),
18 | 'H1:before' =>
19 | array (
20 | 'font-family' => 'inherit',
21 | ),
22 | 'H1:after' =>
23 | array (
24 | 'font-weight' => 'inherit',
25 | ),
26 | )
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/background-noopt.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general background optimization
3 | --CSS--
4 | a {
5 | background-color: white;
6 | background-image: url(123);
7 | background-repeat: no-repeat;
8 | background-position: 1px 1px;
9 | background-attachment: scroll;
10 | }
11 | --EXPECT--
12 | array (
13 | 'a' =>
14 | array (
15 | 'background-color' => '#fff',
16 | 'background-image' => 'url(123)',
17 | 'background-repeat' => 'no-repeat',
18 | 'background-position' => '1px 1px',
19 | 'background-attachment' => 'scroll',
20 | ),
21 | )
22 | --SETTINGS--
23 | optimise_shorthands=1
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/class.csstidy_harness.php:
--------------------------------------------------------------------------------
1 | assert($expectation, $filename, '%s');
15 | // this is necessary because SimpleTest doesn't support
16 | // HTML messages; this probably should be in the reporter.
17 | // This is *not* compatible with XmlReporter
18 | if (!$result) echo $expectation->render();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/README:
--------------------------------------------------------------------------------
1 | CSST
2 |
3 | These test are for CSSTidy's parsing algorithms. They take this form:
4 |
5 | --TEST--
6 | Test name
7 | --CSS--
8 | CSS to parse
9 | --EXPECT--
10 | var_export() representation of csstidy->css[41]
11 |
12 | Note carefully that EXPECT is for csstidy->css[41], not csstidy->css. This
13 | is because, by default, all declarations are placed inside the
14 | DEFAULT_AT section. For tests that need to make use of at selectors, use
15 |
16 | --FULLEXPECT--
17 | var_export() representation of csstidy->css
18 |
19 | ...instead.
20 |
21 | See also: class.csstidy_csst.php (the implementation of these tests) and
22 | test.csst.php (the caller stub for SimpleTest)
23 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/print-plain/ie-hacks.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | IE Hacks Issue/5
3 | --SETTINGS--
4 | discard_invalid_properties = 0
5 | --CSS--
6 | fakeList a {
7 | width: 100%;
8 | display: block;
9 | height: 30px;
10 | padding-top: 2px;
11 | -padding-top: 0;
12 | line-height:18px;
13 | *line-height:17;
14 | /line-height:none;
15 | // background-image: url(images/cellpic3.gif); /* should be ignored */
16 | _background-image: url(/ttt/gf.gif);
17 | }
18 | --PRINT--
19 | fakeList a {
20 | width:100%;
21 | display:block;
22 | height:30px;
23 | padding-top:2px;
24 | -padding-top:0;
25 | line-height:18px;
26 | *line-height:17;
27 | /line-height:none;
28 | _background-image:url(/ttt/gf.gif)
29 | }
30 | --SETTINGS--
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/font-family.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Tests numeric values: Floating point
3 | --CSS--
4 | a { font:10px Arial, sans-serif}
5 | b { font:10px "Arial", "Trebuchet MS","sans-serif"}
6 | em { font:10px/normal "Arial", "Trebuchet MS","sans-serif"}
7 | i { font:10px/1.5em "Arial", "Trebuchet MS","sans-serif"}
8 | --EXPECT--
9 | array (
10 | 'a' =>
11 | array (
12 | 'font' => '10px Arial,sans-serif',
13 | ),
14 | 'b' =>
15 | array (
16 | 'font' => '10px Arial,"Trebuchet MS",sans-serif',
17 | ),
18 | 'em' =>
19 | array (
20 | 'font' => '10px/normal Arial,"Trebuchet MS",sans-serif',
21 | ),
22 | 'i' =>
23 | array (
24 | 'font' => '10px/1.5em Arial,"Trebuchet MS",sans-serif',
25 | ),
26 | )
27 | --SETTINGS--
28 | optimise_shorthands=2
29 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/values/quoted-strings.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Ensure that quoted strings are left unchanged.
3 | --CSS--
4 | a:after {
5 | content: "This is a typical string with words, commas, and a period.";
6 | }
7 |
8 | b:after {
9 | content: "This string has CSS-like content: foo { color: rgb(0, 0, 0); }.";
10 | }
11 |
12 | c:after {
13 | content: 'This string uses single quotes, not double (").';
14 | }
15 | --EXPECT--
16 | array (
17 | 'a:after' =>
18 | array (
19 | 'content' => '"This is a typical string with words, commas, and a period."',
20 | ),
21 | 'b:after' =>
22 | array (
23 | 'content' => '"This string has CSS-like content: foo { color: rgb(0, 0, 0); }."',
24 | ),
25 | 'c:after' =>
26 | array (
27 | 'content' => '\'This string uses single quotes, not double (").\'',
28 | ),
29 | )
30 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests.inc:
--------------------------------------------------------------------------------
1 |
22 | array (
23 | 'width' => '100%',
24 | 'display' => 'block',
25 | 'height' => '30px',
26 | 'padding-top' => '2px',
27 | '-padding-top' => '0',
28 | 'line-height' => '18px',
29 | '-moz-border-radius' => '10px',
30 | '*line-height' => '17',
31 | '/line-height' => 'none',
32 | '_background-image' => 'url(/ttt/gf.gif)',
33 | ),
34 | )
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/bugshorthand1.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general font optimization
3 | --CSS--
4 | .form-suggest {
5 | height : 200px ;
6 | background : #DEE2D0 ;
7 | vertical-align : top;
8 | }
9 |
10 | body{
11 | color: #000000;
12 | font : 11px Verdana, Arial, Helvetica, sans-serif ;
13 | margin: 0 10px 10px 10px;
14 | padding: 0;
15 | overflow:auto;
16 | }
17 | --EXPECT--
18 | array (
19 | '.form-suggest' =>
20 | array (
21 | 'height' => '200px',
22 | 'background' => '#DEE2D0',
23 | 'vertical-align' => 'top',
24 | ),
25 | 'body' =>
26 | array (
27 | 'color' => '#000',
28 | 'font' => '11px Verdana,Arial,Helvetica,sans-serif',
29 | 'margin' => '0 10px 10px',
30 | 'padding' => '0',
31 | 'overflow' => 'auto',
32 | ),
33 | )
34 | --SETTINGS--
35 | optimise_shorthands=1
36 | sort_selectors=0
37 | sort_properties=0
38 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/bugshorthand2.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general font optimization
3 | --CSS--
4 | .form-suggest {
5 | height : 200px ;
6 | background : #DEE2D0 ;
7 | vertical-align : top;
8 | }
9 |
10 | body{
11 | color: #000000;
12 | font : 11px Verdana, Arial, Helvetica, sans-serif ;
13 | margin: 0 10px 10px 10px;
14 | padding: 0;
15 | overflow:auto;
16 | }
17 | --EXPECT--
18 | array (
19 | '.form-suggest' =>
20 | array (
21 | 'height' => '200px',
22 | 'background' => '#DEE2D0',
23 | 'vertical-align' => 'top',
24 | ),
25 | 'body' =>
26 | array (
27 | 'color' => '#000',
28 | 'font' => '11px Verdana,Arial,Helvetica,sans-serif',
29 | 'margin' => '0 10px 10px',
30 | 'padding' => '0',
31 | 'overflow' => 'auto',
32 | ),
33 | )
34 | --SETTINGS--
35 | optimise_shorthands=2
36 | sort_selectors=0
37 | sort_properties=0
38 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/vendor-prefixed/webkit-gradient.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | -webkit-gradient properties issue/3
3 | --CSS--
4 | .linear {
5 | background: -webkit-gradient(linear, left top, left bottom, from(#00abeb), to(#fff), color-stop(0.5, #fff), color-stop(0.5, #66cc00));
6 | }
7 | .radial {
8 | background: -webkit-gradient(radial, 45 45, 10, 52 50, 30, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62));
9 | }
10 | --EXPECT--
11 | array (
12 | '.linear' =>
13 | array (
14 | 'background' => '-webkit-gradient(linear,left top,left bottom,from(#00abeb),to(#fff),color-stop(0.5,#fff),color-stop(0.5,#6c0))',
15 | ),
16 | '.radial' =>
17 | array (
18 | 'background' => '-webkit-gradient(radial,45 45,10,52 50,30,from(#A7D30C),to(rgba(1,159,98,0)),color-stop(90%,#019F62))',
19 | ),
20 | )
21 | --SETTINGS--
22 | discard_invalid_properties=false
23 | optimise_shorthands=0
24 | css_level='CSS21'
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/ie-hacks.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | IE Hacks Issue/5
3 | --SETTINGS--
4 | discard_invalid_properties = 0
5 | --CSS--
6 | fakeList a {
7 | width: 100%;
8 | display: block;
9 | height: 30px;
10 | padding-top: 2px;
11 | -padding-top: 0;
12 | line-height:18px;
13 | *line-height:17;
14 | /line-height:none;
15 | // background-image: url(images/cellpic3.gif); /* should be ignored in print version*/
16 | _background-image: url(/ttt/gf.gif);
17 | }
18 | --EXPECT--
19 | array (
20 | 'fakeList a' =>
21 | array (
22 | 'width' => '100%',
23 | 'display' => 'block',
24 | 'height' => '30px',
25 | 'padding-top' => '2px',
26 | '-padding-top' => '0',
27 | 'line-height' => '18px',
28 | '*line-height' => '17',
29 | '/line-height' => 'none',
30 | '//background-image' => 'url(images/cellpic3.gif)',
31 | '_background-image' => 'url(/ttt/gf.gif)',
32 | ),
33 | )
34 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/same-atmedia-merge.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Don't merge multiples occurences of same @media
3 | --SETTINGS--
4 | merge_selectors = 0
5 | --CSS--
6 | BODY {
7 | color: black;
8 | }
9 |
10 | @media screen, tv, projection {
11 | BODY {
12 | background-color: red;
13 | }
14 | }
15 |
16 | @media screen, tv, projection {
17 | BODY {
18 | color: green;
19 | }
20 | }
21 |
22 | BODY {
23 | background-color: white;
24 | }
25 |
26 | --FULLEXPECT--
27 | array (
28 | 41 =>
29 | array (
30 | 'BODY' =>
31 | array (
32 | 'color' => '#000',
33 | ),
34 | ),
35 | '@media screen,tv,projection ' =>
36 | array (
37 | 'BODY' =>
38 | array (
39 | 'background-color' => 'red',
40 | 'color' => 'green',
41 | ),
42 | ),
43 | 42 =>
44 | array (
45 | 'BODY' =>
46 | array (
47 | 'background-color' => '#fff',
48 | ),
49 | ),
50 | )
51 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/margin-general.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test margin optimization
3 | --CSS--
4 | a {
5 | margin-left: 10px;
6 | margin-right: 10px;
7 | margin-top: 10px;
8 | margin-bottom: 10px;
9 | }
10 | b {
11 | margin-left: 6px;
12 | margin-right: 6px;
13 | margin-top: 10px;
14 | margin-bottom: 10px;
15 | }
16 | c {
17 | margin-left: 6px;
18 | margin-right: 6px;
19 | margin-top: 10px;
20 | margin-bottom: 1px;
21 | }
22 | d {
23 | margin-left: 1px;
24 | margin-right: 6px;
25 | margin-top: 10px;
26 | margin-bottom: 3px;
27 | }
28 | --EXPECT--
29 | array (
30 | 'a' =>
31 | array (
32 | 'margin' => '10px',
33 | ),
34 | 'b' =>
35 | array (
36 | 'margin' => '10px 6px',
37 | ),
38 | 'c' =>
39 | array (
40 | 'margin' => '10px 6px 1px',
41 | ),
42 | 'd' =>
43 | array (
44 | 'margin' => '10px 6px 3px 1px',
45 | ),
46 | )
47 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/padding-general.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test padding optimization
3 | --CSS--
4 | a {
5 | padding-left: 10px;
6 | padding-right: 10px;
7 | padding-top: 10px;
8 | padding-bottom: 10px;
9 | }
10 | b {
11 | padding-left: 10px;
12 | padding-right: 10px;
13 | padding-top: 2px;
14 | padding-bottom: 2px;
15 | }
16 | c {
17 | padding-left: 10px;
18 | padding-right: 10px;
19 | padding-top: 2px;
20 | padding-bottom: 3px;
21 | }
22 | d {
23 | padding-left: 1px;
24 | padding-right: 10px;
25 | padding-top: 2px;
26 | padding-bottom: 3px;
27 | }
28 | --EXPECT--
29 | array (
30 | 'a' =>
31 | array (
32 | 'padding' => '10px',
33 | ),
34 | 'b' =>
35 | array (
36 | 'padding' => '2px 10px',
37 | ),
38 | 'c' =>
39 | array (
40 | 'padding' => '2px 10px 3px',
41 | ),
42 | 'd' =>
43 | array (
44 | 'padding' => '2px 10px 3px 1px',
45 | ),
46 | )
47 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/font-face-simple.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | @font-face rules
3 | --CSS--
4 | @font-face {
5 | font-family: GillSans;
6 | src:url("/generic/fonts/GillSansLightC.otf") format('opentype');
7 | font-style: normal;
8 | font-weight: normal;
9 | }
10 |
11 | @font-face {
12 | font-family: GillSans;
13 | src:url("/generic/fonts/GillSansC.otf") format('opentype');
14 | font-style: normal;
15 | font-weight: bold;
16 | }
17 | --FULLEXPECT--
18 | array (
19 | ' ' => array(
20 | '@font-face' =>
21 | array (
22 | 'font-family' => 'GillSans',
23 | 'src' => 'url(/generic/fonts/GillSansLightC.otf) format("opentype")',
24 | 'font-style' => 'normal',
25 | 'font-weight' => '400',
26 | ),
27 | '@font-face ' =>
28 | array (
29 | 'font-family' => 'GillSans',
30 | 'src' => 'url(/generic/fonts/GillSansC.otf) format("opentype")',
31 | 'font-style' => 'normal',
32 | 'font-weight' => '700',
33 | ),
34 | )
35 | )
36 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/properties/preserve-merging.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Preserve merging of properties issue/2
3 | --CSS--
4 | div {
5 | display:block;
6 | display:inline-block;
7 | }
8 | .gradient {
9 | background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0.15, rgba(215,240,240,0.9)), color-stop(0.5, rgba(235,250,250,0)));
10 | background-image: -moz-linear-gradient(bottom,rgba(215,240,240,0.9),rgba(235,250,250,0)) #ebf7f9;
11 | }
12 | --EXPECT--
13 | array (
14 | 'div' =>
15 | array (
16 | 'display' => 'block',
17 | 'display ' => 'inline-block',
18 | ),
19 | '.gradient' =>
20 | array (
21 | 'background-image' => '-webkit-gradient(linear,left bottom,left top,color-stop(0.15,rgba(215,240,240,0.9)),color-stop(0.5,rgba(235,250,250,0)))',
22 | 'background-image ' => '-moz-linear-gradient(bottom,rgba(215,240,240,0.9),rgba(235,250,250,0)) #ebf7f9',
23 | ),
24 | )
25 | --SETTINGS--
26 | discard_invalid_properties=false
27 | optimise_shorthands=0
28 | css_level='CSS21'
29 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/atmedia-decimals.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Decimal values in @media selectors should be maintained.
3 | --CSS--
4 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
5 | #browserHigh {
6 | background-image: url(http://design5279.files.wordpress.com/2012/04/browser-128.png);
7 | }
8 |
9 | #internetHigh {
10 | background-image: url(http://design5279.files.wordpress.com/2012/04/internet-128.png);
11 | }
12 | }
13 | --FULLEXPECT--
14 | array (
15 | '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),only screen and (min-device-pixel-ratio: 1.5) ' =>
16 | array (
17 | '#browserHigh' =>
18 | array (
19 | 'background-image' => 'url(http://design5279.files.wordpress.com/2012/04/browser-128.png)',
20 | ),
21 | '#internetHigh' =>
22 | array (
23 | 'background-image' => 'url(http://design5279.files.wordpress.com/2012/04/internet-128.png)',
24 | ),
25 | ),
26 | )
27 | --SETTINGS--
28 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/same-atmedia-nomerge.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Don't merge multiples occurences of same @media
3 | --SETTINGS--
4 | merge_selectors = 0
5 | --CSS--
6 | @media screen, tv, projection {
7 | BODY {
8 | background-color: red;
9 | }
10 | }
11 |
12 | BODY {
13 | color: black;
14 | }
15 |
16 | @media screen, tv, projection {
17 | BODY {
18 | color: green;
19 | }
20 | }
21 |
22 | BODY {
23 | background-color: white;
24 | }
25 |
26 | --FULLEXPECT--
27 | array (
28 | '@media screen,tv,projection ' =>
29 | array (
30 | 'BODY' =>
31 | array (
32 | 'background-color' => 'red',
33 | ),
34 | ),
35 | 41 =>
36 | array (
37 | 'BODY' =>
38 | array (
39 | 'color' => '#000',
40 | ),
41 | ),
42 | '@media screen,tv,projection ' =>
43 | array (
44 | 'BODY' =>
45 | array (
46 | 'color' => 'green',
47 | ),
48 | ),
49 | 42 =>
50 | array (
51 | 'BODY' =>
52 | array (
53 | 'background-color' => '#fff',
54 | ),
55 | ),
56 | )
57 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/font-face-mini.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | @font-face rules
3 | --CSS--
4 | @font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}
5 | --FULLEXPECT--
6 | array (
7 | ' ' => array(
8 | '@font-face' =>
9 | array (
10 | 'font-family' => '\'Glyphicons Halflings\'',
11 | 'src' => 'url(../fonts/glyphicons-halflings-regular.eot)',
12 | 'src ' => 'url(../fonts/glyphicons-halflings-regular.eot?#iefix) format("embedded-opentype"),url(../fonts/glyphicons-halflings-regular.woff) format("woff"),url(../fonts/glyphicons-halflings-regular.ttf) format("truetype"),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format("svg")',
13 | ),
14 | ),
15 | )
16 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/properties/multiple-properties.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Support for multiple background properties.
3 | --CSS--
4 | body {
5 | background: linear-gradient(bottom, rgb(153,102,51) 0%, rgb(51,153,102) 30%, rgb(102,51,153) 100%);
6 | background: -o-linear-gradient(bottom, rgb(153,102,51) 0%, rgb(51,153,102) 30%, rgb(102,51,153) 100%);
7 | background: -moz-linear-gradient(bottom, rgb(153,102,51) 0%, rgb(51,153,102) 30%, rgb(102,51,153) 100%);
8 | background: -webkit-linear-gradient(bottom, rgb(153,102,51) 0%, rgb(51,153,102) 30%, rgb(102,51,153) 100%);
9 | background: -ms-linear-gradient(bottom, rgb(153,102,51) 0%, rgb(51,153,102) 30%, rgb(102,51,153) 100%);
10 | }
11 | --EXPECT--
12 | array (
13 | 'body' =>
14 | array (
15 | 'background' => 'linear-gradient(bottom,#963 0%,#396 30%,#639 100%)',
16 | 'background ' => '-o-linear-gradient(bottom,#963 0%,#396 30%,#639 100%)',
17 | 'background ' => '-moz-linear-gradient(bottom,#963 0%,#396 30%,#639 100%)',
18 | 'background ' => '-webkit-linear-gradient(bottom,#963 0%,#396 30%,#639 100%)',
19 | 'background ' => '-ms-linear-gradient(bottom,#963 0%,#396 30%,#639 100%)',
20 | ),
21 | )
22 |
--------------------------------------------------------------------------------
/Main.sublime-menu:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "caption": "Preferences",
4 | "mnemonic": "n",
5 | "id": "preferences",
6 | "children":
7 | [
8 | {
9 | "caption": "Package Settings",
10 | "mnemonic": "P",
11 | "id": "package-settings",
12 | "children":
13 | [
14 | {
15 | "caption": "CSSTidy",
16 | "children":
17 | [
18 | {
19 | "command": "open_file",
20 | "args": {"file": "${packages}/CSSTidy/CSSTidy.sublime-settings"},
21 | "caption": "Settings – Default"
22 | },
23 | {
24 | "command": "open_file",
25 | "args": {"file": "${packages}/User/CSSTidy.sublime-settings"},
26 | "caption": "Settings – User"
27 | },
28 | { "caption": "-" }
29 | ]
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 | ]
36 |
--------------------------------------------------------------------------------
/csstidy.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | // true or false
3 | //"remove_bslash": true
4 |
5 | // false or true
6 | //"lowercase_s": false,
7 |
8 | // false or true
9 | //"timestamp": false,
10 |
11 | // "1", "2", "0"
12 | //"optimise_shorthands": "1",
13 |
14 | // false or true
15 | //"remove_last_;": false,
16 |
17 | // false or true
18 | //"sort_selectors": false,
19 |
20 | // true or false
21 | //"compress_font-weight": true,
22 |
23 | // false or true
24 | // "discard_invalid_properties": false,
25 |
26 | // false or true
27 | // "discard_invalid_selectors": false,
28 |
29 | //"0", "1", "2"
30 | //"case_properties": "0",
31 |
32 | // true or false
33 | //"compress_colors": "true",
34 |
35 | // false or true
36 | //"lowercase_s": "false",
37 |
38 | // default, filename, low, high, highest, template_string
39 | // if 'filename', looks for in the User folder of the packages directory
40 | // A sample file (medium-template.txt) is in the csstidy package folder.
41 | // More info on templates: http://csstidy.sourceforge.net/templates.php
42 | "template": "default",
43 |
44 | // false or true
45 | "preserve_css": "true",
46 |
47 | // false or true
48 | "sort_properties": "false",
49 |
50 | // "2", "1", "0"
51 | "merge_selectors": "0"
52 |
53 | }
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/print-plain/font-face-atmedia.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test simple CSS print
3 | --CSS--
4 | /* Based on the original Style Sheet for the fisubsilver v2 Theme for phpBB version 2+
5 | Edited by Daz - http://www.forumimages.com - last updated 26-06-03 */
6 | /* The content of the posts (body of text) */
7 | /* General page style */
8 |
9 | /* begin suggest post */
10 | .float-l {
11 | float : left ;
12 | }
13 |
14 | @font-face {
15 | font-family: GillSans;
16 | src:url("/generic/fonts/GillSansC.otf") format('opentype');
17 | font-style: normal;
18 | font-weight: bold;
19 | }
20 |
21 | .font-9{
22 | font-size: 11px;
23 | }
24 |
25 | @media print {
26 | .font-9{
27 | font-size: 9px;
28 | }
29 | }
30 |
31 | .form-suggest {
32 | height : 200px ;
33 | background : #DEE2D0 ;
34 | vertical-align : top;
35 | }
36 |
37 |
38 | --PRINT--
39 | @media screen {
40 | .float-l{float:left}
41 | }
42 | @font-face{font-family:GillSans;src:url(/generic/fonts/GillSansC.otf) format("opentype");font-style:normal;font-weight:700}
43 | @media screen {
44 | .font-9{font-size:11px}
45 | }
46 | @media print {
47 | .font-9{font-size:9px}
48 | }
49 | @media screen {
50 | .form-suggest{height:200px;background:#DEE2D0;vertical-align:top}
51 | }
52 | --SETTINGS--
53 | template='high'
54 | sort_properties=false
55 | sort_selectors=false
56 | default_media="@media screen"
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/print-plain/simple-highest.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test simple CSS print
3 | --CSS--
4 | /* Based on the original Style Sheet for the fisubsilver v2 Theme for phpBB version 2+
5 | Edited by Daz - http://www.forumimages.com - last updated 26-06-03 */
6 | /* The content of the posts (body of text) */
7 | /* General page style */
8 |
9 | /* begin suggest post */
10 | .float-l {
11 | float : left ;
12 | }
13 |
14 | .form-suggest {
15 | height : 200px ;
16 | background : #DEE2D0 ;
17 | vertical-align : top;
18 | }
19 |
20 | .form-input input{
21 | font-size: 10px;
22 | }
23 |
24 | .form-input textarea{
25 | font-size: 11px;
26 | width: 350px;
27 | }
28 |
29 | .form-label{
30 | font-size: 10px;
31 | font-weight: bold;
32 | line-height: 25px;
33 | padding-right: 10px;
34 | text-align: right;
35 | width: 100px;
36 | color: #39738F;
37 | }
38 |
39 | .font-9{
40 | font-size: 9px;
41 | }
42 | --PRINT--
43 | .float-l{float:left}.form-suggest{height:200px;background:#DEE2D0;vertical-align:top}.form-input input{font-size:10px}.form-input textarea{font-size:11px;width:350px}.form-label{font-size:10px;font-weight:700;line-height:25px;padding-right:10px;text-align:right;width:100px;color:#39738F}.font-9{font-size:9px}
44 | --SETTINGS--
45 | template='highest'
46 | sort_properties=false
47 | sort_selectors=false
--------------------------------------------------------------------------------
/csstidyphp/NEWS:
--------------------------------------------------------------------------------
1 | Changelog
2 |
3 | Key: # = backwards incompatible change, ! = new feature, - = bugfix.
4 |
5 | 1.4, unknown release date
6 | # CSSTidy is now licensed under LGPL!
7 | ! csstidy->set_cfg now accept a single parameter, an associative array, to
8 | set all configuration options
9 | ! Templates can now be loaded via set_cfg using the 'template' config
10 | parameter
11 | ! csstidy_print->formatted_page added, returns a full XHTML page based
12 | off of csstidy_print->formatted
13 | ! cssparsed.css created, contains just the CSS for formatted CSS output
14 | ! New CSS 3 units "ch" and "turn" added
15 | ! Unit tests added, requires Text_Diff (PEAR) and SimpleTest
16 | ! Some invalid selectors are now removed during optimization, this can
17 | be turned off by setting 'discard_invalid_selectors' to false
18 | - Added localizations for css_optimiser.php
19 | - Fixed bug with cookie setting for custom templates
20 | - Minor security problem in css_optimiser.php fixed
21 | - Fixed bug with float handling in exotic locales
22 | - Fixed bug with non-functioning getenv in ASAPI
23 | - Fixed bug with bad hexadecimal syntax recovery
24 | - At-selectors optimized by removing unnecessary url()
25 | - Fixed optimisation: 1.0 was not optimised to 1
26 | - Fixed incorrect parsing of !imporant close to numbers
27 | - Allowed Copy to Clipboard for Firefox if preference set (if not, gives
28 | instructions on how to add and warning re: security)
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/print-plain/simple-high.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test simple CSS print
3 | --CSS--
4 | /* Based on the original Style Sheet for the fisubsilver v2 Theme for phpBB version 2+
5 | Edited by Daz - http://www.forumimages.com - last updated 26-06-03 */
6 | /* The content of the posts (body of text) */
7 | /* General page style */
8 |
9 | /* begin suggest post */
10 | .float-l {
11 | float : left ;
12 | }
13 |
14 | .form-suggest {
15 | height : 200px ;
16 | background : #DEE2D0 ;
17 | vertical-align : top;
18 | }
19 |
20 | .form-input input{
21 | font-size: 10px;
22 | }
23 |
24 | .form-input textarea{
25 | font-size: 11px;
26 | width: 350px;
27 | }
28 |
29 | .form-label{
30 | font-size: 10px;
31 | font-weight: bold;
32 | line-height: 25px;
33 | padding-right: 10px;
34 | text-align: right;
35 | width: 100px;
36 | color: #39738F;
37 | }
38 |
39 | .font-9{
40 | font-size: 9px;
41 | }
42 | --PRINT--
43 | .float-l{float:left}
44 | .form-suggest{height:200px;background:#DEE2D0;vertical-align:top}
45 | .form-input input{font-size:10px}
46 | .form-input textarea{font-size:11px;width:350px}
47 | .form-label{font-size:10px;font-weight:700;line-height:25px;padding-right:10px;text-align:right;width:100px;color:#39738F}
48 | .font-9{font-size:9px}
49 | --SETTINGS--
50 | template='high'
51 | sort_properties=false
52 | sort_selectors=false
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/shorthands/bugshorthand3.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test general font optimization
3 | --CSS--
4 | .form-suggest {
5 | height : 200px ;
6 | background : #DEE2D0 ;
7 | vertical-align : top;
8 | }
9 |
10 | body{
11 | color: #000000;
12 | font : 11px Verdana, Arial, Helvetica, sans-serif ;
13 | margin: 0 10px 10px 10px;
14 | padding: 0;
15 | overflow:auto;
16 | }
17 | .degrade{
18 | background-color:#777777;
19 | background:-webkit-gradient(linear,left top,left bottom,from(#999999),to(#666666));
20 | background-image:-moz-linear-gradient(top,#999999,#666666);
21 | }
22 |
23 | .sans {background:none;}
24 | --EXPECT--
25 | array (
26 | '.form-suggest' =>
27 | array (
28 | 'height' => '200px',
29 | 'background' => '#DEE2D0',
30 | 'vertical-align' => 'top',
31 | ),
32 |
33 | 'body' =>
34 | array (
35 | 'color' => '#000',
36 | 'font' => '11px Verdana,Arial,Helvetica,sans-serif',
37 | 'margin' => '0 10px 10px',
38 | 'padding' => '0',
39 | 'overflow' => 'auto',
40 | ),
41 | '.degrade' =>
42 | array (
43 | 'background-color' => '#777',
44 | 'background' => '-webkit-gradient(linear,left top,left bottom,from(#999),to(#666))',
45 | 'background-image' => '-moz-linear-gradient(top,#999,#666)',
46 | ),
47 | '.sans' =>
48 | array (
49 | 'background' => 'none',
50 | ),
51 |
52 | )
53 | --SETTINGS--
54 | optimise_shorthands=3
55 | sort_selectors=0
56 | sort_properties=0
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/special/newlines.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | @font-face rules
3 | --CSS--
4 | a {
5 | background: -webkit-gradient(
6 | linear,
7 | left bottom,
8 | left top,
9 | color-stop(0, rgb(153,102,51)),
10 | color-stop(0.3, rgb(51,153,102)),
11 | color-stop(1, rgb(102,51,153))
12 | );
13 | content: "ABC
14 | 123
15 | DEF
16 | GHI";
17 | }
18 | b {
19 | content: "ABC\A123";
20 | }
21 | i {
22 | content: 'ABC
23 | 123\ADEF';
24 | }
25 |
26 | u {
27 | background: parenthetical(
28 | "string 1",
29 | "string
30 | 2",
31 | 'string 3',
32 | 'string "4',
33 | 'string "5"',
34 | "string '6",
35 | "string (7)",
36 | "string 8)",
37 | (
38 | (
39 | (
40 | (
41 | ("boo")
42 | )
43 | )
44 | )
45 | ),
46 | (
47 | (
48 | (
49 | (
50 | ("boo ba")
51 | )
52 | )
53 | )
54 | )
55 |
56 | );
57 | }
58 | --EXPECT--
59 | array (
60 | 'a' =>
61 | array (
62 | 'background' => '-webkit-gradient(linear,left bottom,left top,color-stop(0,#963),color-stop(0.3,#396),color-stop(1,#639))',
63 | 'content' => '"ABC\\A123\\ADEF\\AGHI"',
64 | ),
65 | 'b' =>
66 | array (
67 | 'content' => '"ABC\\A123"',
68 | ),
69 | 'i' =>
70 | array (
71 | 'content' => '\'ABC\\A123\\ADEF\'',
72 | ),
73 | 'u' =>
74 | array (
75 | 'background' => 'parenthetical("string 1","string\\A2",\'string 3\',\'string "4\',\'string "5"\',"string \'6","string (7)","string 8)",(((((boo))))),((((("boo ba"))))))',
76 | ),
77 | )
78 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/print-plain/simple-default.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test simple CSS print
3 | --CSS--
4 | /* Based on the original Style Sheet for the fisubsilver v2 Theme for phpBB version 2+
5 | Edited by Daz - http://www.forumimages.com - last updated 26-06-03 */
6 | /* The content of the posts (body of text) */
7 | /* General page style */
8 |
9 | /* begin suggest post */
10 | .float-l {
11 | float : left ;
12 | }
13 |
14 | .form-suggest {
15 | height : 200px ;
16 | background : #DEE2D0 ;
17 | vertical-align : top;
18 | }
19 |
20 | .form-input input{
21 | font-size: 10px;
22 | }
23 |
24 | .form-input textarea{
25 | font-size: 11px;
26 | width: 350px;
27 | }
28 |
29 | .form-label{
30 | font-size: 10px;
31 | font-weight: bold;
32 | line-height: 25px;
33 | padding-right: 10px;
34 | text-align: right;
35 | width: 100px;
36 | color: #39738F;
37 | }
38 |
39 | .font-9{
40 | font-size: 9px;
41 | }
42 | --PRINT--
43 | .float-l {
44 | float:left
45 | }
46 |
47 | .form-suggest {
48 | height:200px;
49 | background:#DEE2D0;
50 | vertical-align:top
51 | }
52 |
53 | .form-input input {
54 | font-size:10px
55 | }
56 |
57 | .form-input textarea {
58 | font-size:11px;
59 | width:350px
60 | }
61 |
62 | .form-label {
63 | font-size:10px;
64 | font-weight:700;
65 | line-height:25px;
66 | padding-right:10px;
67 | text-align:right;
68 | width:100px;
69 | color:#39738F
70 | }
71 |
72 | .font-9 {
73 | font-size:9px
74 | }
75 | --SETTINGS--
76 | sort_properties=false
77 | sort_selectors=false
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/properties/importance.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Testing proper parsing of importance.
3 | --CSS--
4 | a {
5 | width: 100px;
6 | height: 200px;
7 | }
8 |
9 | a {
10 | width: 400px !important;
11 | height: 300px;
12 | }
13 |
14 | b {
15 | width: 100px !important;
16 | height: 200px;
17 | }
18 |
19 | b {
20 | width: 400px;
21 | height: 300px !important;
22 | }
23 |
24 | c {
25 | width: 100px!important;
26 | }
27 |
28 | d {
29 | width: 100px;
30 | }
31 |
32 | d {
33 | width: 200px !IMPORTANT;
34 | }
35 |
36 | d {
37 | width: 300px ! important;
38 | }
39 |
40 | e {
41 | background-image: url(http://example.com/test.png) !importANT;
42 | }
43 |
44 | f {
45 | background-image: url(http://example.com/test.png)!imPORTant;
46 | }
47 | --EXPECT--
48 | array (
49 | 'a' =>
50 | array (
51 | 'width' => '100px',
52 | 'height' => '200px',
53 | 'width ' => '400px!important',
54 | 'height ' => '300px',
55 | ),
56 | 'b' =>
57 | array (
58 | 'width' => '100px!important',
59 | 'height' => '200px',
60 | 'width ' => '400px',
61 | 'height ' => '300px!important',
62 | ),
63 | 'c' =>
64 | array (
65 | 'width' => '100px!important',
66 | ),
67 | 'd' =>
68 | array (
69 | 'width' => '100px',
70 | 'width ' => '200px!important',
71 | 'width ' => '300px!important',
72 | ),
73 | 'e' =>
74 | array (
75 | 'background-image' => 'url(http://example.com/test.png)!important',
76 | ),
77 | 'f' =>
78 | array (
79 | 'background-image' => 'url(http://example.com/test.png)!important',
80 | ),
81 | )
82 |
--------------------------------------------------------------------------------
/csstidyphp/class.csstidy_ctype.php:
--------------------------------------------------------------------------------
1 | '. $this->original .' '. $this->final .'
'. htmlspecialchars(implode("\n", $lines)) .''. htmlspecialchars(implode("\n", $lines)) .''. htmlspecialchars(implode("\n", $lines)) .''. htmlspecialchars(implode("\n", $lines)) .''. htmlspecialchars(implode("\n", $orig)) .''. htmlspecialchars(implode("\n", $final)) .'| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | |
33 |
34 |
|
47 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | |
33 |
34 |
|
58 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | Files: 33 |
34 | class.csstidy.php
35 | 36 | class.csstidy_optimise.php 37 | 38 | class.csstidy_print.php 39 | 40 | data.inc.php 41 | 42 | 43 | 44 | Classes: 45 | 50 | |
51 |
52 |
|
64 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | Files: 33 |
34 | class.csstidy.php
35 | 36 | class.csstidy_optimise.php 37 | 38 | class.csstidy_print.php 39 | 40 | data.inc.php 41 | 42 | 43 | 44 | Classes: 45 | 50 | |
51 |
52 |
|
64 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | 33 | |
34 |
35 |
|
73 |
'. htmlspecialchars($this->css) .''; 120 | $diff = new Text_Diff( 121 | 'auto', 122 | array( 123 | explode("\n", $this->print?$this->expect:var_export($this->expect,true)), 124 | explode("\n", $this->print?$this->actual:var_export($this->actual,true)) 125 | ) 126 | ); 127 | $renderer = new Text_Diff_Renderer_parallel(); 128 | $renderer->original = 'Expected'; 129 | $renderer->final = 'Actual'; 130 | $message .= $renderer->render($diff); 131 | return $message; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /csstidyphp/Docs/csstidy/_class_csstidy_print_php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | Files: 33 |
34 | class.csstidy.php
35 | 36 | class.csstidy_optimise.php 37 | 38 | class.csstidy_print.php 39 | 40 | data.inc.php 41 | 42 | 43 | 44 | Classes: 45 | 50 | |
51 |
52 |
|
93 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | Files: 33 |
34 | class.csstidy.php
35 | 36 | class.csstidy_optimise.php 37 | 38 | class.csstidy_print.php 39 | 40 | data.inc.php 41 | 42 | 43 | 44 | Classes: 45 | 50 | |
51 |
52 |
|
93 |
| csstidy | 11 |
| 15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 | | 19 |
|
26 |
27 |
28 |
29 | Packages:30 | csstidy 31 | 32 | Files: 33 |
34 | class.csstidy.php
35 | 36 | class.csstidy_optimise.php 37 | 38 | class.csstidy_print.php 39 | 40 | data.inc.php 41 | 42 | 43 | 44 | Classes: 45 | 50 | |
51 |
52 |
|
126 |
";
161 | $output .= $this->formatted();
162 | $output .= '' . "\n" . '';
163 | return $this->output_css_plain;
164 | }
165 |
166 | /**
167 | * Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain
168 | * @param bool $plain plain text or not
169 | * @param string $default_media default @media to add to selectors without any @media
170 | * @access private
171 | * @version 2.0
172 | */
173 | public function _print($plain = false, $default_media='') {
174 | if ($this->output_css && $this->output_css_plain) {
175 | return;
176 | }
177 |
178 | $output = '';
179 | if (!$this->parser->get_cfg('preserve_css')) {
180 | $this->_convert_raw_css($default_media);
181 | }
182 |
183 | $template = & $this->template;
184 |
185 | if ($plain) {
186 | $template = array_map('strip_tags', $template);
187 | }
188 |
189 | if ($this->parser->get_cfg('timestamp')) {
190 | array_unshift($this->tokens, array(COMMENT, ' CSSTidy ' . $this->parser->version . ': ' . date('r') . ' '));
191 | }
192 |
193 | if (!empty($this->charset)) {
194 | $output .= $template[0] . '@charset ' . $template[5] . $this->charset . $template[6] . $template[13];
195 | }
196 |
197 | if (!empty($this->import)) {
198 | for ($i = 0, $size = count($this->import); $i < $size; $i++) {
199 | if (substr($this->import[$i], 0, 4) === 'url(' && substr($this->import[$i], -1, 1) === ')') {
200 | $this->import[$i] = '"' . substr($this->import[$i], 4, -1) . '"';
201 | $this->parser->log('Optimised @import : Removed "url("', 'Information');
202 | }
203 | $output .= $template[0] . '@import ' . $template[5] . $this->import[$i] . $template[6] . $template[13];
204 | }
205 | }
206 |
207 | if (!empty($this->namespace)) {
208 | if (($p=strpos($this->namespace,"url("))!==false && substr($this->namespace, -1, 1) === ')') {
209 | $this->namespace = substr_replace($this->namespace,'"',$p,4);
210 | $this->namespace = substr($this->namespace, 0, -1) . '"';
211 | $this->parser->log('Optimised @namespace : Removed "url("', 'Information');
212 | }
213 | $output .= $template[0] . '@namespace ' . $template[5] . $this->namespace . $template[6] . $template[13];
214 | }
215 |
216 | $in_at_out = '';
217 | $out = & $output;
218 |
219 | foreach ($this->tokens as $key => $token) {
220 | switch ($token[0]) {
221 | case AT_START:
222 | $out .= $template[0] . $this->_htmlsp($token[1], $plain) . $template[1];
223 | $out = & $in_at_out;
224 | break;
225 |
226 | case SEL_START:
227 | if ($this->parser->get_cfg('lowercase_s'))
228 | $token[1] = strtolower($token[1]);
229 | $out .= ( $token[1]{0} !== '@') ? $template[2] . $this->_htmlsp($token[1], $plain) : $template[0] . $this->_htmlsp($token[1], $plain);
230 | $out .= $template[3];
231 | break;
232 |
233 | case PROPERTY:
234 | if ($this->parser->get_cfg('case_properties') === 2) {
235 | $token[1] = strtoupper($token[1]);
236 | } elseif ($this->parser->get_cfg('case_properties') === 1) {
237 | $token[1] = strtolower($token[1]);
238 | }
239 | $out .= $template[4] . $this->_htmlsp($token[1], $plain) . ':' . $template[5];
240 | break;
241 |
242 | case VALUE:
243 | $out .= $this->_htmlsp($token[1], $plain);
244 | if ($this->_seeknocomment($key, 1) == SEL_END && $this->parser->get_cfg('remove_last_;')) {
245 | $out .= str_replace(';', '', $template[6]);
246 | } else {
247 | $out .= $template[6];
248 | }
249 | break;
250 |
251 | case SEL_END:
252 | $out .= $template[7];
253 | if ($this->_seeknocomment($key, 1) != AT_END)
254 | $out .= $template[8];
255 | break;
256 |
257 | case AT_END:
258 | $out = & $output;
259 | $out .= $template[10] . str_replace("\n", "\n" . $template[10], $in_at_out);
260 | $in_at_out = '';
261 | $out .= $template[9];
262 | break;
263 |
264 | case COMMENT:
265 | $out .= $template[11] . '/*' . $this->_htmlsp($token[1], $plain) . '*/' . $template[12];
266 | break;
267 | }
268 | }
269 |
270 | $output = trim($output);
271 |
272 | if (!$plain) {
273 | $this->output_css = $output;
274 | $this->_print(true);
275 | } else {
276 | // If using spaces in the template, don't want these to appear in the plain output
277 | $this->output_css_plain = str_replace(' ', '', $output);
278 | }
279 | }
280 |
281 | /**
282 | * Gets the next token type which is $move away from $key, excluding comments
283 | * @param integer $key current position
284 | * @param integer $move move this far
285 | * @return mixed a token type
286 | * @access private
287 | * @version 1.0
288 | */
289 | public function _seeknocomment($key, $move) {
290 | $go = ($move > 0) ? 1 : -1;
291 | for ($i = $key + 1; abs($key - $i) - 1 < abs($move); $i += $go) {
292 | if (!isset($this->tokens[$i])) {
293 | return;
294 | }
295 | if ($this->tokens[$i][0] == COMMENT) {
296 | $move += 1;
297 | continue;
298 | }
299 | return $this->tokens[$i][0];
300 | }
301 | }
302 |
303 | /**
304 | * Converts $this->css array to a raw array ($this->tokens)
305 | * @param string $default_media default @media to add to selectors without any @media
306 | * @access private
307 | * @version 1.0
308 | */
309 | public function _convert_raw_css($default_media='') {
310 | $this->tokens = array();
311 | $sort_selectors = $this->parser->get_cfg('sort_selectors');
312 | $sort_properties = $this->parser->get_cfg('sort_properties');
313 |
314 | foreach ($this->css as $medium => $val) {
315 | if ($sort_selectors)
316 | ksort($val);
317 | if (intval($medium) < DEFAULT_AT) {
318 | // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur
319 | if (strlen(trim($medium))) {
320 | $this->parser->_add_token(AT_START, $medium, true);
321 | }
322 | } elseif ($default_media) {
323 | $this->parser->_add_token(AT_START, $default_media, true);
324 | }
325 |
326 | foreach ($val as $selector => $vali) {
327 | if ($sort_properties)
328 | ksort($vali);
329 | $this->parser->_add_token(SEL_START, $selector, true);
330 |
331 | $invalid = array(
332 | '*' => array(), // IE7 hacks first
333 | '_' => array(), // IE6 hacks
334 | '/' => array(), // IE6 hacks
335 | '-' => array() // IE6 hacks
336 | );
337 | foreach ($vali as $property => $valj) {
338 | if (strncmp($property,"//",2)!==0) {
339 | $matches = array();
340 | if ($sort_properties && preg_match('/^(\*|_|\/|-)(?!(ms|moz|o\b|xv|atsc|wap|khtml|webkit|ah|hp|ro|rim|tc)-)/', $property, $matches)) {
341 | $invalid[$matches[1]][$property] = $valj;
342 | } else {
343 | $this->parser->_add_token(PROPERTY, $property, true);
344 | $this->parser->_add_token(VALUE, $valj, true);
345 | }
346 | }
347 | }
348 | foreach ($invalid as $prefix => $props) {
349 | foreach ($props as $property => $valj) {
350 | $this->parser->_add_token(PROPERTY, $property, true);
351 | $this->parser->_add_token(VALUE, $valj, true);
352 | }
353 | }
354 | $this->parser->_add_token(SEL_END, $selector, true);
355 | }
356 |
357 | if (intval($medium) < DEFAULT_AT) {
358 | // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur
359 | if (strlen(trim($medium))) {
360 | $this->parser->_add_token(AT_END, $medium, true);
361 | }
362 | } elseif ($default_media) {
363 | $this->parser->_add_token(AT_END, $default_media, true);
364 | }
365 | }
366 | }
367 |
368 | /**
369 | * Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.
370 | * @param string $string
371 | * @param bool $plain
372 | * @return string
373 | * @see csstidy_print::_print()
374 | * @access private
375 | * @version 1.0
376 | */
377 | public function _htmlsp($string, $plain) {
378 | if (!$plain) {
379 | return htmlspecialchars($string, ENT_QUOTES, 'utf-8');
380 | }
381 | return $string;
382 | }
383 |
384 | /**
385 | * Get compression ratio
386 | * @access public
387 | * @return float
388 | * @version 1.2
389 | */
390 | public function get_ratio() {
391 | if (!$this->output_css_plain) {
392 | $this->formatted();
393 | }
394 | return round((strlen($this->input_css) - strlen($this->output_css_plain)) / strlen($this->input_css), 3) * 100;
395 | }
396 |
397 | /**
398 | * Get difference between the old and new code in bytes and prints the code if necessary.
399 | * @access public
400 | * @return string
401 | * @version 1.1
402 | */
403 | public function get_diff() {
404 | if (!$this->output_css_plain) {
405 | $this->formatted();
406 | }
407 |
408 | $diff = strlen($this->output_css_plain) - strlen($this->input_css);
409 |
410 | if ($diff > 0) {
411 | return '+' . $diff;
412 | } elseif ($diff == 0) {
413 | return '+-' . $diff;
414 | }
415 |
416 | return $diff;
417 | }
418 |
419 | /**
420 | * Get the size of either input or output CSS in KB
421 | * @param string $loc default is "output"
422 | * @access public
423 | * @return integer
424 | * @version 1.0
425 | */
426 | public function size($loc = 'output') {
427 | if ($loc === 'output' && !$this->output_css) {
428 | $this->formatted();
429 | }
430 |
431 | if ($loc === 'input') {
432 | return (strlen($this->input_css) / 1000);
433 | } else {
434 | return (strlen($this->output_css_plain) / 1000);
435 | }
436 | }
437 |
438 | }
439 |
--------------------------------------------------------------------------------
/csstidyphp/testing/unit-tests/csst/properties/css3.csst:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Test CSS1 properties
3 | --CSS--
4 | a {
5 | foo:rgb(0,0,0);
6 | bar:black;
7 | baz:#ffaabb;
8 | qux:#f00;
9 | quux:blanchedalmond;
10 | quuux:rgb(0,0,1);
11 | alignment-adjust:1;
12 | alignment-baseline:1;
13 | animation:1;
14 | animation-delay:1;
15 | animation-direction:1;
16 | animation-duration:1;
17 | animation-iteration-count:1;
18 | animation-name:1;
19 | animation-play-state:1;
20 | animation-timing-function:1;
21 | appearance:1;
22 | azimuth:1;
23 | backface-visibility:1;
24 | background:1;
25 | background-attachment:1;
26 | background-clip:1;
27 | background-color:1;
28 | background-image:1;
29 | background-origin:1;
30 | background-position:1;
31 | background-repeat:1;
32 | background-size:1;
33 | baseline-shift:1;
34 | binding:1;
35 | bleed:1;
36 | bookmark-label:1;
37 | bookmark-level:1;
38 | bookmark-state:1;
39 | bookmark-target:1;
40 | border:1;
41 | border-bottom:1;
42 | border-bottom-color:1;
43 | border-bottom-left-radius:1;
44 | border-bottom-right-radius:1;
45 | border-bottom-style:1;
46 | border-bottom-width:1;
47 | border-collapse:1;
48 | border-color:1;
49 | border-image:1;
50 | border-image-outset:1;
51 | border-image-repeat:1;
52 | border-image-slice:1;
53 | border-image-source:1;
54 | border-image-width:1;
55 | border-left:1;
56 | border-left-color:1;
57 | border-left-style:1;
58 | border-left-width:1;
59 | border-radius:1;
60 | border-right:1;
61 | border-right-color:1;
62 | border-right-style:1;
63 | border-right-width:1;
64 | border-spacing:1;
65 | border-style:1;
66 | border-top:1;
67 | border-top-color:1;
68 | border-top-left-radius:1;
69 | border-top-right-radius:1;
70 | border-top-style:1;
71 | border-top-width:1;
72 | border-width:1;
73 | bottom:1;
74 | box-decoration-break:1;
75 | box-shadow:1;
76 | box-sizing:1;
77 | break-after:1;
78 | break-before:1;
79 | break-inside:1;
80 | caption-side:1;
81 | clear:1;
82 | clip:1;
83 | color:1;
84 | color-profile:1;
85 | column-count:1;
86 | column-fill:1;
87 | column-gap:1;
88 | column-rule:1;
89 | column-rule-color:1;
90 | column-rule-style:1;
91 | column-rule-width:1;
92 | column-span:1;
93 | column-width:1;
94 | columns:1;
95 | content:1;
96 | counter-increment:1;
97 | counter-reset:1;
98 | crop:1;
99 | cue:1;
100 | cue-after:1;
101 | cue-before:1;
102 | cursor:1;
103 | direction:1;
104 | display:1;
105 | dominant-baseline:1;
106 | drop-initial-after-adjust:1;
107 | drop-initial-after-align:1;
108 | drop-initial-before-adjust:1;
109 | drop-initial-before-align:1;
110 | drop-initial-size:1;
111 | drop-initial-value:1;
112 | elevation:1;
113 | empty-cells:1;
114 | fit:1;
115 | fit-position:1;
116 | flex-align:1;
117 | flex-flow:1;
118 | flex-line-pack:1;
119 | flex-order:1;
120 | flex-pack:1;
121 | float:1;
122 | float-offset:1;
123 | font:1;
124 | font-family:1;
125 | font-size:1;
126 | font-size-adjust:1;
127 | font-stretch:1;
128 | font-style:1;
129 | font-variant:1;
130 | font-weight:1;
131 | grid-columns:1;
132 | grid-rows:1;
133 | hanging-punctuation:1;
134 | height:1;
135 | hyphenate-after:1;
136 | hyphenate-before:1;
137 | hyphenate-character:1;
138 | hyphenate-lines:1;
139 | hyphenate-resource:1;
140 | hyphens:1;
141 | icon:1;
142 | image-orientation:1;
143 | image-rendering:1;
144 | image-resolution:1;
145 | inline-box-align:1;
146 | left:1;
147 | letter-spacing:1;
148 | line-break:1;
149 | line-height:1;
150 | line-stacking:1;
151 | line-stacking-ruby:1;
152 | line-stacking-shift:1;
153 | line-stacking-strategy:1;
154 | list-style:1;
155 | list-style-image:1;
156 | list-style-position:1;
157 | list-style-type:1;
158 | margin:1;
159 | margin-bottom:1;
160 | margin-left:1;
161 | margin-right:1;
162 | margin-top:1;
163 | marker-offset:1;
164 | marks:1;
165 | marquee-direction:1;
166 | marquee-loop:1;
167 | marquee-play-count:1;
168 | marquee-speed:1;
169 | marquee-style:1;
170 | max-height:1;
171 | max-width:1;
172 | min-height:1;
173 | min-width:1;
174 | move-to:1;
175 | nav-down:1;
176 | nav-index:1;
177 | nav-left:1;
178 | nav-right:1;
179 | nav-up:1;
180 | opacity:1;
181 | orphans:1;
182 | outline:1;
183 | outline-color:1;
184 | outline-offset:1;
185 | outline-style:1;
186 | outline-width:1;
187 | overflow:1;
188 | overflow-style:1;
189 | overflow-wrap:1;
190 | overflow-x:1;
191 | overflow-y:1;
192 | padding:1;
193 | padding-bottom:1;
194 | padding-left:1;
195 | padding-right:1;
196 | padding-top:1;
197 | page:1;
198 | page-break-after:1;
199 | page-break-before:1;
200 | page-break-inside:1;
201 | page-policy:1;
202 | pause:1;
203 | pause-after:1;
204 | pause-before:1;
205 | perspective:1;
206 | perspective-origin:1;
207 | phonemes:1;
208 | pitch:1;
209 | pitch-range:1;
210 | play-during:1;
211 | position:1;
212 | presentation-level:1;
213 | punctuation-trim:1;
214 | quotes:1;
215 | rendering-intent:1;
216 | resize:1;
217 | rest:1;
218 | rest-after:1;
219 | rest-before:1;
220 | richness:1;
221 | right:1;
222 | rotation:1;
223 | rotation-point:1;
224 | ruby-align:1;
225 | ruby-overhang:1;
226 | ruby-position:1;
227 | ruby-span:1;
228 | size:1;
229 | speak:1;
230 | speak-header:1;
231 | speak-numeral:1;
232 | speak-punctuation:1;
233 | speech-rate:1;
234 | src:1;
235 | stress:1;
236 | string-set:1;
237 | tab-size:1;
238 | table-layout:1;
239 | target:1;
240 | target-name:1;
241 | target-new:1;
242 | target-position:1;
243 | text-align:1;
244 | text-align-last:1;
245 | text-decoration:1;
246 | text-decoration-color:1;
247 | text-decoration-line:1;
248 | text-decoration-skip:1;
249 | text-decoration-style:1;
250 | text-emphasis:1;
251 | text-emphasis-color:1;
252 | text-emphasis-position:1;
253 | text-emphasis-style:1;
254 | text-height:1;
255 | text-indent:1;
256 | text-justify:1;
257 | text-outline:1;
258 | text-shadow:1;
259 | text-space-collapse:1;
260 | text-transform:1;
261 | text-underline-position:1;
262 | text-wrap:1;
263 | top:1;
264 | transform:1;
265 | transform-origin:1;
266 | transform-style:1;
267 | transition:1;
268 | transition-delay:1;
269 | transition-duration:1;
270 | transition-property:1;
271 | transition-timing-function:1;
272 | unicode-bidi:1;
273 | vertical-align:1;
274 | visibility:1;
275 | voice-balance:1;
276 | voice-duration:1;
277 | voice-family:1;
278 | voice-pitch:1;
279 | voice-pitch-range:1;
280 | voice-rate:1;
281 | voice-stress:1;
282 | voice-volume:1;
283 | volume:1;
284 | white-space:1;
285 | widows:1;
286 | width:1;
287 | word-break:1;
288 | word-spacing:1;
289 | word-wrap:1;
290 | z-index:1;
291 | }
292 | --EXPECT--
293 | array (
294 | 'a' =>
295 | array (
296 | 'alignment-adjust' => '1',
297 | 'alignment-baseline' => '1',
298 | 'animation' => '1',
299 | 'animation-delay' => '1',
300 | 'animation-direction' => '1',
301 | 'animation-duration' => '1',
302 | 'animation-iteration-count' => '1',
303 | 'animation-name' => '1',
304 | 'animation-play-state' => '1',
305 | 'animation-timing-function' => '1',
306 | 'appearance' => '1',
307 | 'azimuth' => '1',
308 | 'backface-visibility' => '1',
309 | 'background' => '1px',
310 | 'background-attachment' => '1',
311 | 'background-clip' => '1',
312 | 'background-color' => '#1',
313 | 'background-image' => '1',
314 | 'background-origin' => '1',
315 | 'background-position' => '1px',
316 | 'background-repeat' => '1',
317 | 'background-size' => '1px',
318 | 'baseline-shift' => '1',
319 | 'binding' => '1',
320 | 'bleed' => '1',
321 | 'bookmark-label' => '1',
322 | 'bookmark-level' => '1',
323 | 'bookmark-state' => '1',
324 | 'bookmark-target' => '1',
325 | 'border' => '1px',
326 | 'border-bottom' => '1px',
327 | 'border-bottom-color' => '#1',
328 | 'border-bottom-left-radius' => '1',
329 | 'border-bottom-right-radius' => '1',
330 | 'border-bottom-style' => '1',
331 | 'border-bottom-width' => '1px',
332 | 'border-collapse' => '1',
333 | 'border-color' => '#1',
334 | 'border-image' => '1',
335 | 'border-image-outset' => '1',
336 | 'border-image-repeat' => '1',
337 | 'border-image-slice' => '1',
338 | 'border-image-source' => '1',
339 | 'border-image-width' => '1',
340 | 'border-left' => '1px',
341 | 'border-color' => '#1',
342 | 'border-bottom-color' => '#1',
343 | 'border-left-color' => '#1',
344 | 'border-left-style' => '1',
345 | 'border-left-width' => '1px',
346 | 'border-radius' => '1',
347 | 'border-right' => '1px',
348 | 'border-right-color' => '#1',
349 | 'border-right-style' => '1',
350 | 'border-right-style' => '1',
351 | 'border-right-width' => '1px',
352 | 'border-spacing' => '1px',
353 | 'border-style' => '1',
354 | 'border-top' => '1px',
355 | 'border-top-color' => '#1',
356 | 'border-top-left-radius' => '1',
357 | 'border-top-right-radius' => '1',
358 | 'border-top-style' => '1',
359 | 'border-left-style' => '1',
360 | 'border-bottom-style' => '1',
361 | 'border-top-width' => '1px',
362 | 'border-width' => '1px',
363 | 'border-right-width' => '1px',
364 | 'border-left-width' => '1px',
365 | 'border-bottom-width' => '1px',
366 | 'border-collapse' => '1',
367 | 'border-spacing' => '1px',
368 | 'bottom' => '1px',
369 | 'box-decoration-break' => '1',
370 | 'box-shadow' => '1',
371 | 'box-sizing' => '1',
372 | 'break-after' => '1',
373 | 'break-before' => '1',
374 | 'break-inside' => '1',
375 | 'caption-side' => '1',
376 | 'clear' => '1',
377 | 'clip' => '1',
378 | 'color' => '#1',
379 | 'color-profile' => '1',
380 | 'column-count' => '1',
381 | 'column-fill' => '1',
382 | 'column-gap' => '1px',
383 | 'column-rule' => '1',
384 | 'column-rule-color' => '#1',
385 | 'column-rule-style' => '1',
386 | 'column-rule-width' => '1',
387 | 'column-span' => '1',
388 | 'column-width' => '1px',
389 | 'columns' => '1',
390 | 'content' => '1',
391 | 'counter-increment' => '1',
392 | 'counter-reset' => '1',
393 | 'crop' => '1',
394 | 'cue' => '1',
395 | 'cue-after' => '1',
396 | 'cue-before' => '1',
397 | 'cursor' => '1',
398 | 'direction' => '1',
399 | 'display' => '1',
400 | 'dominant-baseline' => '1',
401 | 'drop-initial-after-adjust' => '1',
402 | 'drop-initial-after-align' => '1',
403 | 'drop-initial-before-adjust' => '1',
404 | 'drop-initial-before-align' => '1',
405 | 'drop-initial-size' => '1',
406 | 'drop-initial-value' => '1',
407 | 'elevation' => '1',
408 | 'empty-cells' => '1',
409 | 'fit' => '1',
410 | 'fit-position' => '1',
411 | 'flex-align' => '1',
412 | 'flex-flow' => '1',
413 | 'flex-line-pack' => '1',
414 | 'flex-order' => '1',
415 | 'flex-pack' => '1',
416 | 'float' => '1',
417 | 'float-offset' => '1',
418 | 'font' => '1',
419 | 'font-family' => '1',
420 | 'font-size' => '1px',
421 | 'font-size-adjust' => '1',
422 | 'font-stretch' => '1',
423 | 'font-style' => '1',
424 | 'font-variant' => '1',
425 | 'font-weight' => '1',
426 | 'grid-columns' => '1',
427 | 'grid-rows' => '1',
428 | 'hanging-punctuation' => '1',
429 | 'height' => '1px',
430 | 'hyphenate-after' => '1',
431 | 'hyphenate-before' => '1',
432 | 'hyphenate-character' => '1',
433 | 'hyphenate-lines' => '1',
434 | 'hyphenate-resource' => '1',
435 | 'hyphens' => '1',
436 | 'icon' => '1',
437 | 'image-orientation' => '1',
438 | 'image-rendering' => '1',
439 | 'image-resolution' => '1',
440 | 'inline-box-align' => '1',
441 | 'left' => '1px',
442 | 'letter-spacing' => '1px',
443 | 'line-break' => '1',
444 | 'line-height' => '1',
445 | 'line-stacking' => '1',
446 | 'line-stacking-ruby' => '1',
447 | 'line-stacking-shift' => '1',
448 | 'line-stacking-strategy' => '1',
449 | 'list-style' => '1',
450 | 'list-style-image' => '1',
451 | 'list-style-position' => '1',
452 | 'list-style-type' => '1',
453 | 'margin' => '1px',
454 | 'margin-bottom' => '1px',
455 | 'margin-left' => '1px',
456 | 'margin-right' => '1px',
457 | 'margin-top' => '1px',
458 | 'marker-offset' => '1',
459 | 'marks' => '1',
460 | 'marquee-direction' => '1',
461 | 'marquee-loop' => '1',
462 | 'marquee-play-count' => '1',
463 | 'marquee-speed' => '1',
464 | 'marquee-style' => '1',
465 | 'max-height' => '1px',
466 | 'max-width' => '1px',
467 | 'min-height' => '1px',
468 | 'min-width' => '1px',
469 | 'move-to' => '1',
470 | 'nav-down' => '1',
471 | 'nav-index' => '1',
472 | 'nav-left' => '1',
473 | 'nav-right' => '1',
474 | 'nav-up' => '1',
475 | 'opacity' => '1',
476 | 'orphans' => '1',
477 | 'outline' => '1px',
478 | 'outline-color' => '#1',
479 | 'outline-offset' => '1',
480 | 'outline-style' => '1',
481 | 'outline-width' => '1px',
482 | 'overflow' => '1',
483 | 'overflow-style' => '1',
484 | 'overflow-wrap' => '1',
485 | 'overflow-x' => '1',
486 | 'overflow-y' => '1',
487 | 'padding' => '1px',
488 | 'padding-bottom' => '1px',
489 | 'padding-left' => '1px',
490 | 'padding-right' => '1px',
491 | 'padding-top' => '1px',
492 | 'page' => '1',
493 | 'page-break-after' => '1',
494 | 'page-break-before' => '1',
495 | 'page-break-inside' => '1',
496 | 'page-policy' => '1',
497 | 'pause' => '1',
498 | 'pause-after' => '1',
499 | 'pause-before' => '1',
500 | 'perspective' => '1px',
501 | 'perspective-origin' => '1',
502 | 'phonemes' => '1',
503 | 'pitch' => '1',
504 | 'pitch-range' => '1',
505 | 'play-during' => '1',
506 | 'position' => '1',
507 | 'presentation-level' => '1',
508 | 'punctuation-trim' => '1',
509 | 'quotes' => '1',
510 | 'rendering-intent' => '1',
511 | 'resize' => '1',
512 | 'rest' => '1',
513 | 'rest-after' => '1',
514 | 'rest-before' => '1',
515 | 'richness' => '1',
516 | 'right' => '1px',
517 | 'rotation' => '1',
518 | 'rotation-point' => '1',
519 | 'ruby-align' => '1',
520 | 'ruby-overhang' => '1',
521 | 'ruby-position' => '1',
522 | 'ruby-span' => '1',
523 | 'size' => '1',
524 | 'speak' => '1',
525 | 'speak-header' => '1',
526 | 'speak-numeral' => '1',
527 | 'speak-punctuation' => '1',
528 | 'speech-rate' => '1',
529 | 'src' => '1',
530 | 'stress' => '1',
531 | 'string-set' => '1',
532 | 'tab-size' => '1',
533 | 'table-layout' => '1',
534 | 'target' => '1',
535 | 'target-name' => '1',
536 | 'target-new' => '1',
537 | 'target-position' => '1',
538 | 'text-align' => '1',
539 | 'text-align-last' => '1',
540 | 'text-decoration' => '1',
541 | 'text-decoration-color' => '1',
542 | 'text-decoration-line' => '1',
543 | 'text-decoration-skip' => '1',
544 | 'text-decoration-style' => '1',
545 | 'text-emphasis' => '1',
546 | 'text-emphasis-color' => '1',
547 | 'text-emphasis-position' => '1',
548 | 'text-emphasis-style' => '1',
549 | 'text-height' => '1',
550 | 'text-indent' => '1px',
551 | 'text-justify' => '1',
552 | 'text-outline' => '1',
553 | 'text-shadow' => '1',
554 | 'text-space-collapse' => '1',
555 | 'letter-spacing' => '1px',
556 | 'text-transform' => '1',
557 | 'text-underline-position' => '1',
558 | 'text-wrap' => '1',
559 | 'top' => '1px',
560 | 'transform' => '1',
561 | 'transform-origin' => '1',
562 | 'transform-style' => '1',
563 | 'transition' => '1',
564 | 'transition-delay' => '1',
565 | 'transition-duration' => '1',
566 | 'transition-property' => '1',
567 | 'transition-timing-function' => '1',
568 | 'unicode-bidi' => '1',
569 | 'vertical-align' => '1',
570 | 'visibility' => '1',
571 | 'voice-balance' => '1',
572 | 'voice-duration' => '1',
573 | 'voice-family' => '1',
574 | 'voice-pitch' => '1',
575 | 'voice-pitch-range' => '1',
576 | 'voice-rate' => '1',
577 | 'voice-stress' => '1',
578 | 'voice-volume' => '1',
579 | 'volume' => '1',
580 | 'white-space' => '1',
581 | 'widows' => '1',
582 | 'width' => '1px',
583 | 'word-break' => '1',
584 | 'word-spacing' => '1px',
585 | 'word-wrap' => '1',
586 | 'z-index' => '1',
587 | ),
588 | )
589 | --SETTINGS--
590 | discard_invalid_properties=true
591 | optimise_shorthands=0
592 | css_level='CSS3.0'
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 | 675 Mass Ave, Cambridge, MA 02139, USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Library General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
--------------------------------------------------------------------------------
/csstidyphp/lang.inc.php:
--------------------------------------------------------------------------------
1 | .
22 | *
23 | * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
24 | * @package csstidy
25 | * @author Florian Schmitz (floele at gmail dot com) 2005-2007
26 | * @author Brett Zamir (brettz9 at yahoo dot com) 2007
27 | */
28 |
29 |
30 | if (isset($_GET['lang'])) {
31 | $l = $_GET['lang'];
32 | } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
33 | $l = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
34 | $l = strtolower(substr($l, 0, 2));
35 | } else {
36 | $l = '';
37 | }
38 |
39 | $l = (in_array($l, array('de', 'fr', 'zh'))) ? $l : 'en';
40 |
41 | // note 5 in all but French, and 40 in all are orphaned
42 |
43 | $lang = array();
44 | $lang['en'][0] = 'CSS Formatter and Optimiser/Optimizer (based on CSSTidy ';
45 | $lang['en'][1] = 'CSS Formatter and Optimiser';
46 | $lang['en'][2] = '(based on';
47 | $lang['en'][3] = '(plaintext)';
48 | $lang['en'][4] = 'Important Note:';
49 | $lang['en'][6] = 'Your code should be well-formed. This is not a validator which points out errors in your CSS code. To make sure that your code is valid, use the W3C Validator.';
50 | $lang['en'][7] = 'all comments are removed';
51 | $lang['en'][8] = 'CSS Input:';
52 | $lang['en'][9] = 'CSS-Code:';
53 | $lang['en'][10] = 'CSS from URL:';
54 | $lang['en'][11] = 'Code Layout:';
55 | $lang['en'][12] = 'Compression (code layout):';
56 | $lang['en'][13] = 'Highest (no readability, smallest size)';
57 | $lang['en'][14] = 'High (moderate readability, smaller size)';
58 | $lang['en'][15] = 'Standard (balance between readability and size)';
59 | $lang['en'][16] = 'Low (higher readability)';
60 | $lang['en'][17] = 'Custom (enter below)';
61 | $lang['en'][18] = 'Custom template';
62 | $lang['en'][19] = 'Options';
63 | $lang['en'][20] = 'Sort Selectors (caution)';
64 | $lang['en'][21] = 'Sort Properties';
65 | $lang['en'][22] = 'Regroup selectors';
66 | $lang['en'][23] = 'Optimise shorthands';
67 | $lang['en'][24] = 'Compress colors';
68 | $lang['en'][25] = 'Lowercase selectors';
69 | $lang['en'][26] = 'Case for properties:';
70 | $lang['en'][27] = 'Lowercase';
71 | $lang['en'][28] = 'No or invalid CSS input or wrong URL!';
72 | $lang['en'][29] = 'Uppercase';
73 | $lang['en'][30] = 'lowercase elementnames needed for XHTML';
74 | $lang['en'][31] = 'Remove unnecessary backslashes';
75 | $lang['en'][32] = 'convert !important-hack';
76 | $lang['en'][33] = 'Output as file';
77 | $lang['en'][34] = 'Bigger compression because of smaller newlines (copy & paste doesn\'t work)';
78 | $lang['en'][35] = 'Process CSS';
79 | $lang['en'][36] = 'Compression Ratio';
80 | $lang['en'][37] = 'Input';
81 | $lang['en'][38] = 'Output';
82 | $lang['en'][39] = 'Language';
83 | $lang['en'][41] = 'Attention: This may change the behaviour of your CSS Code!';
84 | $lang['en'][42] = 'Remove last ;';
85 | $lang['en'][43] = 'Discard invalid properties';
86 | $lang['en'][44] = 'Only safe optimisations';
87 | $lang['en'][45] = 'Compress font-weight';
88 | $lang['en'][46] = 'Save comments';
89 | $lang['en'][47] = 'Do not change anything';
90 | $lang['en'][48] = 'Only seperate selectors (split at ,)';
91 | $lang['en'][49] = 'Merge selectors with the same properties (fast)';
92 | $lang['en'][50] = 'Merge selectors intelligently (slow)';
93 | $lang['en'][51] = 'Preserve CSS';
94 | $lang['en'][52] = 'Save comments, hacks, etc. Most optimisations can *not* be applied if this is enabled.';
95 | $lang['en'][53] = 'None';
96 | $lang['en'][54] = 'Don\'t optimise';
97 | $lang['en'][55] = 'Safe optimisations';
98 | $lang['en'][56] = 'All optimisations';
99 | $lang['en'][57] = 'Add timestamp';
100 | $lang['en'][58] = 'Copy to clipboard';
101 | $lang['en'][59] = 'Back to top';
102 | $lang['en'][60] = 'Your browser doesn\'t support copy to clipboard.';
103 | $lang['en'][61] = 'For bugs and suggestions feel free to';
104 | $lang['en'][62] = 'contact me';
105 | $lang['en'][63] = 'Output CSS code as complete HTML document';
106 | $lang['en'][64] = 'Code';
107 | $lang['en'][65] = 'CSS to style CSS output';
108 | $lang['en'][66] = 'You need to go to about:config in your URL bar, select \'signed.applets.codebase_principal_support\' in the filter field, and set its value to true in order to use this feature; however, be aware that doing so increases security risks.';
109 |
110 |
111 | $lang['de'][0] = 'CSS Formatierer und Optimierer (basierend auf CSSTidy ';
112 | $lang['de'][1] = 'CSS Formatierer und Optimierer';
113 | $lang['de'][2] = '(basierend auf';
114 | $lang['de'][3] = '(Textversion)';
115 | $lang['de'][4] = 'Wichtiger Hinweis:';
116 | $lang['de'][6] = 'Der CSS Code sollte wohlgeformt sein. Der CSS Code wird nicht auf Gültigkeit überprüft. Um sicherzugehen dass dein Code valide ist, benutze den W3C Validierungsservice.';
117 | $lang['de'][7] = 'alle Kommentare werden entfernt';
118 | $lang['de'][8] = 'CSS Eingabe:';
119 | $lang['de'][9] = 'CSS-Code:';
120 | $lang['de'][10] = 'CSS von URL:';
121 | $lang['de'][11] = 'Code Layout:';
122 | $lang['de'][12] = 'Komprimierung (Code Layout):';
123 | $lang['de'][13] = 'Höchste (keine Lesbarkeit, niedrigste Größe)';
124 | $lang['de'][14] = 'Hoch (mittelmäßige Lesbarkeit, geringe Größe)';
125 | $lang['de'][15] = 'Standard (Kompromiss zwischen Lesbarkeit und Größe)';
126 | $lang['de'][16] = 'Niedrig (höhere Lesbarkeit)';
127 | $lang['de'][17] = 'Benutzerdefiniert (unten eingeben)';
128 | $lang['de'][18] = 'Benutzerdefinierte Vorlage';
129 | $lang['de'][19] = 'Optionen';
130 | $lang['de'][20] = 'Selektoren sortieren (Vorsicht)';
131 | $lang['de'][21] = 'Eigenschaften sortieren';
132 | $lang['de'][22] = 'Selektoren umgruppieren';
133 | $lang['de'][23] = 'Shorthands optimieren';
134 | $lang['de'][24] = 'Farben komprimieren';
135 | $lang['de'][25] = 'Selektoren in Kleinbuchstaben';
136 | $lang['de'][26] = 'Groß-/Kleinschreibung für Eigenschaften';
137 | $lang['de'][27] = 'Kleinbuchstaben';
138 | $lang['de'][28] = 'Keine oder ungültige CSS Eingabe oder falsche URL!';
139 | $lang['de'][29] = 'Großbuchstaben';
140 | $lang['de'][30] = 'kleingeschriebene Elementnamen benötigt für XHTML';
141 | $lang['de'][31] = 'Unnötige Backslashes entfernen';
142 | $lang['de'][32] = '!important-Hack konvertieren';
143 | $lang['de'][33] = 'Als Datei ausgeben';
144 | $lang['de'][34] = 'Größere Komprimierung augrund von kleineren Neuezeile-Zeichen';
145 | $lang['de'][35] = 'CSS verarbeiten';
146 | $lang['de'][36] = 'Komprimierungsrate';
147 | $lang['de'][37] = 'Eingabe';
148 | $lang['de'][38] = 'Ausgabe';
149 | $lang['de'][39] = 'Sprache';
150 | $lang['de'][41] = 'Achtung: Dies könnte das Verhalten ihres CSS-Codes verändern!';
151 | $lang['de'][42] = 'Letztes ; entfernen';
152 | $lang['de'][43] = 'Ungültige Eigenschaften entfernen';
153 | $lang['de'][44] = 'Nur sichere Optimierungen';
154 | $lang['de'][45] = 'font-weight komprimieren';
155 | $lang['de'][46] = 'Kommentare beibehalten';
156 | $lang['de'][47] = 'Nichts ändern';
157 | $lang['de'][48] = 'Selektoren nur trennen (am Komma)';
158 | $lang['de'][49] = 'Selektoren mit gleichen Eigenschaften zusammenfassen (schnell)';
159 | $lang['de'][50] = 'Selektoren intelligent zusammenfassen (langsam!)';
160 | $lang['de'][51] = 'CSS erhalten';
161 | $lang['de'][52] = 'Kommentare, Hacks, etc. speichern. Viele Optimierungen sind dann aber nicht mehr möglich.';
162 | $lang['de'][53] = 'Keine';
163 | $lang['de'][54] = 'Nicht optimieren';
164 | $lang['de'][55] = 'Sichere Optimierungen';
165 | $lang['de'][56] = 'Alle Optimierungen';
166 | $lang['de'][57] = 'Zeitstempel hinzufügen';
167 | $lang['de'][58] = 'Copy to clipboard';
168 | $lang['de'][59] = 'Back to top';
169 | $lang['de'][60] = 'Your browser doesn\'t support copy to clipboard.';
170 | $lang['de'][61] = 'For bugs and suggestions feel free to';
171 | $lang['de'][62] = 'contact me';
172 | $lang['de'][63] = 'Output CSS code as complete HTML document';
173 | $lang['de'][64] = 'Code';
174 | $lang['de'][65] = 'CSS to style CSS output';
175 | $lang['de'][66] = 'You need to go to about:config in your URL bar, select \'signed.applets.codebase_principal_support\' in the filter field, and set its value to true in order to use this feature; however, be aware that doing so increases security risks.';
176 |
177 |
178 | $lang['fr'][0] = 'CSS Formateur et Optimiseur (basé sur CSSTidy ';
179 | $lang['fr'][1] = 'CSS Formateur et Optimiseur';
180 | $lang['fr'][2] = '(basé sur ';
181 | $lang['fr'][3] = '(Version texte)';
182 | $lang['fr'][4] = 'Note Importante :';
183 | $lang['fr'][6] = 'Votre code doit être valide. Ce n’est pas un validateur qui signale les erreurs dans votre code CSS. Pour être sûr que votre code est correct, utilisez le validateur : W3C Validator.';
184 | $lang['fr'][7] = 'tous les commentaires sont enlevés';
185 | $lang['fr'][8] = 'Champ CSS :';
186 | $lang['fr'][9] = 'Code CSS :';
187 | $lang['fr'][10] = 'CSS en provenance d’une URL :