├── README ├── csstidy ├── COPYING ├── Docs │ ├── __filesource │ │ ├── fsource_csstidy__class.csstidy.php.html │ │ ├── fsource_csstidy__class.csstidy_optimise.php.html │ │ ├── fsource_csstidy__class.csstidy_print.php.html │ │ └── fsource_csstidy__data.inc.php.html │ ├── classtrees_csstidy.html │ ├── csstidy │ │ ├── _class_csstidy_optimise_php.html │ │ ├── _class_csstidy_php.html │ │ ├── _class_csstidy_print_php.html │ │ ├── _data_inc_php.html │ │ ├── csstidy.html │ │ ├── csstidy_optimise.html │ │ └── csstidy_print.html │ ├── elementindex.html │ ├── elementindex_csstidy.html │ ├── errors.html │ ├── index.html │ ├── li_csstidy.html │ ├── media │ │ ├── background.png │ │ ├── empty.png │ │ └── style.css │ └── todolist.html ├── NEWS ├── README ├── class.csstidy.php ├── class.csstidy_ctype.php ├── class.csstidy_optimise.php ├── class.csstidy_print.php ├── css_optimiser.php ├── cssparse.css ├── cssparsed.css ├── data.inc.php ├── lang.inc.php ├── template.tpl ├── template1.tpl ├── template2.tpl ├── template3.tpl └── testing │ ├── unit-tests.inc │ ├── unit-tests.php │ └── unit-tests │ ├── _files.php │ ├── class.Text_Diff_Renderer_parallel.php │ ├── class.csstidy_csst.php │ ├── class.csstidy_harness.php │ ├── class.csstidy_reporter.php │ ├── csst │ ├── README │ ├── properties │ │ ├── css1.csst │ │ ├── css2.csst │ │ └── css21.csst │ ├── selectors │ │ ├── active.csst │ │ ├── adjacent.csst │ │ ├── attribute-begins.csst │ │ ├── attribute-contains.csst │ │ ├── attribute-equals.csst │ │ ├── attribute-set.csst │ │ ├── chain.csst │ │ ├── child.csst │ │ ├── class.csst │ │ ├── combinator-compressed.csst │ │ ├── descendant.csst │ │ ├── errors │ │ │ ├── dangling-combinator.csst │ │ │ └── duplicate-combinator.csst │ │ ├── first-child.csst │ │ ├── focus.csst │ │ ├── grouping.csst │ │ ├── hover.csst │ │ ├── id.csst │ │ ├── lang.csst │ │ ├── link.csst │ │ ├── merge-optimization.csst │ │ ├── merge-preserve.csst │ │ ├── pseudo-elements.csst │ │ ├── simple.csst │ │ ├── type.csst │ │ ├── universal-optimization.csst │ │ ├── universal-shorthand.csst │ │ ├── universal.csst │ │ └── visited.csst │ ├── shorthands │ │ ├── background-general.csst │ │ ├── background-noopt.csst │ │ ├── font-face.csst │ │ ├── font-general.csst │ │ ├── font-noopt.csst │ │ ├── font-weight-general.csst │ │ ├── font-weight-noopt.csst │ │ ├── margin-general.csst │ │ ├── margin-noopt.csst │ │ ├── padding-general.csst │ │ └── padding-noopt.csst │ ├── special │ │ ├── cursor.csst │ │ └── font-face.csst │ └── values │ │ ├── colors.csst │ │ ├── font-family.csst │ │ ├── important.csst │ │ ├── number-float.csst │ │ ├── number-leadingzero.csst │ │ ├── number-missingunit.csst │ │ ├── number-missingzero.csst │ │ ├── number-signed.csst │ │ ├── number-trailingzero.csst │ │ └── number-zero.csst │ └── test.csst.php ├── index.php ├── schepp.jpg └── test.css /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Schepp/CSS-Prefix-Spawner/921866e469c68eceb4f8edc1ad1c0e84dc6a68a8/README -------------------------------------------------------------------------------- /csstidy/COPYING: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | 3 | Version 2.1, February 1999 4 | 5 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 6 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 7 | Everyone is permitted to copy and distribute verbatim copies 8 | of this license document, but changing it is not allowed. 9 | 10 | [This is the first released version of the Lesser GPL. It also counts 11 | as the successor of the GNU Library Public License, version 2, hence 12 | the version number 2.1.] 13 | 14 | Preamble 15 | 16 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 17 | 18 | This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 19 | 20 | When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 21 | 22 | To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 23 | 24 | For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 25 | 26 | We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 27 | 28 | To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 29 | 30 | Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 31 | 32 | Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 33 | 34 | When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 35 | 36 | We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 37 | 38 | For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 39 | 40 | In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 41 | 42 | Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 43 | 44 | The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. 45 | 46 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 47 | 48 | 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 49 | 50 | A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 51 | 52 | The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 53 | 54 | "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 55 | 56 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 57 | 58 | 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 59 | 60 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 61 | 62 | 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 63 | 64 | * a) The modified work must itself be a software library. 65 | * b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 66 | * c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 67 | * d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 68 | 69 | (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 70 | 71 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 72 | 73 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 74 | 75 | In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 76 | 77 | 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. 78 | 79 | Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 80 | 81 | This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 82 | 83 | 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 84 | 85 | If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 86 | 87 | 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 88 | 89 | However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 90 | 91 | When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 92 | 93 | If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 94 | 95 | Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 96 | 97 | 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 98 | 99 | You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 100 | 101 | * a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) 102 | * b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. 103 | * c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. 104 | * d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. 105 | * e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. 106 | 107 | For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 108 | 109 | It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 110 | 111 | 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 112 | 113 | * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. 114 | * b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 115 | 116 | 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 117 | 118 | 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 119 | 120 | 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 121 | 122 | 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. 123 | 124 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 125 | 126 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 127 | 128 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 129 | 130 | 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 131 | 132 | 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 133 | 134 | Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 135 | 136 | 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 137 | 138 | NO WARRANTY 139 | 140 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 141 | 142 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 143 | 144 | END OF TERMS AND CONDITIONS 145 | How to Apply These Terms to Your New Libraries 146 | 147 | If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). 148 | 149 | To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. 150 | 151 | one line to give the library's name and an idea of what it does. 152 | Copyright (C) year name of author 153 | 154 | This library is free software; you can redistribute it and/or 155 | modify it under the terms of the GNU Lesser General Public 156 | License as published by the Free Software Foundation; either 157 | version 2.1 of the License, or (at your option) any later version. 158 | 159 | This library is distributed in the hope that it will be useful, 160 | but WITHOUT ANY WARRANTY; without even the implied warranty of 161 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 162 | Lesser General Public License for more details. 163 | 164 | You should have received a copy of the GNU Lesser General Public 165 | License along with this library; if not, write to the Free Software 166 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 167 | 168 | Also add information on how to contact you by electronic and paper mail. 169 | 170 | You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: 171 | 172 | Yoyodyne, Inc., hereby disclaims all copyright interest in 173 | the library `Frob' (a library for tweaking knobs) written 174 | by James Random Hacker. 175 | 176 | signature of Ty Coon, 1 April 1990 177 | Ty Coon, President of Vice 178 | -------------------------------------------------------------------------------- /csstidy/Docs/classtrees_csstidy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Class Trees for Package csstidy 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 33 | 58 | 59 |
34 |
35 | 36 |

Class Trees for Package csstidy

37 |
38 |
Root class csstidy

39 | 41 | 42 |
43 |
Root class csstidy_optimise

44 | 46 | 47 |
48 |
Root class csstidy_print

49 | 51 | 52 |
53 |
54 | Documentation generated on Mon, 15 May 2006 22:54:54 +0200 by phpDocumentor 1.3.0RC3 55 |
56 |
57 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /csstidy/Docs/csstidy/_class_csstidy_optimise_php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Docs for page class.csstidy_optimise.php 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 93 | 94 |
52 |
53 | 54 |

Procedural File: class.csstidy_optimise.php

55 | Source Location: /class.csstidy_optimise.php

56 | 57 |
58 |
59 | 60 |
61 |

Classes:

62 |
csstidy_optimise
63 |
CSS Optimising Class
64 |


65 | 66 |

Page Details:

67 | CSSTidy - CSS Parser and Optimiser

CSS Optimising Class This class optimises CSS data generated by csstidy.

This file is part of CSSTidy.

CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CSSTidy; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA




68 |

Tags:

69 |
70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
filesource:  Source Code for this file
author:  Florian Schmitz (floele at gmail dot com) 2005-2006
license:  GNU Public License
81 |
82 |

83 |

84 |

85 |
86 | 87 |
88 |
89 | Documentation generated on Mon, 15 May 2006 22:55:16 +0200 by phpDocumentor 1.3.0RC3 90 |
91 |
92 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /csstidy/Docs/csstidy/_class_csstidy_php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Docs for page class.csstidy.php 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 126 | 127 |
52 |
53 | 54 |

Procedural File: class.csstidy.php

55 | Source Location: /class.csstidy.php

56 | 57 |
58 |
59 | 60 |
61 |

Classes:

62 |
csstidy
63 |
CSS Parser class
64 |


65 | 66 |

Page Details:

67 | CSSTidy - CSS Parser and Optimiser

CSS Parser class

This file is part of CSSTidy.

CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CSSTidy; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA




68 |

Tags:

69 |
70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
filesource:  Source Code for this file
author:  Florian Schmitz (floele at gmail dot com) 2005-2006
license:  GNU Public License
81 |
82 |

83 |

Includes:

84 |
85 | require('data.inc.php') [line 33]
86 | Various CSS data needed for correct optimisations etc.



87 |

Tags:

88 |
89 | 90 | 91 | 92 | 93 |
version:  1.2
94 |
95 | require('class.csstidy_print.php') [line 40]
96 | Contains a class for printing CSS code



97 |

Tags:

98 |
99 | 100 | 101 | 102 | 103 |
version:  1.0
104 |
105 | require('class.csstidy_optimise.php') [line 47]
106 | Contains a class for optimising CSS code



107 |

Tags:

108 |
109 | 110 | 111 | 112 | 113 |
version:  1.0
114 |
115 |
116 |

117 |

118 |
119 | 120 |
121 |
122 | Documentation generated on Mon, 15 May 2006 22:54:54 +0200 by phpDocumentor 1.3.0RC3 123 |
124 |
125 |
128 | 129 | 130 | -------------------------------------------------------------------------------- /csstidy/Docs/csstidy/_class_csstidy_print_php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Docs for page class.csstidy_print.php 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 93 | 94 |
52 |
53 | 54 |

Procedural File: class.csstidy_print.php

55 | Source Location: /class.csstidy_print.php

56 | 57 |
58 |
59 | 60 |
61 |

Classes:

62 |
csstidy_print
63 |
CSS Printing class
64 |


65 | 66 |

Page Details:

67 | CSSTidy - CSS Parser and Optimiser

CSS Printing class This class prints CSS data generated by csstidy.

This file is part of CSSTidy.

CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CSSTidy; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA




68 |

Tags:

69 |
70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
filesource:  Source Code for this file
author:  Florian Schmitz (floele at gmail dot com) 2005-2006
license:  GNU Public License
81 |
82 |

83 |

84 |

85 |
86 | 87 |
88 |
89 | Documentation generated on Mon, 15 May 2006 22:55:35 +0200 by phpDocumentor 1.3.0RC3 90 |
91 |
92 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /csstidy/Docs/csstidy/_data_inc_php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Docs for page data.inc.php 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 479 | 480 |
52 |
53 | 54 |

Procedural File: data.inc.php

55 | Source Location: /data.inc.php

56 | 57 |
58 |
59 | 60 | 61 |

Page Details:

62 | Various CSS Data for CSSTidy

This file is part of CSSTidy.

CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CSSTidy; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA




63 |

Tags:

64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
filesource:  Source Code for this file
author:  Florian Schmitz (floele at gmail dot com) 2005
license:  GNU Public License
76 |
77 |

78 |

79 |
80 | 81 |

array $GLOBALS['csstidy']['all_properties'] [line 277]

82 |
83 | All CSS Properties. Needed for csstidy::property_is_next()



84 |

Tags:

85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
see:  csstidy::property_is_next()
version:  1.0
todo:  Add CSS3 properties
97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 |
Default value:  array()
105 |


106 |
[ Top ]


107 |
108 | 109 |

array $GLOBALS['csstidy']['at_rules'] [line 66]

110 |
111 | Available at-rules



112 |

Tags:

113 |
114 | 115 | 116 | 117 | 118 |
version:  1.0
119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 |
Default value:  array('page' => 'is','font-face' => 'is','charset' => 'iv', 'import' => 'iv','namespace' => 'iv','media' => 'at')
127 |


128 |
[ Top ]


129 |
130 | 131 |

array $GLOBALS['csstidy']['background_prop_default'] [line 106]

132 |
133 | Default values for the background properties



134 |

Tags:

135 |
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 |
version:  1.0
see:  merge_bg()
see:  dissolve_short_bg()
todo:  Possibly property names will change during CSS3 development
150 |
151 | 152 | 153 | 154 | 155 | 156 | 157 |
Default value:  array()
158 |


159 |
[ Top ]


160 |
161 | 162 |

array $GLOBALS['csstidy']['color_values'] [line 86]

163 |
164 | Properties that allow <color> as value



165 |

Tags:

166 |
167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 |
version:  1.0
see:  compress_numbers();
todo:  CSS3 properties
178 |
179 | 180 | 181 | 182 | 183 | 184 | 185 |
Default value:  array()
186 |


187 |
[ Top ]


188 |
189 | 190 |

array $GLOBALS['csstidy']['number_values'] [line 76]

191 |
192 | Properties that allow <number> as value



193 |

Tags:

194 |
195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 |
version:  1.2
see:  compress_numbers();
todo:  CSS3 properties
206 |
207 | 208 | 209 | 210 | 211 | 212 | 213 |
Default value:  array('line-height','pitch-range','richness','speech-rate','stress','volume','font','font-weight','z-index','counter-increment','counter-reset','orphans','widows')
214 |


215 |
[ Top ]


216 |
217 | 218 |

array $GLOBALS['csstidy']['predefined_templates'] [line 409]

219 |
220 | An array containing all predefined templates.



221 |

Tags:

