Quote:
Originally Posted by DiapDealer
Couldn't we incorporate (with his permission, of course) wrCisco's python code into Sigili's python3lib and use the c++ embedded python interface to access it? Thus skipping the need to use PyQt at all for the gui? I'm not certain what else the existing plugin might provide, but even if we don't bring it entirely "in house" (eliminating the need for the third-party plugin altogether), surely we can come up with an interface to the portions we DO need to access via embedded python interpreter while still exposing those same absorbed parts to plugins via the plugin framework? Thus avoiding duplication.
|
There are 2 of wrCisco's plugins that I use regularly - each is a side of the same coin: cssRemoveUnusedSelectors and cssUndefinedClasses. The first, as you know, removes CSS selectors that aren't used in the HTML, the second removes class references in the HTML that don't have a corresponding style in the CSS.
If wrCisco doesn't object, it seems like incorporating BOTH of those plugins into the same Sigil function (with all the appropriate user selections) would make sense.
As a
very minor nit - the Remove Unused Selectors does not combine leftover CSS.
Spoiler:
eg
Code:
sup, sub {font-size:0.675em}
sup {vertical-align: 35%}
sub {vertical-align: -20%}
<p>Today is the 1<sup>st</sup> day of 2021!!!!</p>
becomes:
Code:
sup {font-size:0.675em}
sup {vertical-align: 35%}
<p>Today is the 1<sup>st</sup> day of 2021!!!!</p>
when, ideally, it should be:
Code:
sup {font-size:0.675em; vertical-align: 35%}
<p>Today is the 1<sup>st</sup> day of 2021!!!!</p>