Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2016-01-25 (9 months ago) | Not enough user ratings | Total: 197 | All time: 7,849 This week: 1,105 |
Version | License | PHP version | Categories | |||
css-math 1.0 | Custom (specified... | 5.0 | HTML, PHP 5, Templates, Math |
Description | Author | |
This class can replace variables and math expressions in CSS. |
While you can do maths with CSS, sometimes, you just need to go that little further than what normal CSS allows? Ever thought it would be nice to have the option to say: I have this variable, defining a base width of an object, and make others multiples of that? What if you have a variable called "$conf['base_width']? and you could do: .classname1 {width: [base_width]px ; } .classname2 {width: [base_width * 2]px } or use any other variable, together with + - * /, and even floor float values coming out of the calc by prepending the variable name with ~, still allowing any regular CSS math? This may be for you. It's short, it's simple, and opens up dynamic css generation for those special cases where you just need to adjust the class definition to your needs. Just call CSS::setConf($conf), to set the variables to use, and then and $css = CSS::load("myfile") ; |
Files |
File | Role | Description |
---|---|---|
CSS.php | Class | CSS Math / Load |
css.txt | Doc. | CSS Math / Load Description |
Example.txt | Doc. | Examples |
License.txt | Lic. | License CC 4.0 BY-SA |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.