222 |
223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 |
see:  csstidy::load_template()
version:  1.0
231 |
232 | 233 | 234 | 235 | 236 | 237 | 238 |
Default value:  '<span class="at">'
239 |


240 |
[ Top ]


241 |
242 | 243 |

array $GLOBALS['csstidy']['replace_colors'] [line 123]

244 |
245 | A list of non-W3C color names which get replaced by their hex-codes



246 |

Tags:

247 |
248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 |
version:  1.0
see:  cut_color()
256 |
257 | 258 | 259 | 260 | 261 | 262 | 263 |
Default value:  array()
264 |


265 |
[ Top ]


266 |
267 | 268 |

array $GLOBALS['csstidy']['shorthands'] [line 261]

269 |
270 | A list of all shorthand properties that are devided into four properties and/or have four subvalues



271 |

Tags:

272 |
273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 |
version:  1.0
see:  merge_4value_shorthands()
see:  dissolve_4value_shorthands()
todo:  Are there new ones in CSS3?
287 |
288 | 289 | 290 | 291 | 292 | 293 | 294 |
Default value:  array()
295 |


296 |
[ Top ]


297 |
298 | 299 |

string $GLOBALS['csstidy']['tokens'] [line 49]

300 |
301 | All CSS tokens used by csstidy



302 |

Tags:

303 |
304 | 305 | 306 | 307 | 308 |
version:  1.0
309 |
310 | 311 | 312 | 313 | 314 | 315 | 316 |
Default value:  '/@}{;:=\'"(,\\!$%&)*+.<>?[]^`|~'
317 |


318 |
[ Top ]


319 |
320 | 321 |

array $GLOBALS['csstidy']['units'] [line 58]

322 |
323 | All CSS units (CSS 3 units included)



324 |

Tags:

325 |
326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 |
version:  1.0
see:  compress_numbers()
334 |
335 | 336 | 337 | 338 | 339 | 340 | 341 |
Default value:  array('in','cm','mm','pt','pc','px','rem','em','%','ex','gd','vw','vh','vm','deg','grad','rad','ms','s','khz','hz')
342 |


343 |
[ Top ]


344 |
345 | 346 |

array $GLOBALS['csstidy']['whitespace'] [line 41]

347 |
348 | All whitespace allowed in CSS



349 |

Tags:

350 |
351 | 352 | 353 | 354 | 355 |
version:  1.0
356 |
357 | 358 | 359 | 360 | 361 | 362 | 363 |
Default value:  array(' ',"\n","\t","\r","\x0B")
364 |


365 |
[ Top ]


366 |

367 |
368 | 369 |

AT_END [line 27]

370 |
371 |
372 |
373 | AT_END = 2 374 |
375 |
376 | 377 |
378 |
379 |
[ Top ]


380 |
381 | 382 |

AT_START [line 26]

383 |
384 |
385 |
386 | AT_START = 1 387 |
388 |
389 | 390 |
391 |
392 |
[ Top ]


393 |
394 | 395 |

COMMENT [line 32]

396 |
397 |
398 |
399 | COMMENT = 7 400 |
401 |
402 | 403 |
404 |
405 |
[ Top ]


406 |
407 | 408 |

DEFAULT_AT [line 33]

409 |
410 |
411 |
412 | DEFAULT_AT = 41 413 |
414 |
415 | 416 |
417 |
418 |
[ Top ]


419 |
420 | 421 |

PROPERTY [line 30]

422 |
423 |
424 |
425 | PROPERTY = 5 426 |
427 |
428 | 429 |
430 |
431 |
[ Top ]


432 |
433 | 434 |

SEL_END [line 29]

435 |
436 |
437 |
438 | SEL_END = 4 439 |
440 |
441 | 442 |
443 |
444 |
[ Top ]


445 |
446 | 447 |

SEL_START [line 28]

448 |
449 |
450 |
451 | SEL_START = 3 452 |
453 |
454 | 455 |
456 |
457 |
[ Top ]


458 |
459 | 460 |

VALUE [line 31]

461 |
462 |
463 |
464 | VALUE = 6 465 |
466 |
467 | 468 |
469 |
470 |
[ Top ]


471 |
472 | 473 |
474 |
475 | Documentation generated on Mon, 15 May 2006 22:55:43 +0200 by phpDocumentor 1.3.0RC3 476 |
477 |
478 |
481 | 482 | 483 | -------------------------------------------------------------------------------- /csstidy/Docs/csstidy/csstidy_print.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Docs For Class csstidy_print 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 613 | 614 |
52 |
53 | 54 |

Class: csstidy_print

55 | Source Location: /class.csstidy_print.php

56 | 57 | 58 | 59 | 81 | 82 | 90 | 91 | 92 | 108 | 109 |
60 | 61 |

Class Overview

62 |

63 |
CSS Printing class


64 |

Author(s):

65 |
    66 |
  • Florian Schmitz (floele at gmail dot com) 2005-2006
  • 67 |
68 | 69 | 70 | 71 | 72 | 73 | 74 |

Version:

75 |
    76 |
  • 1.0
  • 77 |
78 | 79 | 80 |
83 |

Variables

84 | 89 |
93 |

Methods

94 | 107 |
110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
120 |
121 | 122 | 123 |

Class Details

124 |
125 | [line 39]
126 | CSS Printing class

This class prints CSS data generated by csstidy.




127 |

Tags:

128 |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 |
version:  1.0
author:  Florian Schmitz (floele at gmail dot com) 2005-2006
137 |
138 |


139 |
[ Top ]

140 | 141 |
142 | 143 |

Class Variables

144 |
145 | 146 |

147 |

$input_css =  ''

148 |

[line 46]

149 | Saves the input CSS string



150 |

Tags:

151 |
152 | 153 | 154 | 155 | 156 |
access:  private
157 |
158 | 159 |
160 |
161 | 162 | 163 | 164 | 165 | 166 |
Type:  string
167 |


168 |
[ Top ]

169 | 170 |

171 |

$output_css =  ''

172 |

[line 53]

173 | Saves the formatted CSS string



174 |

Tags:

175 |
176 | 177 | 178 | 179 | 180 |
access:  public
181 |
182 | 183 |
184 |
185 | 186 | 187 | 188 | 189 | 190 |
Type:  string
191 |


192 |
[ Top ]

193 | 194 |

195 |

$output_css_plain =  ''

196 |

[line 60]

197 | Saves the formatted CSS string (plain text)



198 |

Tags:

199 |
200 | 201 | 202 | 203 | 204 |
access:  public
205 |
206 | 207 |
208 |
209 | 210 | 211 | 212 | 213 | 214 |
Type:  string
215 |


216 |
[ Top ]

217 |

218 | 219 |
220 | 221 |

Class Methods

222 |
223 |
224 | 225 |

constructor csstidy_print [line 68]

226 |
227 |
228 |
229 | csstidy_print csstidy_print( 230 | array 231 | &$css) 232 |
233 |

234 | 235 | Constructor



236 |

Tags:

237 |
238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 |
version:  1.0
access:  private
246 |
247 |

248 | 249 | 250 |

Parameters:

251 |
252 | 253 | 254 | 255 | 256 | 257 | 258 |
array  $css  contains the class csstidy
259 |

260 |
[ Top ]
261 |
262 |
263 | 264 |

method formatted [line 108]

265 |
266 |
267 |
268 | string formatted( 269 | ) 270 |
271 |

272 | 273 | Returns the formatted CSS code



274 |

Tags:

275 |
276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 |
version:  1.0
access:  public
284 |
285 |

286 | 287 | 288 |
[ Top ]
289 |
290 |
291 | 292 |

method get_diff [line 313]

293 |
294 |
295 |
296 | string get_diff( 297 | ) 298 |
299 |

300 | 301 | Get difference between the old and new code in bytes and prints the code if necessary.



302 |

Tags:

303 |
304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 |
version:  1.1
access:  public
312 |
313 |

314 | 315 | 316 |
[ Top ]
317 |
318 |
319 | 320 |

method get_ratio [line 299]

321 |
322 |
323 |
324 | float get_ratio( 325 | ) 326 |
327 |

328 | 329 | Get compression ratio



330 |

Tags:

331 |
332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 |
version:  1.2
access:  public
340 |
341 |

342 | 343 | 344 |
[ Top ]
345 |
346 |
347 | 348 |

method plain [line 96]

349 |
350 |
351 |
352 | string plain( 353 | ) 354 |
355 |

356 | 357 | Returns the CSS code as plain text



358 |

Tags:

359 |
360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 |
version:  1.0
access:  public
368 |
369 |

370 | 371 | 372 |
[ Top ]
373 |
374 |
375 | 376 |

method size [line 337]

377 |
378 |
379 |
380 | integer size( 381 | [string 382 | $loc = 'output']) 383 |
384 |

385 | 386 | Get the size of either input or output CSS in KB



387 |

Tags:

388 |
389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 |
version:  1.0
access:  public
397 |
398 |

399 | 400 | 401 |

Parameters:

402 |
403 | 404 | 405 | 406 | 407 | 408 | 409 |
string  $loc  default is "output"
410 |

411 |
[ Top ]
412 |
413 |
414 | 415 |

method _convert_raw_css [line 244]

416 |
417 |
418 |
419 | void _convert_raw_css( 420 | ) 421 |
422 |

423 | 424 | Converts $this->css array to a raw array ($this->tokens)



425 |

Tags:

426 |
427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 |
version:  1.0
access:  private
435 |
436 |

437 | 438 | 439 |
[ Top ]
440 |
441 |
442 | 443 |

method _htmlsp [line 285]

444 |
445 |
446 |
447 | string _htmlsp( 448 | string 449 | $string, bool 450 | $plain) 451 |
452 |

453 | 454 | Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.



455 |

Tags:

456 |
457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 |
version:  1.0
access:  private
see:  csstidy_print::_print()
468 |
469 |

470 | 471 | 472 |

Parameters:

473 |
474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 |
string  $string  
bool  $plain  
486 |

487 |
[ Top ]
488 |
489 |
490 | 491 |

method _print [line 120]

492 |
493 |
494 |
495 | void _print( 496 | [bool 497 | $plain = false]) 498 |
499 |

500 | 501 | Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain



502 |

Tags:

503 |
504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 |
version:  2.0
access:  private
512 |
513 |

514 | 515 | 516 |

Parameters:

517 |
518 | 519 | 520 | 521 | 522 | 523 | 524 |
bool  $plain  plain text or not
525 |

526 |
[ Top ]
527 |
528 |
529 | 530 |

method _reset [line 84]

531 |
532 |
533 |
534 | void _reset( 535 | ) 536 |
537 |

538 | 539 | Resets output_css and output_css_plain (new css code)



540 |

Tags:

541 |
542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 |
version:  1.0
access:  private
550 |
551 |

552 | 553 | 554 |
[ Top ]
555 |
556 |
557 | 558 |

method _seeknocomment [line 225]

559 |
560 |
561 |
562 | mixed _seeknocomment( 563 | integer 564 | $key, integer 565 | $move) 566 |
567 |

568 | 569 | Gets the next token type which is $move away from $key, excluding comments



570 |

Tags:

571 |
572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 |
return:  a token type
version:  1.0
access:  private
583 |
584 |

585 | 586 | 587 |

Parameters:

588 |
589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 |
integer  $key  current position
integer  $move  move this far
601 |

602 |
[ Top ]
603 |
604 |

605 | 606 | 607 |
608 |
609 | Documentation generated on Mon, 15 May 2006 22:55:42 +0200 by phpDocumentor 1.3.0RC3 610 |
611 |
612 |
615 | 616 | 617 | -------------------------------------------------------------------------------- /csstidy/Docs/errors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | phpDocumentor Parser Errors and Warnings 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 33 | 47 | 48 |
34 |
35 | 36 | Post-parsing
37 | 38 |

data.inc.php

39 |

Warnings:


40 | Warning on line 25 - Page-level DocBlock precedes "define AT_START", use another DocBlock to document the source element
41 |
42 |
43 | Documentation generated on Mon, 15 May 2006 22:56:01 +0200 by phpDocumentor 1.3.0RC3 44 |
45 |
46 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /csstidy/Docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSSTidy Documentation 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 64 | 65 |
52 |
53 | 54 |

CSSTidy Documentation

55 | Welcome to csstidy!
56 |
57 | This documentation was generated by phpDocumentor v1.3.0RC3
58 |
59 |
60 | Documentation generated on Mon, 15 May 2006 22:54:54 +0200 by phpDocumentor 1.3.0RC3 61 |
62 |
63 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /csstidy/Docs/li_csstidy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSSTidy Documentation 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 51 | 64 | 65 |
52 |
53 | 54 |

CSSTidy Documentation

55 | Welcome to csstidy!
56 |
57 | This documentation was generated by phpDocumentor v1.3.0RC3
58 |
59 |
60 | Documentation generated on Mon, 15 May 2006 22:54:53 +0200 by phpDocumentor 1.3.0RC3 61 |
62 |
63 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /csstidy/Docs/media/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Schepp/CSS-Prefix-Spawner/921866e469c68eceb4f8edc1ad1c0e84dc6a68a8/csstidy/Docs/media/background.png -------------------------------------------------------------------------------- /csstidy/Docs/media/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Schepp/CSS-Prefix-Spawner/921866e469c68eceb4f8edc1ad1c0e84dc6a68a8/csstidy/Docs/media/empty.png -------------------------------------------------------------------------------- /csstidy/Docs/media/style.css: -------------------------------------------------------------------------------- 1 | .php { 2 | padding: 1em; 3 | } 4 | /* This will not be executed by IE, so now we have a fix! */ 5 | *[class="php-src"], *[class="php"], *[class="listing"] { 6 | line-height: 0px; 7 | } 8 | 9 | body 10 | { 11 | color: #000000; 12 | background-color: #ffffff; 13 | background-image: url("background.png"); 14 | background-repeat: repeat-y; 15 | font-family: tahoma, verdana, arial, sans-serif; 16 | font-size: 10pt; 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | a 22 | { 23 | color: #000099; 24 | background-color: transparent; 25 | text-decoration: none; 26 | } 27 | 28 | a:hover 29 | { 30 | text-decoration: underline; 31 | } 32 | 33 | a.menu 34 | { 35 | color: #ffffff; 36 | background-color: transparent; 37 | } 38 | 39 | td 40 | { 41 | font-size: 10pt; 42 | } 43 | 44 | td.header_top 45 | { 46 | color: #ffffff; 47 | background-color: #9999cc; 48 | font-size: 16pt; 49 | font-weight: bold; 50 | text-align: right; 51 | padding: 10px; 52 | } 53 | 54 | td.header_line 55 | { 56 | color: #ffffff; 57 | background-color: #333366; 58 | } 59 | 60 | td.header_menu 61 | { 62 | color: #ffffff; 63 | background-color: #666699; 64 | font-size: 8pt; 65 | text-align: right; 66 | padding: 2px; 67 | padding-right: 5px; 68 | } 69 | 70 | td.menu 71 | { 72 | padding: 2px; 73 | padding-left: 5px; 74 | } 75 | 76 | td.code_border 77 | { 78 | color: #000000; 79 | background-color: #c0c0c0; 80 | } 81 | 82 | td.code 83 | { 84 | color: #000000; 85 | background-color: #f0f0f0; 86 | } 87 | 88 | td.type 89 | { 90 | font-style: italic; 91 | } 92 | 93 | div.credit 94 | { 95 | font-size: 8pt; 96 | text-align: center; 97 | } 98 | 99 | div.package 100 | { 101 | padding-left: 5px; 102 | } 103 | 104 | div.tags 105 | { 106 | padding-left: 15px; 107 | } 108 | 109 | div.function 110 | { 111 | padding-left: 15px; 112 | } 113 | 114 | div.top 115 | { 116 | font-size: 8pt; 117 | } 118 | 119 | div.warning 120 | { 121 | color: #ff0000; 122 | background-color: transparent; 123 | } 124 | 125 | div.description 126 | { 127 | padding-left: 15px; 128 | } 129 | 130 | hr 131 | { 132 | height: 1px; 133 | border-style: solid; 134 | border-color: #c0c0c0; 135 | margin-top: 10px; 136 | margin-bottom: 10px; 137 | } 138 | 139 | span.smalllinenumber 140 | { 141 | font-size: 8pt; 142 | } 143 | 144 | ul { 145 | margin-left: 0px; 146 | padding-left: 8px; 147 | } 148 | /* Syntax highlighting */ 149 | 150 | .src-code { background-color: #f5f5f5; border: 1px solid #ccc9a4; padding: 0px; margin : 0px} 151 | /*.src-code pre { }*/ 152 | 153 | .src-comm { color: green; } 154 | .src-id { } 155 | .src-inc { color: #0000FF; } 156 | .src-key { color: #0000FF; } 157 | .src-num { color: #CC0000; } 158 | .src-str { color: #66cccc; } 159 | .src-sym { font-weight: bold; } 160 | .src-var { } 161 | 162 | .src-php { font-weight: bold; } 163 | 164 | .src-doc { color: #009999 } 165 | .src-doc-close-template { color: #0000FF } 166 | .src-doc-coretag { color: #0099FF; font-weight: bold } 167 | .src-doc-inlinetag { color: #0099FF } 168 | .src-doc-internal { color: #6699cc } 169 | .src-doc-tag { color: #0080CC } 170 | .src-doc-template { color: #0000FF } 171 | .src-doc-type { font-style: italic } 172 | .src-doc-var { font-style: italic } 173 | 174 | .tute-tag { color: #009999 } 175 | .tute-attribute-name { color: #0000FF } 176 | .tute-attribute-value { color: #0099FF } 177 | .tute-entity { font-weight: bold; } 178 | .tute-comment { font-style: italic } 179 | .tute-inline-tag { color: #636311; font-weight: bold } 180 | 181 | /* tutorial */ 182 | 183 | .authors { } 184 | .author { font-style: italic; font-weight: bold } 185 | .author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } 186 | .example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } 187 | .listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } 188 | .release-info { font-size: 85%; font-style: italic; margin: 1em 0em } 189 | .ref-title-box { } 190 | .ref-title { } 191 | .ref-purpose { font-style: italic; color: #666666 } 192 | .ref-synopsis { } 193 | .title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #9999CC } 194 | .cmd-synopsis { margin: 1em 0em } 195 | .cmd-title { font-weight: bold } 196 | .toc { margin-left: 2em; padding-left: 0em } 197 | 198 | -------------------------------------------------------------------------------- /csstidy/Docs/todolist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Todo List 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
csstidy
15 | [ class tree: csstidy ] 16 | [ index: csstidy ] 17 | [ all elements ] 18 |
22 | 23 | 24 | 25 | 34 | 73 | 74 |
35 |
36 | 37 |

Todo List

38 |

csstidy

39 |

$GLOBALS['csstidy']['all_properties']

40 |
    41 |
  • Add CSS3 properties
  • 42 |
43 |

$GLOBALS['csstidy']['background_prop_default']

44 |
    45 |
  • Possibly property names will change during CSS3 development
  • 46 |
47 |

$GLOBALS['csstidy']['color_values']

48 |
    49 |
  • CSS3 properties
  • 50 |
51 |

$GLOBALS['csstidy']['number_values']

52 |
    53 |
  • CSS3 properties
  • 54 |
55 |

$GLOBALS['csstidy']['shorthands']

56 |
    57 |
  • Are there new ones in CSS3?
  • 58 |
59 |

csstidy_optimise::dissolve_short_bg()

60 |
    61 |
  • full CSS 3 compliance
  • 62 |
63 |

csstidy_optimise::merge_bg()

64 |
    65 |
  • full CSS 3 compliance
  • 66 |
67 |
68 |
69 | Documentation generated on Mon, 15 May 2006 22:56:01 +0200 by phpDocumentor 1.3.0RC3 70 |
71 |
72 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /csstidy/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) -------------------------------------------------------------------------------- /csstidy/README: -------------------------------------------------------------------------------- 1 | CSSTidy 2 | 3 | Changelog: http://csstidy.svn.sourceforge.net/viewvc/csstidy/trunk/ 4 | 5 | css_optimiser.php is the web-interface, css_parser.php contains the PHP class (CSSTidy). 6 | 7 | This class represents a CSS parser which reads CSS code and saves it in an array. 8 | In opposite to most other CSS parsers, it does not use regular expressions and 9 | thus has full CSS2 support and a higher reliability. The downside of not using regular expressions 10 | is a lower speed though. 11 | Additional to that it applies some optimisations and fixes to the CSS code. 12 | An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php 13 | 14 | 15 | Copyright 2005, 2006, 2007 Florian Schmitz 16 | 17 | CSSTidy is free software; you can redistribute it and/or modify 18 | it under the terms of the GNU Lesser General Public License as published by 19 | the Free Software Foundation; either version 2.1 of the License, or 20 | (at your option) any later version. 21 | 22 | CSSTidy is distributed in the hope that it will be useful, 23 | but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | GNU Lesser General Public License for more details. 26 | 27 | You should have received a copy of the GNU Lesser General Public License 28 | along with this program. If not, see . -------------------------------------------------------------------------------- /csstidy/class.csstidy_ctype.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /csstidy/class.csstidy_print.php: -------------------------------------------------------------------------------- 1 | . 24 | * 25 | * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License 26 | * @package csstidy 27 | * @author Florian Schmitz (floele at gmail dot com) 2005-2007 28 | * @author Brett Zamir (brettz9 at yahoo dot com) 2007 29 | */ 30 | 31 | /** 32 | * CSS Printing class 33 | * 34 | * This class prints CSS data generated by csstidy. 35 | * 36 | * @package csstidy 37 | * @author Florian Schmitz (floele at gmail dot com) 2005-2006 38 | * @version 1.0 39 | */ 40 | 41 | class csstidy_print 42 | { 43 | /** 44 | * Saves the input CSS string 45 | * @var string 46 | * @access private 47 | */ 48 | var $input_css = ''; 49 | 50 | /** 51 | * Saves the formatted CSS string 52 | * @var string 53 | * @access public 54 | */ 55 | var $output_css = ''; 56 | 57 | /** 58 | * Saves the formatted CSS string (plain text) 59 | * @var string 60 | * @access public 61 | */ 62 | var $output_css_plain = ''; 63 | 64 | /** 65 | * Constructor 66 | * @param array $css contains the class csstidy 67 | * @access private 68 | * @version 1.0 69 | */ 70 | function csstidy_print(&$css) 71 | { 72 | $this->parser =& $css; 73 | $this->css =& $css->css; 74 | $this->template =& $css->template; 75 | $this->tokens =& $css->tokens; 76 | $this->charset =& $css->charset; 77 | $this->import =& $css->import; 78 | $this->namespace =& $css->namespace; 79 | } 80 | 81 | /** 82 | * Resets output_css and output_css_plain (new css code) 83 | * @access private 84 | * @version 1.0 85 | */ 86 | function _reset() 87 | { 88 | $this->output_css = ''; 89 | $this->output_css_plain = ''; 90 | } 91 | 92 | /** 93 | * Returns the CSS code as plain text 94 | * @return string 95 | * @access public 96 | * @version 1.0 97 | */ 98 | function plain() 99 | { 100 | $this->_print(true); 101 | return $this->output_css_plain; 102 | } 103 | 104 | /** 105 | * Returns the formatted CSS code 106 | * @return string 107 | * @access public 108 | * @version 1.0 109 | */ 110 | function formatted() 111 | { 112 | $this->_print(false); 113 | return $this->output_css; 114 | } 115 | 116 | /** 117 | * Returns the formatted CSS code to make a complete webpage 118 | * @param string $doctype shorthand for the document type 119 | * @param bool $externalcss indicates whether styles to be attached internally or as an external stylesheet 120 | * @param string $title title to be added in the head of the document 121 | * @param string $lang two-letter language code to be added to the output 122 | * @return string 123 | * @access public 124 | * @version 1.4 125 | */ 126 | function formatted_page($doctype='xhtml1.1', $externalcss=true, $title='', $lang='en') 127 | { 128 | switch ($doctype) { 129 | case 'xhtml1.0strict': 130 | $doctype_output = ''; 132 | break; 133 | case 'xhtml1.1': 134 | default: 135 | $doctype_output = ''; 137 | break; 138 | } 139 | 140 | $output = $cssparsed = ''; 141 | $this->output_css_plain =& $output; 142 | 143 | $output .= $doctype_output."\n".'' : ' lang="'.$lang.'">'; 145 | $output .= "\n\n $title"; 146 | 147 | if ($externalcss) { 148 | $output .= "\n "; 152 | } 153 | else { 154 | $output .= "\n".' '; 155 | // } 156 | } 157 | $output .= "\n\n"; 158 | $output .= $this->formatted(); 159 | $output .= ''."\n".''; 160 | return $this->output_css_plain; 161 | } 162 | 163 | /** 164 | * Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain 165 | * @param bool $plain plain text or not 166 | * @access private 167 | * @version 2.0 168 | */ 169 | function _print($plain = false) 170 | { 171 | if ($this->output_css && $this->output_css_plain) { 172 | return; 173 | } 174 | 175 | $output = ''; 176 | if (!$this->parser->get_cfg('preserve_css')) { 177 | $this->_convert_raw_css(); 178 | } 179 | 180 | $template =& $this->template; 181 | 182 | if ($plain) { 183 | $template = array_map('strip_tags', $template); 184 | } 185 | 186 | if ($this->parser->get_cfg('timestamp')) { 187 | array_unshift($this->tokens, array(COMMENT, ' CSSTidy ' . $this->parser->version . ': ' . date('r') . ' ')); 188 | } 189 | 190 | if (!empty($this->charset)) { 191 | $output .= $template[0].'@charset '.$template[5].$this->charset.$template[6]; 192 | } 193 | 194 | if (!empty($this->import)) { 195 | for ($i = 0, $size = count($this->import); $i < $size; $i ++) { 196 | if(substr($this->import[$i], 0, 4) === 'url(' && substr($this->import[$i], -1, 1) === ')') { 197 | $this->import[$i] = '\''.substr($this->import[$i], 4, -1).'\''; 198 | $this->parser->log('Optimised @import : Removed "url("','Information'); 199 | } 200 | $output .= $template[0].'@import '.$template[5].$this->import[$i].$template[6]; 201 | } 202 | } 203 | 204 | if (!empty($this->namespace)) { 205 | if(substr($this->namespace, 0, 4) === 'url(' && substr($this->namespace, -1, 1) === ')') { 206 | $this->namespace = '\''.substr($this->namespace, 4, -1).'\''; 207 | $this->parser->log('Optimised @namespace : Removed "url("','Information'); 208 | } 209 | $output .= $template[0].'@namespace '.$template[5].$this->namespace.$template[6]; 210 | } 211 | 212 | $output .= $template[13]; 213 | $in_at_out = ''; 214 | $out =& $output; 215 | 216 | foreach ($this->tokens as $key => $token) 217 | { 218 | switch ($token[0]) 219 | { 220 | case AT_START: 221 | $out .= $template[0].$this->_htmlsp($token[1], $plain).$template[1]; 222 | $out =& $in_at_out; 223 | break; 224 | 225 | case SEL_START: 226 | if($this->parser->get_cfg('lowercase_s')) $token[1] = strtolower($token[1]); 227 | // remove fake counter from @font-face 228 | if (substr($token[1], 0, 10) === '@font-face') { 229 | $token[1] = '@font-face'; 230 | } 231 | $out .= ($token[1]{0} !== '@') ? $template[2].$this->_htmlsp($token[1], $plain) : $template[0].$this->_htmlsp($token[1], $plain); 232 | $out .= $template[3]; 233 | break; 234 | 235 | case PROPERTY: 236 | if($this->parser->get_cfg('case_properties') === 2) 237 | { 238 | $token[1] = strtoupper($token[1]); 239 | // remove fake counter property 240 | $token[1] = preg_replace('/_[0-9]+$/i','',$token[1]); 241 | } 242 | elseif($this->parser->get_cfg('case_properties') === 1) 243 | { 244 | $token[1] = strtolower($token[1]); 245 | // remove fake counter property 246 | $token[1] = preg_replace('/_[0-9]+$/i','',$token[1]); 247 | } else { 248 | // remove fake counter property 249 | $token[1] = preg_replace('/_[0-9]+$/i','',$token[1]); 250 | } 251 | $out .= $template[4] . $this->_htmlsp($token[1], $plain) . ':' . $template[5]; 252 | break; 253 | 254 | case VALUE: 255 | $out .= $this->_htmlsp($token[1], $plain); 256 | if($this->_seeknocomment($key, 1) == SEL_END && $this->parser->get_cfg('remove_last_;')) { 257 | $out .= str_replace(';', '', $template[6]); 258 | } else { 259 | $out .= $template[6]; 260 | } 261 | break; 262 | 263 | case SEL_END: 264 | $out .= $template[7]; 265 | if($this->_seeknocomment($key, 1) != AT_END) $out .= $template[8]; 266 | break; 267 | 268 | case AT_END: 269 | $out =& $output; 270 | $out .= $template[10] . str_replace("\n", "\n" . $template[10], $in_at_out); 271 | $in_at_out = ''; 272 | $out .= $template[9]; 273 | break; 274 | 275 | case COMMENT: 276 | $out .= $template[11] . '/*' . $this->_htmlsp($token[1], $plain) . '*/' . $template[12]; 277 | break; 278 | } 279 | } 280 | 281 | $output = trim($output); 282 | 283 | if (!$plain) { 284 | $this->output_css = $output; 285 | $this->_print(true); 286 | } else { 287 | // If using spaces in the template, don't want these to appear in the plain output 288 | $this->output_css_plain = str_replace(' ', '', $output); 289 | } 290 | } 291 | 292 | /** 293 | * Gets the next token type which is $move away from $key, excluding comments 294 | * @param integer $key current position 295 | * @param integer $move move this far 296 | * @return mixed a token type 297 | * @access private 298 | * @version 1.0 299 | */ 300 | function _seeknocomment($key, $move) { 301 | $go = ($move > 0) ? 1 : -1; 302 | for ($i = $key + 1; abs($key-$i)-1 < abs($move); $i += $go) { 303 | if (!isset($this->tokens[$i])) { 304 | return; 305 | } 306 | if ($this->tokens[$i][0] == COMMENT) { 307 | $move += 1; 308 | continue; 309 | } 310 | return $this->tokens[$i][0]; 311 | } 312 | } 313 | 314 | /** 315 | * Converts $this->css array to a raw array ($this->tokens) 316 | * @access private 317 | * @version 1.0 318 | */ 319 | function _convert_raw_css() 320 | { 321 | $this->tokens = array(); 322 | 323 | foreach ($this->css as $medium => $val) 324 | { 325 | if ($this->parser->get_cfg('sort_selectors')) ksort($val); 326 | if ($medium != DEFAULT_AT) { 327 | $this->parser->_add_token(AT_START, $medium, true); 328 | } 329 | 330 | foreach ($val as $selector => $vali) 331 | { 332 | if ($this->parser->get_cfg('sort_properties')) ksort($vali); 333 | $this->parser->_add_token(SEL_START, $selector, true); 334 | 335 | foreach ($vali as $property => $valj) 336 | { 337 | $this->parser->_add_token(PROPERTY, $property, true); 338 | $this->parser->_add_token(VALUE, $valj, true); 339 | } 340 | 341 | $this->parser->_add_token(SEL_END, $selector, true); 342 | } 343 | 344 | if ($medium != DEFAULT_AT) { 345 | $this->parser->_add_token(AT_END, $medium, true); 346 | } 347 | } 348 | } 349 | 350 | /** 351 | * Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner. 352 | * @param string $string 353 | * @param bool $plain 354 | * @return string 355 | * @see csstidy_print::_print() 356 | * @access private 357 | * @version 1.0 358 | */ 359 | function _htmlsp($string, $plain) 360 | { 361 | if (!$plain) { 362 | return htmlspecialchars($string, ENT_QUOTES, 'utf-8'); 363 | } 364 | return $string; 365 | } 366 | 367 | /** 368 | * Get compression ratio 369 | * @access public 370 | * @return float 371 | * @version 1.2 372 | */ 373 | function get_ratio() 374 | { 375 | if (!$this->output_css_plain) { 376 | $this->formatted(); 377 | } 378 | return round((strlen($this->input_css) - strlen($this->output_css_plain)) / strlen($this->input_css), 3) * 100; 379 | } 380 | 381 | /** 382 | * Get difference between the old and new code in bytes and prints the code if necessary. 383 | * @access public 384 | * @return string 385 | * @version 1.1 386 | */ 387 | function get_diff() 388 | { 389 | if (!$this->output_css_plain) { 390 | $this->formatted(); 391 | } 392 | 393 | $diff = strlen($this->output_css_plain) - strlen($this->input_css); 394 | 395 | if ($diff > 0) { 396 | return '+' . $diff; 397 | } elseif ($diff == 0) { 398 | return '+-' . $diff; 399 | } 400 | 401 | return $diff; 402 | } 403 | 404 | /** 405 | * Get the size of either input or output CSS in KB 406 | * @param string $loc default is "output" 407 | * @access public 408 | * @return integer 409 | * @version 1.0 410 | */ 411 | function size($loc = 'output') 412 | { 413 | if ($loc === 'output' && !$this->output_css) { 414 | $this->formatted(); 415 | } 416 | 417 | if ($loc === 'input') { 418 | return (strlen($this->input_css) / 1000); 419 | } else { 420 | return (strlen($this->output_css_plain) / 1000); 421 | } 422 | } 423 | } 424 | -------------------------------------------------------------------------------- /csstidy/css_optimiser.php: -------------------------------------------------------------------------------- 1 | . 23 | * 24 | * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License 25 | * @package csstidy 26 | * @author Florian Schmitz (floele at gmail dot com) 2005-2007 27 | * @author Brett Zamir (brettz9 at yahoo dot com) 2007 28 | */ 29 | 30 | require('class.csstidy.php'); 31 | require('lang.inc.php'); 32 | 33 | 34 | if (get_magic_quotes_gpc()) { 35 | if (isset($_REQUEST['css_text'])) { 36 | $_REQUEST['css_text'] = stripslashes($_REQUEST['css_text']); 37 | } 38 | if (isset($_REQUEST['custom'])) { 39 | $_REQUEST['custom'] = stripslashes($_REQUEST['custom']); 40 | } 41 | if (isset($_COOKIE['custom_template'])) { 42 | $_COOKIE['custom_template'] = stripslashes($_COOKIE['custom_template']); 43 | } 44 | } 45 | 46 | function rmdirr($dirname,$oc=0) 47 | { 48 | // Sanity check 49 | if (!file_exists($dirname)) { 50 | return false; 51 | } 52 | // Simple delete for a file 53 | if (is_file($dirname) && (time()-fileatime($dirname))>3600) { 54 | return unlink($dirname); 55 | } 56 | // Loop through the folder 57 | if(is_dir($dirname)) 58 | { 59 | $dir = dir($dirname); 60 | while (false !== $entry = $dir->read()) { 61 | // Skip pointers 62 | if ($entry === '.' || $entry === '..') { 63 | continue; 64 | } 65 | // Recurse 66 | rmdirr($dirname.'/'.$entry,$oc); 67 | } 68 | $dir->close(); 69 | } 70 | // Clean up 71 | if ($oc==1) 72 | { 73 | return rmdir($dirname); 74 | } 75 | } 76 | 77 | function options($options, $selected = null, $labelIsValue = false) 78 | { 79 | $html = ''; 80 | 81 | settype($selected, 'array'); 82 | settype($options, 'array'); 83 | 84 | foreach ($options as $value=>$label) 85 | { 86 | if (is_array($label)) { 87 | $value = $label[0]; 88 | $label = $label[1]; 89 | } 90 | $label = htmlspecialchars($label, ENT_QUOTES, 'utf-8'); 91 | $value = $labelIsValue ? $label 92 | : htmlspecialchars($value, ENT_QUOTES, 'utf-8'); 93 | 94 | $html .= ''; 102 | } 103 | 104 | return $html; 105 | } 106 | 107 | $css = new csstidy(); 108 | $is_custom = isset($_REQUEST['custom']) && !empty($_REQUEST['custom']) && isset($_REQUEST['template']) && ($_REQUEST['template'] === '4'); 109 | if($is_custom) 110 | { 111 | setcookie ('custom_template', $_REQUEST['custom'], time()+360000); 112 | } 113 | 114 | rmdirr('temp'); 115 | 116 | if(isset($_REQUEST['case_properties'])) $css->set_cfg('case_properties',$_REQUEST['case_properties']); 117 | if(isset($_REQUEST['lowercase'])) $css->set_cfg('lowercase_s',true); 118 | if(!isset($_REQUEST['compress_c']) && isset($_REQUEST['post'])) $css->set_cfg('compress_colors',false); 119 | if(!isset($_REQUEST['compress_fw']) && isset($_REQUEST['post'])) $css->set_cfg('compress_font-weight',false); 120 | if(isset($_REQUEST['merge_selectors'])) $css->set_cfg('merge_selectors', $_REQUEST['merge_selectors']); 121 | if(isset($_REQUEST['optimise_shorthands'])) $css->set_cfg('optimise_shorthands',$_REQUEST['optimise_shorthands']); 122 | if(!isset($_REQUEST['rbs']) && isset($_REQUEST['post'])) $css->set_cfg('remove_bslash',false); 123 | if(isset($_REQUEST['preserve_css'])) $css->set_cfg('preserve_css',true); 124 | if(isset($_REQUEST['sort_sel'])) $css->set_cfg('sort_selectors',true); 125 | if(isset($_REQUEST['sort_de'])) $css->set_cfg('sort_properties',true); 126 | if(isset($_REQUEST['remove_last_sem'])) $css->set_cfg('remove_last_;',true); 127 | if(isset($_REQUEST['discard'])) $css->set_cfg('discard_invalid_properties',true); 128 | if(isset($_REQUEST['css_level'])) $css->set_cfg('css_level',$_REQUEST['css_level']); 129 | if(isset($_REQUEST['timestamp'])) $css->set_cfg('timestamp',true); 130 | 131 | 132 | // This by itself is enough since our scripts don't use DOM to create elements (in which case the namespace aware ones 133 | // should be used when serving as application/xhtml+xml but not when served as text/html ; 134 | // also, case will be different when retrieving element names, as HTML DOM returns in upper case, 135 | // genuine XHTML DOM (when XHTML served as such) as lower 136 | if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) { 137 | $http_accept = 'application/xhtml+xml'; 138 | } 139 | elseif (stristr($_SERVER['HTTP_ACCEPT'], 'application/xml')) { 140 | $http_accept = 'application/xml'; 141 | } 142 | elseif (stristr($_SERVER['HTTP_ACCEPT'], 'text/xml')) { 143 | $http_accept = 'text/xml'; 144 | } 145 | elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'Opera ') || stristr($_SERVER['HTTP_USER_AGENT'], 'Opera/')) { 146 | preg_match('@Opera/(\d)@', $_SERVER['HTTP_USER_AGENT'], $matches); 147 | if (isset($matches[1]) && $matches[1] >= 7) { 148 | $http_accept = 'application/xhtml+xml'; 149 | } 150 | else { 151 | $http_accept = 'text/html'; 152 | } 153 | } 154 | else { 155 | $http_accept = 'text/html'; 156 | } 157 | 158 | header('Content-Type: '.$http_accept.'; charset=utf-8'); 159 | 160 | if ($http_accept === 'text/html') { 161 | ?> 162 | 164 | 168 | 169 | 172 | 173 | 174 | 175 | 176 | <?php echo $lang[$l][0]; echo $css->version; ?>) 177 | 178 | 179 | 217 | 218 | 219 |

