JS against CSS ?

28 views
Skip to first unread message

y-nk

unread,
Oct 3, 2011, 12:57:14 PM10/3/11
to SWFFit
I was curious about why you chose to write swffit against pure css
solution.

I'm currently asking this because i was thinking about using swffit
and then asked myself about how hard it was to make it work with some
css rules, and went to "what were his intents ?"

Thanks a lot, you'll make me sleep tonight

Miller Medeiros

unread,
Oct 3, 2011, 1:35:25 PM10/3/11
to swf...@googlegroups.com
Here is an implementation using only CSS: https://github.com/millermedeiros/swffit/blob/swffit3.0/swffit/tests/test-noJS.html

it uses min-width and max-width to limit the size. The drawback is that it doesn't work on IE 6-7.. If I remember correctly IE7 have issues while setting min-height on Object Elements and IE doesn't support min-height. at the time I coded swffit other browsers also had issues, see swffit source code for comments about bug fixes.

please note that swffit isn't being maintained anymore: http://www.google.com/url?sa=D&q=http://groups.google.com/group/swffit/browse_thread/thread/5e019d8a1dd47dce&usg=AFQjCNHV0E4heOcXXIr0knE1DNNcazc9Dw

> --
> You received this message because you are subscribed to the Google Groups "SWFFit" group.
> To post to this group, send email to swf...@googlegroups.com.
> To unsubscribe from this group, send email to swffit+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/swffit?hl=en.
>

y-nk

unread,
Oct 3, 2011, 1:50:42 PM10/3/11
to SWFFit
Thanks for the quick answer ! That's good to know !

FYI, i think i have succeeded in doing the ie7 compatibility (while i
was waiting for your answer, i couldn't resist to try my own !) with
adding a conditionnal commentary with a <style> and 2 lines of ie-ish
javascript-in-css lines like those :

html, body
{
overflow-x:expression(document.body.clientWidth > 960 ?
"hidden" : "auto");
overflow-y:expression(document.body.clientHeight > 600 ?
"hidden" : "auto");
}

#flash
{
width:expression(document.body.clientWidth > 960 ? "100%" :
"960px" );
height:expression(document.body.clientHeight > 600 ? "100%" :
"600px" );
}

As you figured it out well, you can't use any min-height stylish css
rule in ie7 natively...

A demo can be found there : http://tmp.martian-arts.org/grgr/



On 3 oct, 19:35, Miller Medeiros <lis...@millermedeiros.com> wrote:
> Here is an implementation using only CSS:  https://github.com/millermedeiros/swffit/blob/swffit3.0/swffit/tests/...
>
> it uses min-width and max-width to limit the size. The drawback is that it doesn't work on IE 6-7.. If I remember correctly IE7 have issues while setting min-height on Object Elements and IE doesn't support min-height. at the time I coded swffit other browsers also had issues, see swffit source code for comments about bug fixes.
>
> please note that swffit isn't being maintained anymore:http://www.google.com/url?sa=D&q=http://groups.google.com/group/swffi...
Reply all
Reply to author
Forward
0 new messages