New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Customized feature-based builds #59

Open
lojjic opened this Issue Aug 7, 2010 · 4 comments

Comments

Projects
None yet
4 participants
@lojjic
Owner

lojjic commented Aug 7, 2010

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

@uglymunky

This comment has been minimized.

Show comment
Hide comment
@uglymunky

uglymunky Dec 20, 2010

This would be awesome. I currently only need rounded corners and there doesn't seem to be any other .htc solution that implements it well.

uglymunky commented Dec 20, 2010

This would be awesome. I currently only need rounded corners and there doesn't seem to be any other .htc solution that implements it well.

@OxyFuse

This comment has been minimized.

Show comment
Hide comment
@OxyFuse

OxyFuse Jan 3, 2011

"border-radius" is the only feature I needed and having this would be great.

Here's another forum post for this request: http://css3pie.com/forum/viewtopic.php?f=4&t=246

OxyFuse commented Jan 3, 2011

"border-radius" is the only feature I needed and having this would be great.

Here's another forum post for this request: http://css3pie.com/forum/viewtopic.php?f=4&t=246

@nickcolley

This comment has been minimized.

Show comment
Hide comment
@nickcolley

nickcolley Oct 28, 2014

Is there a simple way to achieve this?

nickcolley commented Oct 28, 2014

Is there a simple way to achieve this?

@lojjic

This comment has been minimized.

Show comment
Hide comment
@lojjic

lojjic Oct 28, 2014

Owner

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:

  1. Go more granular, so you'd have a "border-radius plus background only" build and a "border-radius plus border only" build and a "border-radius plus background and border" build, etc.
    or
  2. Make sure that the "border-radius only" build includes all code for all visual elements that might need to be rendered when border-radius is in play, or

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.

Owner

lojjic commented Oct 28, 2014

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:

  1. Go more granular, so you'd have a "border-radius plus background only" build and a "border-radius plus border only" build and a "border-radius plus background and border" build, etc.
    or
  2. Make sure that the "border-radius only" build includes all code for all visual elements that might need to be rendered when border-radius is in play, or

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment