Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature: Customized feature-based builds #59
Would be great to allow users to select a set of features (box-shadow, gradients, border-image, etc.) which they want to use and produce a customized build with only the code necessary for those features included.
Requested in forum posting http://css3pie.com/forum/viewtopic.php?f=4&t=90
The biggest issue is that saying "I only need border-radius" sounds very simple but that's actually misleading. The real question is what visual elements does your element have, that would have to be re-rendered when border-radius is in play. Does your element have a background color or image? If so, then the background needs to be re-rendered entirely by PIE so all that background code needs to come in. Does your element have a border? If so, all the border parsing and rendering code has to be there.
With that in mind, you have two options:
Option 1 would be very difficult to maintain, and also difficult to use.
Option 2 is doable, but once you figure out all the possible dependencies there's actually not a whole lot that can be cut out. You could probably cut out the custom parsing code for -pie-background, and the gradient rendering code, and box-shadow/border-image code. But even all of that doesn't add up to a very large percentage of the total code, so the potential benefit doesn't (or at least hasn't yet) outweighed the cost.
I'm totally in favor of someone else taking a stab at trying it out -- it's very possible that I'm wrong about the potential size savings -- but this isn't something that I plan to tackle myself anytime soon.