220 | 221 |

222 | csstidy version; ?>) 224 |

225 | : English Deutsch French Chinese

226 |

227 | 228 |

229 | 230 |
231 |
232 |
233 | 235 | 238 | size="35" />
239 | 240 |
241 |
242 |
243 |
251 | 260 |
261 |
262 | 263 | 264 | get_cfg('preserve_css')) echo 'checked="checked"'; ?> /> 266 |
267 | 268 | 269 | get_cfg('sort_selectors')) echo 'checked="checked"'; ?> /> 271 |
272 | 273 | 274 | get_cfg('sort_properties')) echo 'checked="checked"'; ?> /> 276 |
277 | 278 | 279 | 280 |
283 | 284 | 285 |
288 | 289 | 290 | get_cfg('compress_colors')) echo 'checked="checked"';?> /> 292 |
293 | 294 | 295 | get_cfg('compress_font-weight')) echo 'checked="checked"';?> /> 297 |
298 | 299 | 300 | get_cfg('lowercase_s')) echo 'checked="checked"'; ?> /> 302 |
303 | 304 | 305 |
306 | get_cfg('case_properties') === 0) echo 'checked="checked"'; ?> /> 308 | 309 | get_cfg('case_properties') === 1) echo 'checked="checked"'; ?> /> 311 | 312 | get_cfg('case_properties') === 2) echo 'checked="checked"'; ?> /> 314 |
315 | 316 | get_cfg('remove_bslash')) echo 'checked="checked"'; ?> /> 318 |
319 | 320 | 321 | get_cfg('remove_last_;')) echo 'checked="checked"'; ?> /> 323 |
324 | 325 | 326 | get_cfg('discard_invalid_properties')) echo 'checked="checked"'; ?> /> 328 | 329 |
330 | 331 | 332 | get_cfg('timestamp')) echo 'checked="checked"'; ?> /> 334 |
335 | 336 | /> 338 |
339 | 340 | 341 | /> 343 |
346 | 347 |
348 | 349 |
350 |
351 |
352 | load_template($_REQUEST['custom'],false); 367 | } 368 | break; 369 | 370 | case 3: 371 | $css->load_template('highest_compression'); 372 | break; 373 | 374 | case 2: 375 | $css->load_template('high_compression'); 376 | break; 377 | 378 | case 0: 379 | $css->load_template('low_compression'); 380 | break; 381 | } 382 | } 383 | 384 | if($url) 385 | { 386 | if(substr($_REQUEST['url'],0,7) !== 'http://') 387 | { 388 | $_REQUEST['url'] = 'http://'.$_REQUEST['url']; 389 | } 390 | $result = $css->parse_from_url($_REQUEST['url'],0); 391 | } 392 | elseif(isset($_REQUEST['css_text']) && strlen($_REQUEST['css_text'])>5) 393 | { 394 | $result = $css->parse($_REQUEST['css_text']); 395 | } 396 | 397 | if($result) 398 | { 399 | $ratio = $css->print->get_ratio(); 400 | $diff = $css->print->get_diff(); 401 | if(isset($_REQUEST['file_output'])) 402 | { 403 | $filename = md5(mt_rand().time().mt_rand()); 404 | if (!is_dir('temp')) { 405 | $madedir = mkdir('temp'); 406 | if (!$madedir) { 407 | print 'Could not make directory "temp" in '.dirname(__FILE__); 408 | exit; 409 | } 410 | } 411 | $handle = fopen('temp/'.$filename.'.css','w'); 412 | if($handle) { 413 | if(fwrite($handle,$css->print->plain())) 414 | { 415 | $file_ok = true; 416 | } 417 | } 418 | fclose($handle); 419 | } 420 | if($ratio>0) $ratio = ''.$ratio.'% 421 | ('.$diff.' Bytes)'; else $ratio = ''.$ratio.'% ('.$diff.' Bytes)'; 423 | if(count($css->log) > 0): ?> 424 |
Messages 425 |
log as $line => $array) 427 | { 428 | echo '
',$line,'
'; 429 | $array_size = count($array); 430 | for($i = 0; $i < $array_size; ++$i) 431 | { 432 | echo '
',$array[$i]['m'],'
'; 433 | } 434 | } 435 | ?>
436 |
437 | ',$lang[$l][37],': ',$css->print->size('input'),'KB, ',$lang[$l][38],':',$css->print->size('output'),'KB, ',$lang[$l][36],': ',$ratio; 439 | if($file_ok) 440 | { 441 | echo ' - Download'; 442 | } 443 | echo ' - ',$lang[$l][58],''; 444 | echo ''; 445 | echo ''; 446 | echo $css->print->formatted(); 447 | echo '

'; 448 | 449 | echo '
',$lang[$l][64],''; 450 | echo '
'; 460 | echo '
',$lang[$l][65],''; 461 | echo ''; 465 | 466 | echo '

↑ ',$lang[$l][59],'

'; 467 | 468 | } 469 | elseif(isset($_REQUEST['css_text']) || isset($_REQUEST['url'])) { 470 | echo '

',$lang[$l][28],'

'; 471 | } 472 | ?> 473 |

474 | . 476 |

477 | 478 | -------------------------------------------------------------------------------- /csstidy/cssparse.css: -------------------------------------------------------------------------------- 1 | @import url("cssparsed.css"); 2 | 3 | html, body { 4 | font:0.8em Verdana,Helvetica,sans-serif; 5 | background:#F8F8F6; 6 | } 7 | 8 | code { 9 | font-size:1.2em; 10 | } 11 | 12 | div#rightcol { 13 | padding-left:32em; 14 | } 15 | 16 | fieldset { 17 | display:block; 18 | margin:0.5em 0; 19 | padding:1em; 20 | border:solid #7284AB 2px; 21 | } 22 | fieldset.code_output { 23 | display:inline; 24 | } 25 | 26 | h1 { 27 | font-size:2em; 28 | } 29 | 30 | small { 31 | font-size:0.7em; 32 | } 33 | 34 | fieldset#field_input { 35 | float:left; 36 | margin:0 0.5em 1em 0; 37 | } 38 | 39 | fieldset#options,fieldset#code_layout { 40 | width:31em; 41 | } 42 | 43 | input#submit { 44 | clear:both; 45 | display:block; 46 | margin:1em; 47 | } 48 | 49 | select { 50 | margin:2px 0 0; 51 | } 52 | 53 | label.block { 54 | display:block; 55 | } 56 | 57 | legend { 58 | background:#c4E1C3; 59 | padding:2px 4px; 60 | border:dashed 1px; 61 | } 62 | 63 | textarea#css_text { 64 | width:27em; 65 | height:370px; 66 | display:block; 67 | margin-right:1em; 68 | } 69 | 70 | .help { 71 | cursor:help; 72 | } 73 | 74 | p.important { 75 | border:solid 1px red; 76 | font-weight:bold; 77 | padding:1em; 78 | background:white; 79 | } 80 | 81 | p { 82 | margin:1em 0; 83 | } 84 | 85 | dl { 86 | padding-left:0.5em; 87 | } 88 | 89 | dt { 90 | font-weight:bold; 91 | margin:0; 92 | float:left; 93 | clear:both; 94 | height:1.5em; 95 | } 96 | 97 | dd { 98 | margin:0 0 0 4em; 99 | height:1.5em; 100 | } 101 | 102 | fieldset#messages { 103 | background:white; 104 | padding:0 0 0 1em; 105 | } 106 | 107 | fieldset#messages div { 108 | height:10em; 109 | overflow:auto; 110 | } 111 | 112 | dd.Warning { 113 | color:orange; 114 | } 115 | 116 | dd.Information { 117 | color:green; 118 | } -------------------------------------------------------------------------------- /csstidy/cssparsed.css: -------------------------------------------------------------------------------- 1 | code#copytext { 2 | white-space: pre; 3 | font-family: Verdana; 4 | } 5 | 6 | .at { 7 | color:darkblue; 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 | } -------------------------------------------------------------------------------- /csstidy/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 | } 33 | else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { 34 | $l = $_SERVER['HTTP_ACCEPT_LANGUAGE']; 35 | $l = strtolower(substr($l, 0, 2)); 36 | } 37 | else { 38 | $l = ''; 39 | } 40 | 41 | $l = (in_array($l, array('de', 'fr', 'zh'))) ? $l : 'en'; 42 | 43 | // note 5 in all but French, and 40 in all are orphaned 44 | 45 | $lang = array(); 46 | $lang['en'][0] = 'CSS Formatter and Optimiser/Optimizer (based on CSSTidy '; 47 | $lang['en'][1] = 'CSS Formatter and Optimiser'; 48 | $lang['en'][2] = '(based on'; 49 | $lang['en'][3] = '(plaintext)'; 50 | $lang['en'][4] = 'Important Note:'; 51 | $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.'; 52 | $lang['en'][7] = 'all comments are removed'; 53 | $lang['en'][8] = 'CSS Input:'; 54 | $lang['en'][9] = 'CSS-Code:'; 55 | $lang['en'][10] = 'CSS from URL:'; 56 | $lang['en'][11] = 'Code Layout:'; 57 | $lang['en'][12] = 'Compression (code layout):'; 58 | $lang['en'][13] = 'Highest (no readability, smallest size)'; 59 | $lang['en'][14] = 'High (moderate readability, smaller size)'; 60 | $lang['en'][15] = 'Standard (balance between readability and size)'; 61 | $lang['en'][16] = 'Low (higher readability)'; 62 | $lang['en'][17] = 'Custom (enter below)'; 63 | $lang['en'][18] = 'Custom template'; 64 | $lang['en'][19] = 'Options'; 65 | $lang['en'][20] = 'Sort Selectors (caution)'; 66 | $lang['en'][21] = 'Sort Properties'; 67 | $lang['en'][22] = 'Regroup selectors'; 68 | $lang['en'][23] = 'Optimise shorthands'; 69 | $lang['en'][24] = 'Compress colors'; 70 | $lang['en'][25] = 'Lowercase selectors'; 71 | $lang['en'][26] = 'Case for properties:'; 72 | $lang['en'][27] = 'Lowercase'; 73 | $lang['en'][28] = 'No or invalid CSS input or wrong URL!'; 74 | $lang['en'][29] = 'Uppercase'; 75 | $lang['en'][30] = 'lowercase elementnames needed for XHTML'; 76 | $lang['en'][31] = 'Remove unnecessary backslashes'; 77 | $lang['en'][32] = 'convert !important-hack'; 78 | $lang['en'][33] = 'Output as file'; 79 | $lang['en'][34] = 'Bigger compression because of smaller newlines (copy & paste doesn\'t work)'; 80 | $lang['en'][35] = 'Process CSS'; 81 | $lang['en'][36] = 'Compression Ratio'; 82 | $lang['en'][37] = 'Input'; 83 | $lang['en'][38] = 'Output'; 84 | $lang['en'][39] = 'Language'; 85 | $lang['en'][41] = 'Attention: This may change the behaviour of your CSS Code!'; 86 | $lang['en'][42] = 'Remove last ;'; 87 | $lang['en'][43] = 'Discard invalid properties'; 88 | $lang['en'][44] = 'Only safe optimisations'; 89 | $lang['en'][45] = 'Compress font-weight'; 90 | $lang['en'][46] = 'Save comments'; 91 | $lang['en'][47] = 'Do not change anything'; 92 | $lang['en'][48] = 'Only seperate selectors (split at ,)'; 93 | $lang['en'][49] = 'Merge selectors with the same properties (fast)'; 94 | $lang['en'][50] = 'Merge selectors intelligently (slow)'; 95 | $lang['en'][51] = 'Preserve CSS'; 96 | $lang['en'][52] = 'Save comments, hacks, etc. Most optimisations can *not* be applied if this is enabled.'; 97 | $lang['en'][53] = 'None'; 98 | $lang['en'][54] = 'Don\'t optimise'; 99 | $lang['en'][55] = 'Safe optimisations'; 100 | $lang['en'][56] = 'All optimisations'; 101 | $lang['en'][57] = 'Add timestamp'; 102 | $lang['en'][58] = 'Copy to clipboard'; 103 | $lang['en'][59] = 'Back to top'; 104 | $lang['en'][60] = 'Your browser doesn\'t support copy to clipboard.'; 105 | $lang['en'][61] = 'For bugs and suggestions feel free to'; 106 | $lang['en'][62] = 'contact me'; 107 | $lang['en'][63] = 'Output CSS code as complete HTML document'; 108 | $lang['en'][64] = 'Code'; 109 | $lang['en'][65] = 'CSS to style CSS output'; 110 | $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.'; 111 | 112 | 113 | $lang['de'][0] = 'CSS Formatierer und Optimierer (basierend auf CSSTidy '; 114 | $lang['de'][1] = 'CSS Formatierer und Optimierer'; 115 | $lang['de'][2] = '(basierend auf'; 116 | $lang['de'][3] = '(Textversion)'; 117 | $lang['de'][4] = 'Wichtiger Hinweis:'; 118 | $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.'; 119 | $lang['de'][7] = 'alle Kommentare werden entfernt'; 120 | $lang['de'][8] = 'CSS Eingabe:'; 121 | $lang['de'][9] = 'CSS-Code:'; 122 | $lang['de'][10] = 'CSS von URL:'; 123 | $lang['de'][11] = 'Code Layout:'; 124 | $lang['de'][12] = 'Komprimierung (Code Layout):'; 125 | $lang['de'][13] = 'Höchste (keine Lesbarkeit, niedrigste Größe)'; 126 | $lang['de'][14] = 'Hoch (mittelmäßige Lesbarkeit, geringe Größe)'; 127 | $lang['de'][15] = 'Standard (Kompromiss zwischen Lesbarkeit und Größe)'; 128 | $lang['de'][16] = 'Niedrig (höhere Lesbarkeit)'; 129 | $lang['de'][17] = 'Benutzerdefiniert (unten eingeben)'; 130 | $lang['de'][18] = 'Benutzerdefinierte Vorlage'; 131 | $lang['de'][19] = 'Optionen'; 132 | $lang['de'][20] = 'Selektoren sortieren (Vorsicht)'; 133 | $lang['de'][21] = 'Eigenschaften sortieren'; 134 | $lang['de'][22] = 'Selektoren umgruppieren'; 135 | $lang['de'][23] = 'Shorthands optimieren'; 136 | $lang['de'][24] = 'Farben komprimieren'; 137 | $lang['de'][25] = 'Selektoren in Kleinbuchstaben'; 138 | $lang['de'][26] = 'Groß-/Kleinschreibung für Eigenschaften'; 139 | $lang['de'][27] = 'Kleinbuchstaben'; 140 | $lang['de'][28] = 'Keine oder ungültige CSS Eingabe oder falsche URL!'; 141 | $lang['de'][29] = 'Großbuchstaben'; 142 | $lang['de'][30] = 'kleingeschriebene Elementnamen benötigt für XHTML'; 143 | $lang['de'][31] = 'Unnötige Backslashes entfernen'; 144 | $lang['de'][32] = '!important-Hack konvertieren'; 145 | $lang['de'][33] = 'Als Datei ausgeben'; 146 | $lang['de'][34] = 'Größere Komprimierung augrund von kleineren Neuezeile-Zeichen'; 147 | $lang['de'][35] = 'CSS verarbeiten'; 148 | $lang['de'][36] = 'Komprimierungsrate'; 149 | $lang['de'][37] = 'Eingabe'; 150 | $lang['de'][38] = 'Ausgabe'; 151 | $lang['de'][39] = 'Sprache'; 152 | $lang['de'][41] = 'Achtung: Dies könnte das Verhalten ihres CSS-Codes verändern!'; 153 | $lang['de'][42] = 'Letztes ; entfernen'; 154 | $lang['de'][43] = 'Ungültige Eigenschaften entfernen'; 155 | $lang['de'][44] = 'Nur sichere Optimierungen'; 156 | $lang['de'][45] = 'font-weight komprimieren'; 157 | $lang['de'][46] = 'Kommentare beibehalten'; 158 | $lang['de'][47] = 'Nichts ändern'; 159 | $lang['de'][48] = 'Selektoren nur trennen (am Komma)'; 160 | $lang['de'][49] = 'Selektoren mit gleichen Eigenschaften zusammenfassen (schnell)'; 161 | $lang['de'][50] = 'Selektoren intelligent zusammenfassen (langsam!)'; 162 | $lang['de'][51] = 'CSS erhalten'; 163 | $lang['de'][52] = 'Kommentare, Hacks, etc. speichern. Viele Optimierungen sind dann aber nicht mehr möglich.'; 164 | $lang['de'][53] = 'Keine'; 165 | $lang['de'][54] = 'Nicht optimieren'; 166 | $lang['de'][55] = 'Sichere Optimierungen'; 167 | $lang['de'][56] = 'Alle Optimierungen'; 168 | $lang['de'][57] = 'Zeitstempel hinzufügen'; 169 | $lang['de'][58] = 'Copy to clipboard'; 170 | $lang['de'][59] = 'Back to top'; 171 | $lang['de'][60] = 'Your browser doesn\'t support copy to clipboard.'; 172 | $lang['de'][61] = 'For bugs and suggestions feel free to'; 173 | $lang['de'][62] = 'contact me'; 174 | $lang['de'][63] = 'Output CSS code as complete HTML document'; 175 | $lang['de'][64] = 'Code'; 176 | $lang['de'][65] = 'CSS to style CSS output'; 177 | $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.'; 178 | 179 | 180 | $lang['fr'][0] = 'CSS Formatteur et Optimiseur (basé sur CSSTidy '; 181 | $lang['fr'][1] = 'CSS Formatteur et Optimiseur'; 182 | $lang['fr'][2] = '(basé sur '; 183 | $lang['fr'][3] = '(Version texte)'; 184 | $lang['fr'][4] = 'Note Importante :'; 185 | $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.'; 186 | $lang['fr'][7] = 'tous les commentaires sont enlevés'; 187 | $lang['fr'][8] = 'Champ CSS :'; 188 | $lang['fr'][9] = 'Code CSS :'; 189 | $lang['fr'][10] = 'CSS en provenance d’une URL :
'; 190 | $lang['fr'][11] = 'Mise en page du code :'; 191 | $lang['fr'][12] = 'Compression (mise en page du code) :'; 192 | $lang['fr'][13] = 'La plus élevée (aucune lisibilité, taille minimale)'; 193 | $lang['fr'][14] = 'Élevée (lisibilité modérée, petite taille)'; 194 | $lang['fr'][15] = 'Normale (équilibre entre lisibilité et taille)'; 195 | $lang['fr'][16] = 'Faible (lisibilité élevée)'; 196 | $lang['fr'][17] = 'Sur mesure (entrer ci-dessous)'; 197 | $lang['fr'][18] = 'Gabarit sur mesure'; 198 | $lang['fr'][19] = 'Options'; 199 | $lang['fr'][20] = 'Trier les sélecteurs (attention)'; 200 | $lang['fr'][21] = 'Trier les propriétés'; 201 | $lang['fr'][22] = 'Regrouper les sélecteurs'; 202 | $lang['fr'][23] = 'Propriétés raccourcies'; 203 | $lang['fr'][24] = 'Compresser les couleurs'; 204 | $lang['fr'][25] = 'Sélecteurs en minuscules'; 205 | $lang['fr'][26] = 'Case pour les propriétés :'; 206 | $lang['fr'][27] = 'Minuscule'; 207 | $lang['fr'][28] = 'CSS non valide ou URL incorrecte !'; 208 | $lang['fr'][29] = 'Majuscule'; 209 | $lang['fr'][30] = 'les noms des éléments en minuscules (indispensables pour XHTML)'; 210 | $lang['fr'][31] = 'enlever les antislashs inutiles'; 211 | $lang['fr'][32] = 'convertir !important-hack'; 212 | $lang['fr'][33] = 'Sauver en tant que fichier'; 213 | $lang['fr'][34] = 'Meilleure compression grâce aux caractères de saut de ligne plus petits (copier & coller ne marche pas)'; 214 | $lang['fr'][35] = 'Compresser la CSS'; 215 | $lang['fr'][36] = 'Facteur de Compression'; 216 | $lang['fr'][37] = 'Entrée'; 217 | $lang['fr'][38] = 'Sortie'; 218 | $lang['fr'][39] = 'Langue'; 219 | $lang['fr'][41] = 'Attention : ceci peut changer le comportement de votre code CSS !'; 220 | $lang['fr'][42] = 'Enlever le dernier ;'; 221 | $lang['fr'][43] = 'Supprimer les propriétés non valide'; 222 | $lang['fr'][44] = 'Seulement les optimisations sûres'; 223 | $lang['fr'][45] = 'Compresser font-weight'; 224 | $lang['fr'][46] = 'Sauvegarder les commentaires '; 225 | $lang['fr'][47] = 'Ne rien changer'; 226 | $lang['fr'][48] = 'Sépare les sélecteurs (sépare au niveau de ,)'; 227 | $lang['fr'][49] = 'Fusionne les sélecteurs avec les mêmes propriétés (rapide)'; 228 | $lang['fr'][50] = 'Fusionne les sélecteurs intelligemment (lent)'; 229 | $lang['fr'][51] = 'Préserver la CSS'; 230 | $lang['fr'][52] = 'Sauvegarder les commentaires, hacks, etc. La plupart des optimisations ne peuvent *pas* être appliquées si cela est activé.'; 231 | $lang['fr'][53] = 'Aucun'; 232 | $lang['fr'][54] = 'Ne pas optimiser'; 233 | $lang['fr'][55] = 'Optimisations sûres'; 234 | $lang['fr'][56] = 'Toutes les optimisations'; 235 | $lang['fr'][57] = 'Ajouter un timestamp'; 236 | $lang['fr'][58] = 'Copier dans le presse-papiers'; 237 | $lang['fr'][59] = 'Retour en haut'; 238 | $lang['fr'][60] = 'Votre navigateur ne suporte pas la copie vers le presse-papiers.'; 239 | $lang['fr'][61] = 'Pour signaler des bugs ou pour des suggestions,'; 240 | $lang['fr'][62] = 'contactez-moi'; 241 | $lang['fr'][63] = 'Sauver le code CSS comme document complet HTML'; 242 | $lang['fr'][64] = 'Code'; 243 | $lang['fr'][65] = 'CSS pour colorier la sortie CSS'; 244 | $lang['fr'][66] = 'Vous devez aller dans about:config dans votre barre d’adresse, selectionner \'signed.applets.codebase_principal_support\' dans le champ Filtre et attribuez-lui la valeur \'true\' pour utiliser cette fonctionnalité; toutefois, soyez conscient que cela augmente les risques de sécurité.'; 245 | 246 | 247 | $lang['zh'][0] = 'CSS整形與最佳化工具(使用 CSSTidy '; 248 | $lang['zh'][1] = 'CSS整形與最佳化工具'; 249 | $lang['zh'][2] = '(使用'; 250 | $lang['zh'][3] = '(純文字)'; 251 | $lang['zh'][4] = '重要事項:'; 252 | $lang['zh'][6] = '你的原始碼必須是良構的(well-formed). 這個工具沒有內建驗證器(validator). 驗證器能夠指出你CSS原始碼裡的錯誤. 請使用 W3C 驗證器, 確保你的原始碼合乎規範.'; 253 | $lang['zh'][7] = '所有註解都移除了'; 254 | $lang['zh'][8] = 'CSS 輸入:'; 255 | $lang['zh'][9] = 'CSS 原始碼:'; 256 | $lang['zh'][10] = 'CSS 檔案網址(URL):'; 257 | $lang['zh'][11] = '原始碼規劃:'; 258 | $lang['zh'][12] = '壓縮程度(原始碼規劃):'; 259 | $lang['zh'][13] = '最高 (沒有辦法讀, 檔案最小)'; 260 | $lang['zh'][14] = '高 (適度的可讀性, 檔案小)'; 261 | $lang['zh'][15] = '標準 (兼顧可讀性與檔案大小)'; 262 | $lang['zh'][16] = '低 (注重可讀性)'; 263 | $lang['zh'][17] = '自訂 (在下方設定)'; 264 | $lang['zh'][18] = '自訂樣板'; 265 | $lang['zh'][19] = '選項'; 266 | $lang['zh'][20] = '整理選擇符(請謹慎使用)'; 267 | $lang['zh'][21] = '整理屬性'; 268 | $lang['zh'][22] = '重組選擇符'; 269 | $lang['zh'][23] = '速記法(shorthand)最佳化'; 270 | $lang['zh'][24] = '壓縮色彩語法'; 271 | $lang['zh'][25] = '改用小寫選擇符'; 272 | $lang['zh'][26] = '屬性的字形:'; 273 | $lang['zh'][27] = '小寫'; 274 | $lang['zh'][28] = '沒有輸入CSS, 語法不符合規定, 或是網址錯誤!'; 275 | $lang['zh'][29] = '大寫'; 276 | $lang['zh'][30] = 'XHTML必須使用小寫的元素名稱'; 277 | $lang['zh'][31] = '移除不必要的反斜線'; 278 | $lang['zh'][32] = '轉換 !important-hack'; 279 | $lang['zh'][33] = '輸出成檔案形式'; 280 | $lang['zh'][34] = '由於比較少換行字元, 會有更大的壓縮比率(複製&貼上沒有用)'; 281 | $lang['zh'][35] = '執行'; 282 | $lang['zh'][36] = '壓縮比率'; 283 | $lang['zh'][37] = '輸入'; 284 | $lang['zh'][38] = '輸出'; 285 | $lang['zh'][39] = '語言'; 286 | $lang['zh'][41] = '注意: 這或許會變更你CSS原始碼的行為!'; 287 | $lang['zh'][42] = '除去最後一個分號'; 288 | $lang['zh'][43] = '拋棄不符合規定的屬性'; 289 | $lang['zh'][44] = '只安全地最佳化'; 290 | $lang['zh'][45] = '壓縮 font-weight'; 291 | $lang['zh'][46] = '保留註解'; 292 | $lang['zh'][47] = '什麼都不要改'; 293 | $lang['zh'][48] = '只分開原本用逗號分隔的選擇符'; 294 | $lang['zh'][49] = '合併有相同屬性的選擇符(快速)'; 295 | $lang['zh'][50] = '聰明地合併選擇符(慢速)'; 296 | $lang['zh'][51] = '保護CSS'; 297 | $lang['zh'][52] = '保留註解與 hack 等等. 如果啟用這個選項, 大多數的最佳化程序都不會執行.'; 298 | $lang['zh'][53] = '不改變'; 299 | $lang['zh'][54] = '不做最佳化'; 300 | $lang['zh'][55] = '安全地最佳化'; 301 | $lang['zh'][56] = '全部最佳化'; 302 | $lang['zh'][57] = '加上時間戳記'; 303 | $lang['zh'][58] = '复制到剪贴板'; 304 | $lang['zh'][59] = '回到页面上方'; 305 | $lang['zh'][60] = '你的浏览器不支持复制到剪贴板。'; 306 | $lang['zh'][61] = '如果程序有错误或你有建议,欢迎'; 307 | $lang['zh'][62] = '和我联系'; 308 | $lang['zh'][63] = 'Output CSS code as complete HTML document'; 309 | $lang['zh'][64] = '代码'; 310 | $lang['zh'][65] = 'CSS to style CSS output'; 311 | $lang['zh'][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.'; 312 | -------------------------------------------------------------------------------- /csstidy/template.tpl: -------------------------------------------------------------------------------- 1 | | { 2 | || { 3 | |||; 4 | |}| 5 | 6 | | 7 | } 8 | 9 | ||| 10 | | 11 | -------------------------------------------------------------------------------- /csstidy/template1.tpl: -------------------------------------------------------------------------------- 1 | | { 2 | || 3 | { 4 | | ||; 5 | |}| 6 | 7 | | 8 | 9 | } 10 | 11 | | || 12 | | 13 | -------------------------------------------------------------------------------- /csstidy/template2.tpl: -------------------------------------------------------------------------------- 1 | | { 2 | ||{|||;|}| 3 | | 4 | } 5 | |||| 6 | -------------------------------------------------------------------------------- /csstidy/template3.tpl: -------------------------------------------------------------------------------- 1 | |{||{|||;|}||}|||| -------------------------------------------------------------------------------- /csstidy/testing/unit-tests.inc: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | error_reporting(E_ALL); 10 | 11 | // Configuration 12 | $simpletest_location = 'simpletest/'; 13 | if (file_exists('../test-settings.php')) include_once '../test-settings.php'; 14 | 15 | // Includes 16 | require_once '../class.csstidy.php'; 17 | require_once 'Text/Diff.php'; 18 | require_once 'Text/Diff/Renderer.php'; 19 | require_once $simpletest_location . 'unit_tester.php'; 20 | require_once $simpletest_location . 'reporter.php'; 21 | require_once 'unit-tests/class.csstidy_reporter.php'; 22 | require_once 'unit-tests/class.csstidy_harness.php'; 23 | require_once 'unit-tests.inc'; 24 | 25 | // Test files 26 | $test_files = array(); 27 | require 'unit-tests/_files.php'; 28 | 29 | // Setup test files 30 | $test = new GroupTest('CSSTidy unit tests'); 31 | foreach ($test_files as $test_file) { 32 | require_once "unit-tests/$test_file"; 33 | list($x, $class_suffix) = explode('.', $test_file); 34 | $test->addTestClass("csstidy_test_$class_suffix"); 35 | } 36 | 37 | if (SimpleReporter::inCli()) $reporter = new TextReporter(); 38 | else $reporter = new csstidy_reporter('UTF-8'); 39 | 40 | $test->run($reporter); 41 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/_files.php: -------------------------------------------------------------------------------- 1 | '. $this->original .''. $this->final .''; 18 | } 19 | function _endDiff() { 20 | return ''; 21 | } 22 | function _context($lines) { 23 | return '
'. htmlspecialchars(implode("\n", $lines)) .'
24 |
'. htmlspecialchars(implode("\n", $lines)) .'
'; 25 | } 26 | function _added($lines) { 27 | return ' 
'. htmlspecialchars(implode("\n", $lines)) .'
'; 28 | } 29 | function _deleted($lines) { 30 | return '
'. htmlspecialchars(implode("\n", $lines)) .'
 '; 31 | } 32 | function _changed($orig, $final) { 33 | return '
'. htmlspecialchars(implode("\n", $orig)) .'
34 |
'. htmlspecialchars(implode("\n", $final)) .'
'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/class.csstidy_csst.php: -------------------------------------------------------------------------------- 1 | css[41] (no at block) */ 23 | var $expect = ''; 24 | 25 | /** Boolean whether or not to use $css->css instead for $expect */ 26 | var $fullexpect = false; 27 | 28 | /** Actual result */ 29 | var $actual; 30 | 31 | /** 32 | * Loads this class from a file. 33 | * @param $filename String filename to load 34 | */ 35 | function load($filename) { 36 | $this->filename = $filename; 37 | $fh = fopen($filename, 'r'); 38 | $state = ''; 39 | while (($line = fgets($fh)) !== false) { 40 | $line = rtrim($line, "\n\r"); // normalize newlines 41 | if (substr($line, 0, 2) == '--') { 42 | // detected section 43 | $state = $line; 44 | continue; 45 | } 46 | if ($state === null) continue; 47 | switch ($state) { 48 | case '--TEST--': 49 | $this->test = trim($line); 50 | break; 51 | case '--CSS--': 52 | $this->css .= $line . "\n"; 53 | break; 54 | case '--FULLEXPECT--': 55 | $this->fullexpect = true; // no break! 56 | case '--EXPECT--': 57 | $this->expect .= $line . "\n"; 58 | break; 59 | case '--SETTINGS--': 60 | list($n, $v) = array_map('trim',explode('=', $line, 2)); 61 | $v = eval("return $v;"); 62 | $this->settings[$n] = $v; 63 | break; 64 | } 65 | } 66 | $this->expect = trim($this->expect, "\n"); // trim trailing/leading newlines 67 | fclose($fh); 68 | } 69 | 70 | /** 71 | * Implements SimpleExpectation::test(). 72 | * @param $filename Filename of test file to test. 73 | */ 74 | function test($filename = false) { 75 | if ($filename) $this->load($filename); 76 | $css = new csstidy(); 77 | $css->set_cfg($this->settings); 78 | $css->parse($this->css); 79 | if ($this->fullexpect) { 80 | $this->actual = var_export($css->css, true); 81 | } elseif (isset($css->css[41])) { 82 | $this->actual = var_export($css->css[41], true); 83 | } else { 84 | $this->actual = 'Key 41 does not exist'; 85 | } 86 | return $this->expect === $this->actual; 87 | } 88 | 89 | /** 90 | * Implements SimpleExpectation::testMessage(). 91 | */ 92 | function testMessage() { 93 | $message = $this->test . ' test at '. htmlspecialchars($this->filename); 94 | return $message; 95 | } 96 | 97 | /** 98 | * Renders the test with an HTML diff table. 99 | */ 100 | function render() { 101 | $message = '
'. htmlspecialchars($this->css) .'
'; 102 | $diff = new Text_Diff('auto', array(explode("\n", $this->expect), explode("\n", $this->actual))); 103 | $renderer = new Text_Diff_Renderer_parallel(); 104 | $renderer->original = 'Expected'; 105 | $renderer->final = 'Actual'; 106 | $message .= $renderer->render($diff); 107 | return $message; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/class.csstidy_harness.php: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/properties/css1.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 | background:1; 12 | background-color:1; 13 | background-image:1; 14 | background-repeat:1; 15 | background-attachment:1; 16 | background-position:1; 17 | border:1; 18 | border-top:1; 19 | border-right:1; 20 | border-bottom:1; 21 | border-left:1; 22 | border-color:1; 23 | border-style:1; 24 | border-width:1; 25 | border-top-width:1; 26 | border-right-width:1; 27 | border-left-width:1; 28 | border-bottom-width:1; 29 | clear:1; 30 | clip:1; 31 | color:1; 32 | display:1; 33 | float:1; 34 | font:1; 35 | font-family:1; 36 | font-style:1; 37 | font-variant:1; 38 | font-weight:1; 39 | font-size:1; 40 | height:1; 41 | left:1; 42 | line-height:1; 43 | list-style:1; 44 | list-style-type:1; 45 | list-style-image:1; 46 | list-style-position:1; 47 | margin:1; 48 | margin-top:1; 49 | margin-right:1; 50 | margin-bottom:1; 51 | margin-left:1; 52 | marks:1; 53 | overflow:1; 54 | padding:1; 55 | padding-top:1; 56 | padding-right:1; 57 | padding-bottom:1; 58 | padding-left:1; 59 | page-break-before:1; 60 | page-break-after:1; 61 | position:1; 62 | size:1; 63 | top:1; 64 | text-indent:1; 65 | text-align:1; 66 | text-decoration:1; 67 | letter-spacing:1; 68 | word-spacing:1; 69 | text-transform:1; 70 | white-space:1; 71 | vertical-align:1; 72 | visibility:1; 73 | width:1; 74 | z-index:1; 75 | } 76 | --EXPECT-- 77 | array ( 78 | 'a' => 79 | array ( 80 | 'background' => '1px', 81 | 'background-color' => '#1', 82 | 'background-image' => '1', 83 | 'background-repeat' => '1', 84 | 'background-attachment' => '1', 85 | 'background-position' => '1px', 86 | 'border' => '1px', 87 | 'border-top' => '1px', 88 | 'border-right' => '1px', 89 | 'border-bottom' => '1px', 90 | 'border-left' => '1px', 91 | 'border-color' => '#1', 92 | 'border-style' => '1', 93 | 'border-width' => '1px', 94 | 'border-top-width' => '1px', 95 | 'border-right-width' => '1px', 96 | 'border-left-width' => '1px', 97 | 'border-bottom-width' => '1px', 98 | 'clear' => '1', 99 | 'clip' => '1', 100 | 'color' => '#1', 101 | 'display' => '1', 102 | 'float' => '1', 103 | 'font' => '1', 104 | 'font-family' => '1', 105 | 'font-style' => '1', 106 | 'font-variant' => '1', 107 | 'font-weight' => '1', 108 | 'font-size' => '1px', 109 | 'height' => '1px', 110 | 'left' => '1px', 111 | 'line-height' => '1', 112 | 'list-style' => '1', 113 | 'list-style-type' => '1', 114 | 'list-style-image' => '1', 115 | 'list-style-position' => '1', 116 | 'margin' => '1px', 117 | 'margin-top' => '1px', 118 | 'margin-right' => '1px', 119 | 'margin-bottom' => '1px', 120 | 'margin-left' => '1px', 121 | 'marks' => '1', 122 | 'overflow' => '1', 123 | 'padding' => '1px', 124 | 'padding-top' => '1px', 125 | 'padding-right' => '1px', 126 | 'padding-bottom' => '1px', 127 | 'padding-left' => '1px', 128 | 'page-break-before' => '1', 129 | 'page-break-after' => '1', 130 | 'position' => '1', 131 | 'size' => '1', 132 | 'top' => '1px', 133 | 'text-indent' => '1px', 134 | 'text-align' => '1', 135 | 'text-decoration' => '1', 136 | 'letter-spacing' => '1px', 137 | 'word-spacing' => '1px', 138 | 'text-transform' => '1', 139 | 'white-space' => '1', 140 | 'vertical-align' => '1', 141 | 'visibility' => '1', 142 | 'width' => '1px', 143 | 'z-index' => '1', 144 | ), 145 | ) 146 | --SETTINGS-- 147 | discard_invalid_properties=true 148 | optimise_shorthands=0 149 | css_level='CSS1' -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/properties/css2.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 | background:1; 12 | background-color:1; 13 | background-image:1; 14 | background-repeat:1; 15 | background-attachment:1; 16 | background-position:1; 17 | border:1; 18 | border-top:1; 19 | border-right:1; 20 | border-bottom:1; 21 | border-left:1; 22 | border-color:1; 23 | border-top-color:1; 24 | border-bottom-color:1; 25 | border-left-color:1; 26 | border-right-color:1; 27 | border-style:1; 28 | border-top-style:1; 29 | border-right-style:1; 30 | border-left-style:1; 31 | border-bottom-style:1; 32 | border-width:1; 33 | border-top-width:1; 34 | border-right-width:1; 35 | border-left-width:1; 36 | border-bottom-width:1; 37 | border-collapse:1; 38 | border-spacing:1; 39 | bottom:1; 40 | caption-side:1; 41 | content:1; 42 | clear:1; 43 | clip:1; 44 | color:1; 45 | counter-reset:1; 46 | counter-increment:1; 47 | cursor:1; 48 | empty-cells:1; 49 | display:1; 50 | direction:1; 51 | float:1; 52 | font:1; 53 | font-family:1; 54 | font-style:1; 55 | font-variant:1; 56 | font-weight:1; 57 | font-stretch:1; 58 | font-size-adjust:1; 59 | font-size:1; 60 | height:1; 61 | left:1; 62 | line-height:1; 63 | list-style:1; 64 | list-style-type:1; 65 | list-style-image:1; 66 | list-style-position:1; 67 | margin:1; 68 | margin-top:1; 69 | margin-right:1; 70 | margin-bottom:1; 71 | margin-left:1; 72 | marks:1; 73 | marker-offset:1; 74 | max-height:1; 75 | max-width:1; 76 | min-height:1; 77 | min-width:1; 78 | overflow:1; 79 | orphans:1; 80 | outline:1; 81 | outline-width:1; 82 | outline-style:1; 83 | outline-color:1; 84 | padding:1; 85 | padding-top:1; 86 | padding-right:1; 87 | padding-bottom:1; 88 | padding-left:1; 89 | page-break-before:1; 90 | page-break-after:1; 91 | page-break-inside:1; 92 | page:1; 93 | position:1; 94 | quotes:1; 95 | right:1; 96 | size:1; 97 | speak-header:1; 98 | table-layout:1; 99 | top:1; 100 | text-indent:1; 101 | text-align:1; 102 | text-decoration:1; 103 | text-shadow:1; 104 | letter-spacing:1; 105 | word-spacing:1; 106 | text-transform:1; 107 | white-space:1; 108 | unicode-bidi:1; 109 | vertical-align:1; 110 | visibility:1; 111 | width:1; 112 | widows:1; 113 | z-index:1; 114 | volume:1; 115 | speak:1; 116 | pause:1; 117 | pause-before:1; 118 | pause-after:1; 119 | cue:1; 120 | cue-before:1; 121 | cue-after:1; 122 | play-during:1; 123 | azimuth:1; 124 | elevation:1; 125 | speech-rate:1; 126 | voice-family:1; 127 | pitch:1; 128 | pitch-range:1; 129 | stress:1; 130 | richness:1; 131 | speak-punctuation:1; 132 | speak-numeral:1; 133 | } 134 | --EXPECT-- 135 | array ( 136 | 'a' => 137 | array ( 138 | 'background' => '1px', 139 | 'background-color' => '#1', 140 | 'background-image' => '1', 141 | 'background-repeat' => '1', 142 | 'background-attachment' => '1', 143 | 'background-position' => '1px', 144 | 'border' => '1px', 145 | 'border-top' => '1px', 146 | 'border-right' => '1px', 147 | 'border-bottom' => '1px', 148 | 'border-left' => '1px', 149 | 'border-color' => '#1', 150 | 'border-top-color' => '#1', 151 | 'border-bottom-color' => '#1', 152 | 'border-left-color' => '#1', 153 | 'border-right-color' => '#1', 154 | 'border-style' => '1', 155 | 'border-top-style' => '1', 156 | 'border-right-style' => '1', 157 | 'border-left-style' => '1', 158 | 'border-bottom-style' => '1', 159 | 'border-width' => '1px', 160 | 'border-top-width' => '1px', 161 | 'border-right-width' => '1px', 162 | 'border-left-width' => '1px', 163 | 'border-bottom-width' => '1px', 164 | 'border-collapse' => '1', 165 | 'border-spacing' => '1px', 166 | 'bottom' => '1px', 167 | 'caption-side' => '1', 168 | 'content' => '1', 169 | 'clear' => '1', 170 | 'clip' => '1', 171 | 'color' => '#1', 172 | 'counter-reset' => '1', 173 | 'counter-increment' => '1', 174 | 'cursor' => '1', 175 | 'empty-cells' => '1', 176 | 'display' => '1', 177 | 'direction' => '1', 178 | 'float' => '1', 179 | 'font' => '1', 180 | 'font-family' => '1', 181 | 'font-style' => '1', 182 | 'font-variant' => '1', 183 | 'font-weight' => '1', 184 | 'font-stretch' => '1', 185 | 'font-size-adjust' => '1', 186 | 'font-size' => '1px', 187 | 'height' => '1px', 188 | 'left' => '1px', 189 | 'line-height' => '1', 190 | 'list-style' => '1', 191 | 'list-style-type' => '1', 192 | 'list-style-image' => '1', 193 | 'list-style-position' => '1', 194 | 'margin' => '1px', 195 | 'margin-top' => '1px', 196 | 'margin-right' => '1px', 197 | 'margin-bottom' => '1px', 198 | 'margin-left' => '1px', 199 | 'marks' => '1', 200 | 'marker-offset' => '1', 201 | 'max-height' => '1px', 202 | 'max-width' => '1px', 203 | 'min-height' => '1px', 204 | 'min-width' => '1px', 205 | 'overflow' => '1', 206 | 'orphans' => '1', 207 | 'outline' => '1px', 208 | 'outline-width' => '1px', 209 | 'outline-style' => '1', 210 | 'outline-color' => '#1', 211 | 'padding' => '1px', 212 | 'padding-top' => '1px', 213 | 'padding-right' => '1px', 214 | 'padding-bottom' => '1px', 215 | 'padding-left' => '1px', 216 | 'page-break-before' => '1', 217 | 'page-break-after' => '1', 218 | 'page-break-inside' => '1', 219 | 'page' => '1', 220 | 'position' => '1', 221 | 'quotes' => '1', 222 | 'right' => '1px', 223 | 'size' => '1', 224 | 'speak-header' => '1', 225 | 'table-layout' => '1', 226 | 'top' => '1px', 227 | 'text-indent' => '1px', 228 | 'text-align' => '1', 229 | 'text-decoration' => '1', 230 | 'text-shadow' => '1', 231 | 'letter-spacing' => '1px', 232 | 'word-spacing' => '1px', 233 | 'text-transform' => '1', 234 | 'white-space' => '1', 235 | 'unicode-bidi' => '1', 236 | 'vertical-align' => '1', 237 | 'visibility' => '1', 238 | 'width' => '1px', 239 | 'widows' => '1', 240 | 'z-index' => '1', 241 | 'volume' => '1', 242 | 'speak' => '1', 243 | 'pause' => '1', 244 | 'pause-before' => '1', 245 | 'pause-after' => '1', 246 | 'cue' => '1', 247 | 'cue-before' => '1', 248 | 'cue-after' => '1', 249 | 'play-during' => '1', 250 | 'azimuth' => '1', 251 | 'elevation' => '1', 252 | 'speech-rate' => '1', 253 | 'voice-family' => '1', 254 | 'pitch' => '1', 255 | 'pitch-range' => '1', 256 | 'stress' => '1', 257 | 'richness' => '1', 258 | 'speak-punctuation' => '1', 259 | 'speak-numeral' => '1', 260 | ), 261 | ) 262 | --SETTINGS-- 263 | discard_invalid_properties=true 264 | optimise_shorthands=0 265 | css_level='CSS2.0' -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/properties/css21.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 | background:1; 12 | background-color:1; 13 | background-image:1; 14 | background-repeat:1; 15 | background-attachment:1; 16 | background-position:1; 17 | border:1; 18 | border-top:1; 19 | border-right:1; 20 | border-bottom:1; 21 | border-left:1; 22 | border-color:1; 23 | border-top-color:1; 24 | border-bottom-color:1; 25 | border-left-color:1; 26 | border-right-color:1; 27 | border-style:1; 28 | border-top-style:1; 29 | border-right-style:1; 30 | border-left-style:1; 31 | border-bottom-style:1; 32 | border-width:1; 33 | border-top-width:1; 34 | border-right-width:1; 35 | border-left-width:1; 36 | border-bottom-width:1; 37 | border-collapse:1; 38 | border-spacing:1; 39 | bottom:1; 40 | caption-side:1; 41 | content:1; 42 | clear:1; 43 | clip:1; 44 | color:1; 45 | counter-reset:1; 46 | counter-increment:1; 47 | cursor:1; 48 | empty-cells:1; 49 | display:1; 50 | direction:1; 51 | float:1; 52 | font:1; 53 | font-family:1; 54 | font-style:1; 55 | font-variant:1; 56 | font-weight:1; 57 | font-stretch:1; 58 | font-size-adjust:1; 59 | font-size:1; 60 | height:1; 61 | left:1; 62 | line-height:1; 63 | list-style:1; 64 | list-style-type:1; 65 | list-style-image:1; 66 | list-style-position:1; 67 | margin:1; 68 | margin-top:1; 69 | margin-right:1; 70 | margin-bottom:1; 71 | margin-left:1; 72 | marks:1; 73 | marker-offset:1; 74 | max-height:1; 75 | max-width:1; 76 | min-height:1; 77 | min-width:1; 78 | overflow:1; 79 | orphans:1; 80 | outline:1; 81 | outline-width:1; 82 | outline-style:1; 83 | outline-color:1; 84 | padding:1; 85 | padding-top:1; 86 | padding-right:1; 87 | padding-bottom:1; 88 | padding-left:1; 89 | page-break-before:1; 90 | page-break-after:1; 91 | page-break-inside:1; 92 | page:1; 93 | position:1; 94 | quotes:1; 95 | right:1; 96 | size:1; 97 | speak-header:1; 98 | table-layout:1; 99 | top:1; 100 | text-indent:1; 101 | text-align:1; 102 | text-decoration:1; 103 | text-shadow:1; 104 | letter-spacing:1; 105 | word-spacing:1; 106 | text-transform:1; 107 | white-space:1; 108 | unicode-bidi:1; 109 | vertical-align:1; 110 | visibility:1; 111 | width:1; 112 | widows:1; 113 | z-index:1; 114 | volume:1; 115 | speak:1; 116 | pause:1; 117 | pause-before:1; 118 | pause-after:1; 119 | cue:1; 120 | cue-before:1; 121 | cue-after:1; 122 | play-during:1; 123 | azimuth:1; 124 | elevation:1; 125 | speech-rate:1; 126 | voice-family:1; 127 | pitch:1; 128 | pitch-range:1; 129 | stress:1; 130 | richness:1; 131 | speak-punctuation:1; 132 | speak-numeral:1; 133 | } 134 | --EXPECT-- 135 | array ( 136 | 'a' => 137 | array ( 138 | 'background' => '1px', 139 | 'background-color' => '#1', 140 | 'background-image' => '1', 141 | 'background-repeat' => '1', 142 | 'background-attachment' => '1', 143 | 'background-position' => '1px', 144 | 'border' => '1px', 145 | 'border-top' => '1px', 146 | 'border-right' => '1px', 147 | 'border-bottom' => '1px', 148 | 'border-left' => '1px', 149 | 'border-color' => '#1', 150 | 'border-top-color' => '#1', 151 | 'border-bottom-color' => '#1', 152 | 'border-left-color' => '#1', 153 | 'border-right-color' => '#1', 154 | 'border-style' => '1', 155 | 'border-top-style' => '1', 156 | 'border-right-style' => '1', 157 | 'border-left-style' => '1', 158 | 'border-bottom-style' => '1', 159 | 'border-width' => '1px', 160 | 'border-top-width' => '1px', 161 | 'border-right-width' => '1px', 162 | 'border-left-width' => '1px', 163 | 'border-bottom-width' => '1px', 164 | 'border-collapse' => '1', 165 | 'border-spacing' => '1px', 166 | 'bottom' => '1px', 167 | 'caption-side' => '1', 168 | 'content' => '1', 169 | 'clear' => '1', 170 | 'clip' => '1', 171 | 'color' => '#1', 172 | 'counter-reset' => '1', 173 | 'counter-increment' => '1', 174 | 'cursor' => '1', 175 | 'empty-cells' => '1', 176 | 'display' => '1', 177 | 'direction' => '1', 178 | 'float' => '1', 179 | 'font' => '1', 180 | 'font-family' => '1', 181 | 'font-style' => '1', 182 | 'font-variant' => '1', 183 | 'font-weight' => '1', 184 | 'font-size' => '1px', 185 | 'height' => '1px', 186 | 'left' => '1px', 187 | 'line-height' => '1', 188 | 'list-style' => '1', 189 | 'list-style-type' => '1', 190 | 'list-style-image' => '1', 191 | 'list-style-position' => '1', 192 | 'margin' => '1px', 193 | 'margin-top' => '1px', 194 | 'margin-right' => '1px', 195 | 'margin-bottom' => '1px', 196 | 'margin-left' => '1px', 197 | 'max-height' => '1px', 198 | 'max-width' => '1px', 199 | 'min-height' => '1px', 200 | 'min-width' => '1px', 201 | 'overflow' => '1', 202 | 'orphans' => '1', 203 | 'outline' => '1px', 204 | 'outline-width' => '1px', 205 | 'outline-style' => '1', 206 | 'outline-color' => '#1', 207 | 'padding' => '1px', 208 | 'padding-top' => '1px', 209 | 'padding-right' => '1px', 210 | 'padding-bottom' => '1px', 211 | 'padding-left' => '1px', 212 | 'page-break-before' => '1', 213 | 'page-break-after' => '1', 214 | 'page-break-inside' => '1', 215 | 'position' => '1', 216 | 'quotes' => '1', 217 | 'right' => '1px', 218 | 'speak-header' => '1', 219 | 'table-layout' => '1', 220 | 'top' => '1px', 221 | 'text-indent' => '1px', 222 | 'text-align' => '1', 223 | 'text-decoration' => '1', 224 | 'letter-spacing' => '1px', 225 | 'word-spacing' => '1px', 226 | 'text-transform' => '1', 227 | 'white-space' => '1', 228 | 'unicode-bidi' => '1', 229 | 'vertical-align' => '1', 230 | 'visibility' => '1', 231 | 'width' => '1px', 232 | 'widows' => '1', 233 | 'z-index' => '1', 234 | 'volume' => '1', 235 | 'speak' => '1', 236 | 'pause' => '1', 237 | 'pause-before' => '1', 238 | 'pause-after' => '1', 239 | 'cue' => '1', 240 | 'cue-before' => '1', 241 | 'cue-after' => '1', 242 | 'play-during' => '1', 243 | 'azimuth' => '1', 244 | 'elevation' => '1', 245 | 'speech-rate' => '1', 246 | 'voice-family' => '1', 247 | 'pitch' => '1', 248 | 'pitch-range' => '1', 249 | 'stress' => '1', 250 | 'richness' => '1', 251 | 'speak-punctuation' => '1', 252 | 'speak-numeral' => '1', 253 | ), 254 | ) 255 | --SETTINGS-- 256 | discard_invalid_properties=true 257 | optimise_shorthands=0 258 | css_level='CSS2.1' -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | ) -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/selectors/type.csst: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Type selector 3 | --CSS-- 4 | a {display: inherit;} 5 | --EXPECT-- 6 | array ( 7 | 'a' => 8 | array ( 9 | 'display' => 'inherit', 10 | ), 11 | ) 12 | -------------------------------------------------------------------------------- /csstidy/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 | ) -------------------------------------------------------------------------------- /csstidy/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 | ) -------------------------------------------------------------------------------- /csstidy/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 | ) -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 | --EXPECT-- 8 | array ( 9 | '@font-face_1' => 10 | array ( 11 | 'src' => 'url(fonts/share.ttf) format("truetype")', 12 | ), 13 | ) 14 | --SETTINGS-- 15 | optimise_shorthands=0 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/special/cursor.csst: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | @font-face 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_0' => 'hand', 14 | ), 15 | ) -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/csst/special/font-face.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 | --EXPECT-- 18 | array ( 19 | '@font-face_1' => 20 | array ( 21 | 'font-family' => 'GillSans', 22 | 'src' => 'url(/generic/fonts/GillSansLightC.otf) format("opentype")', 23 | 'font-style' => 'normal', 24 | 'font-weight' => '400', 25 | ), 26 | '@font-face_2' => 27 | array ( 28 | 'font-family' => 'GillSans', 29 | 'src' => 'url(/generic/fonts/GillSansC.otf) format("opentype")', 30 | 'font-style' => 'normal', 31 | 'font-weight' => '700', 32 | ), 33 | ) 34 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | --EXPECT-- 7 | array ( 8 | 'a' => 9 | array ( 10 | 'font' => '10px Arial,sans-serif', 11 | ), 12 | 'b' => 13 | array ( 14 | 'font' => '10px "Arial","Trebuchet MS","sans-serif"', 15 | ), 16 | ) 17 | --SETTINGS-- 18 | optimise_shorthands=2 -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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 -------------------------------------------------------------------------------- /csstidy/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/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 | -------------------------------------------------------------------------------- /csstidy/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 | -------------------------------------------------------------------------------- /csstidy/testing/unit-tests/test.csst.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 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Prefix Spawner 6 | 7 | 89 | 90 |
91 |

CSS Prefix Spawner

92 |

You code for one vendor, we spawn the rest!

93 |

Tired of having to repeat all vendor prefixes over and over again just for getting your cross-browser dosis of CSS 3 eyecandy? Bother no more, my friend! Paste your single-vendor CSS or point to the file and we will automatically add the rest.

94 |
95 | set_cfg('remove_bslash', false); 102 | $css->set_cfg('compress_colors', false); 103 | $css->set_cfg('compress_font-weight', false); 104 | $css->set_cfg('lowercase_s', false); 105 | $css->set_cfg('optimise_shorthands', 0); 106 | $css->set_cfg('remove_last_;', false); 107 | $css->set_cfg('case_properties', 0); 108 | $css->set_cfg('sort_properties', false); 109 | $css->set_cfg('sort_selectors', false); 110 | $css->set_cfg('merge_selectors', 0); 111 | $css->set_cfg('discard_invalid_properties', false); 112 | $css->set_cfg('css_level', 'CSS3'); 113 | $css->set_cfg('timestamp', false); 114 | $css->load_template('csstidy/template1.tpl', true); 115 | if(isset($_POST['submit'])) 116 | { 117 | if($source == '' && isset($_POST['url']) && $_POST['url'] != '') 118 | { 119 | $input_url = $_POST['url']; 120 | $source = @file_get_contents($input_url); 121 | if($source == '') $input_url = ''; 122 | } 123 | if($source == '' && isset($_POST['css']) && $_POST['css'] != '') 124 | { 125 | $source = $textarea_css = $_POST['css']; 126 | } 127 | if($source != '') 128 | { 129 | $css->parse($source); 130 | function spawn_prefixes() 131 | { 132 | global $css; 133 | $vendor_prefixes = array( 134 | '-webkit-', 135 | '-moz-', 136 | '-o-', 137 | '-ms-' 138 | ); 139 | $property_regex = '/('.implode('|',$vendor_prefixes).')([a-z\-]+)/'; 140 | $value_regex = '/('.implode('|',$vendor_prefixes).')(.+)/i'; 141 | array_push($vendor_prefixes,''); 142 | 143 | foreach($css->css as $media => $selectors) 144 | { 145 | foreach($selectors as $selector => $commands) 146 | { 147 | foreach($commands as $property => $value) 148 | { 149 | if(preg_match($property_regex, $property, $matches) > 0) 150 | { 151 | foreach($vendor_prefixes as $vendor_prefix) 152 | { 153 | if(!array_key_exists($vendor_prefix.$matches[2], $commands)) 154 | { 155 | $css->css_add_property($media,$selector,$vendor_prefix.$matches[2],$value); 156 | #$commands[$vendor_prefix.$matches[2]] = $value; 157 | } 158 | } 159 | } 160 | if(preg_match($value_regex, $value, $matches) > 0) 161 | { 162 | foreach($vendor_prefixes as $vendor_prefix) 163 | { 164 | if(!in_array($vendor_prefix.$matches[2], $commands)) 165 | { 166 | $css->css_add_property($media,$selector,$property,$vendor_prefix.$matches[2]); 167 | #$commands[$property] = $vendor_prefix.$matches[2]; 168 | } 169 | } 170 | } 171 | } 172 | } 173 | } 174 | } 175 | 176 | spawn_prefixes(); 177 | echo '
179 |

'; 180 | } 181 | } 182 | echo '
184 |

or

185 |
'; 187 | ?> 188 | 189 |
190 | Schepp © 2011 Christian "Schepp" Schaefer / @derSchepp 191 |
192 | 206 | 207 | -------------------------------------------------------------------------------- /schepp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Schepp/CSS-Prefix-Spawner/921866e469c68eceb4f8edc1ad1c0e84dc6a68a8/schepp.jpg -------------------------------------------------------------------------------- /test.css: -------------------------------------------------------------------------------- 1 | /* CSS Document */ 2 | h1 { 3 | font-size: 2em; 4 | -webkit-transform: rotate(90deg); 5 | background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6 */ 6 | } 7 | 8 | --------------------------------------------------------------------------------