gehuangyi20 / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

Enhancement: Allow for PNG stretch sizingMethod #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At present IE7.js only uses the AlphaImageLoader crop sizingMethod (for CSS
background images), however there are situations where you would want to
use stretch. For example when the background is just a repeated semi
transparent pixel.

You *could* make the assumption that any background that isn't set to
no-repeat should use stretch rather than crop. Or alternatively, allow for
an extra flag in the file name, something like -stretch-trans.png, that
will trigger stretch rather than crop.

What do you think?

Original issue reported on code.google.com by jack.sle...@gmail.com on 25 Jan 2008 at 6:41

GoogleCodeExporter commented 9 years ago
Mmm. It sounds like a good idea. Let me post it on the discussion group to see 
what
others think.

Original comment by dean.edw...@gmail.com on 26 Jan 2008 at 8:52

GoogleCodeExporter commented 9 years ago
This sounds like an excellent idea. I've made workarounds for this before by
stretching bg images on server side. A solution within IE7 would be wonderful.
Perhaps, though, it's best to also implement a similar file name ending 
criteria as
Jack proposes.

My approval,
/C#

Original comment by svar...@gmail.com on 26 Jan 2008 at 9:09

GoogleCodeExporter commented 9 years ago
Good idea!

Original comment by alexx.sl...@gmail.com on 26 Jan 2008 at 9:26

GoogleCodeExporter commented 9 years ago
+1

Original comment by mar.orly...@gmail.com on 4 Feb 2008 at 4:57

GoogleCodeExporter commented 9 years ago
Changing this to "enhancement". I will try to add this functionality in a 
future release.

Original comment by dean.edw...@gmail.com on 4 Feb 2008 at 6:31

GoogleCodeExporter commented 9 years ago
One thought:
If background-attachment:repeat-x is specified, could the bg be stretched
horizontally only, retaining the height?
/C#

Original comment by svar...@gmail.com on 7 Feb 2008 at 3:09

GoogleCodeExporter commented 9 years ago
@svarven,
No unfortunately you can't do that, AlphaImageLoader is fairly limited, it's 
stretch
across the entire element or don't stretch at all I'm afraid.
http://msdn2.microsoft.com/en-us/library/ms532920(VS.85).aspx

Original comment by jack.sle...@gmail.com on 7 Feb 2008 at 3:16

GoogleCodeExporter commented 9 years ago
Sorry, I just realised I made a mistake. I meant "scale", not "stretch".

Original comment by jack.sle...@gmail.com on 14 Feb 2008 at 8:13

GoogleCodeExporter commented 9 years ago
Unawared, I opened a new thread regarding the same suggestion.

How difficult is it to implement this idea?

Original comment by adepa...@gmail.com on 9 Apr 2008 at 1:27

GoogleCodeExporter commented 9 years ago
it will be great for ie8.js

Original comment by officialstupid on 4 Aug 2009 at 5:10

GoogleCodeExporter commented 9 years ago
OK. This is how it will work in the next release. If you want the image to crop 
(how it 
currently works) then use no-repeat:

e.g. background-image: url(my-trans.png) no-repeat;

If you want the image to stretch (to imitate tiling) then omit the no-repeat 
flag.

This will apply in version 2.1.

Original comment by dean.edw...@gmail.com on 10 Feb 2010 at 10:20