djfm / cssin Goto Github PK
View Code? Open in Web Editor NEWA CSS inliner in PHP that works pretty well
A CSS inliner in PHP that works pretty well
Hello,
CSSIn uses CSSTidy which is almost ten year-old (see http://csstidy.sourceforge.net, last version 1.3 from 2007).
It is a problem with PHP7, since a lot of "deprecated" message appears.
Hopefully, development continued here: https://github.com/Cerdic/CSSTidy
Can you update to latest CSSTidy ? Thanks.
As you can see
InlineCSS() takes 73%(8 sec) of all my script
InlineCSS() calls
1)parseCSS(41.99 %)
2)simple_dom_data->find(25 %) (may be http://ru2.php.net/manual/en/book.dom.php can be used ?)
parseCSS() calls csstidy->parse(38.67%)
csstidy->is_token is called 33084 times !
inline_css/vendor/csstidy/class.csstidy.php[878]
The problem is
cssin_helper.php(127): csstidy->parse('@charset "UTF-8...')
I'd like to use this with CiviCRM, but the license for cssin is too vague. Have you considered switching to a GPL-compatible license?
FSF approved licenses: https://gnu.org/licenses/license-list.html#SoftwareLicenses
OSI approved licenses: http://opensource.org/licenses/alphabetical
The getCSS function says it caches the files but I believe it needs to refer to self::cssFiles rather than just $cssFiles for this to be true - it seems to be just using a locally scoped non-static var
if(!isset($cssFiles[$url]))
{
$cssFiles[$url] = file_get_contents($url);
}
return $cssFiles[$url];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.