View Single Post
Old 01-01-2021, 09:59 AM   #20
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by DiapDealer View Post
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>

Last edited by Turtle91; 01-01-2021 at 10:01 AM.
Turtle91 is offline   Reply With Quote