Re: [css-d] css or javascript hacks for firefox

2009-05-30 Thread Tim Snadden

On 30/05/2009, at 3:00 PM, Jenni Beard wrote:
>   So, now I feel like I have to add a
> hack for Chrome

The vast majority of the time the only browser that requires special  
rules and hacks is Internet Explorer. If you find yourself reaching  
for hacks to make things look consistent in other major browsers then  
their is likely to be a problem with how you've approached your markup  
or CSS. I know it can be frustrating, but hacking things this way and  
that is not the answer!

Cheers, Tim 
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-30 Thread cr.vegelin
Jenny,

See: http://www.w3schools.com/browsers/browsers_stats.asp

HTH, Cor

- Original Message - 
From: "Jenni Beard" 
To: 
Cc: 
Sent: Saturday, May 30, 2009 4:42 AM
Subject: Re: [css-d] css or javascript hacks for firefox


>I don't know any IE7 hacks, nor have I seen any. Now, IE6, THAT'S another
> story!  That browser is/was SO annoying.
>
> Anyone know what % of people are still using IE6 anyway?  Last stats I 
> heard
> were from almost 2 yrs ago, that claimed almost 25% of internet users...
>
> Thanks!
>
> Jenni
>
> -Original Message-
> From: David Laakso [mailto:da...@chelseacreekstudio.com]
> Sent: Friday, May 29, 2009 8:47 PM
> To: Jenni Beard
> Cc: css-d@lists.css-discuss.org
> Subject: Re: [css-d] css or javascript hacks for firefox
>
> Jenni Beard wrote:
>> Generally these days I code for IE7, then check out Mozilla and
>> Opera (and am getting ready to embark on Google Chrome, alas!), then add
>> hacks where needed since these all seem to render most CSS layouts a bit
>> differently.
>>
>
>
>
>
> Code to IE/7???  I don't think so. Code to compliant browsers. Hack
> non-compliant browsers: IE/6 and IE/7.
>
> __
> css-discuss [cs...@lists.css-discuss.org]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
> 


__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread Philippe Wittenbergh
On May 30, 2009, at 12:00 PM, Jenni Beard wrote:

> Hmm, I've found that often what works in Mozilla does not work in  
> Opera or
> vice-versa, now I just finally broke down and downloaded Chrome, and  
> all
> works great in IE7, Mozilla3, Opera9.64, but the navigation is  
> skewed to the
> left by about 30 or 40 px in Chrome.  So, now I feel like I have to  
> add a
> hack for Chrome--anyone have one???  Why oh why won't the browsers  
> all see
> it the same way?!?!
>
> http://fossilbyte.com/1/template.html
>
> Thanks!!!

Hmm. Looking at your page in Safari 3.04, Safari 4b, Firefox 3.5b4,  
Chrome 2.0 (windows), Chomium-Mac nightly build and IE 8 : all those  
browsers display your navigation bar 50px more to the left than what  
Firefox 3.0.10 does (or Opera 10.a)

You use a silly hack (assuming to do something in Firefox 3.0.x):
html[xmlns^=""]:not([lang*=""]) #left-col:not([id="#left-col"]) { / 
*SiteStyle1.css (line 152)*/
margin-top:0;
padding-left:50px;
}
For some obscure reason, Fx 3 parses that somehow; it shouldn't, I  
think. The # mark in the selector is a red flag. Not sure what's up  
with Opera.
Why don't you first code your stylesheet for aforementioned browsers,  
then adjust - if needed- for old crappy browsers like IE 7 ?

And BTW - IE 8 shows the  in that navigation bar with a white  
background (coming from the spryMenu stylesheet). Possibly some poor  
browser detection in the SpryMenu JS.

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread David Laakso
Jenni Beard wrote:
> I don't know any IE7 hacks, nor have I seen any. Now, IE6, THAT'S another
> story!  That browser is/was SO annoying.
>
> Anyone know what % of people are still using IE6 anyway?  Last stats I heard
> were from almost 2 yrs ago, that claimed almost 25% of internet users...
>
> Thanks!
>
> Jenni
>
>   



Regardless of the IE/6 market share; and, regardless of the IE/7 market 
share; and, regardless of whether, or not, you know any IE/7 hacks is 
not the point (I was trying to make).
I am simply saying code to compliant browsers. IE/7 is not among them.
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread Jenni Beard
Hmm, I've found that often what works in Mozilla does not work in Opera or
vice-versa, now I just finally broke down and downloaded Chrome, and all
works great in IE7, Mozilla3, Opera9.64, but the navigation is skewed to the
left by about 30 or 40 px in Chrome.  So, now I feel like I have to add a
hack for Chrome--anyone have one???  Why oh why won't the browsers all see
it the same way?!?!

http://fossilbyte.com/1/template.html 

Thanks!!!

Jenni

PS--I am using a PC, don't know if on Chrome that makes a difference...

-Original Message-
From: css-d-boun...@lists.css-discuss.org
[mailto:css-d-boun...@lists.css-discuss.org] On Behalf Of Tim Snadden
Sent: Friday, May 29, 2009 8:51 PM
To: Css-Discussion Group
Subject: Re: [css-d] css or javascript hacks for firefox


On 30/05/2009, at 9:47 AM, Jenni Beard wrote:
>  Generally these days I code for IE7, then check out Mozilla and
> Opera

With respect I would suggest a different approach to the line above.  
If you write standards compliant markup and CSS you will rarely have  
to make significant changes to make things work in recent versions of  
Firefox, Safari, Opera and Chrome unless you are doing something  
particularly complicated.

IE is the 'problem child' so I always check it *last* and ensure that  
none of the nonsense rules required to make IE work make it into the  
main stylesheet. That way I know I'm working on a solid foundation and  
my thinking hasn't been polluted by IE's incorrect rendering.

As far as hacking for versions of firefox etc. goes... I generally  
resort to javascript at that point by adding a class to  (e.g.  
'lessthanff3') and hanging CSS rules off that.

YMMV, different strokes etc.

Cheers, Tim



__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread Jenni Beard
I don't know any IE7 hacks, nor have I seen any. Now, IE6, THAT'S another
story!  That browser is/was SO annoying.

Anyone know what % of people are still using IE6 anyway?  Last stats I heard
were from almost 2 yrs ago, that claimed almost 25% of internet users...

Thanks!

Jenni

-Original Message-
From: David Laakso [mailto:da...@chelseacreekstudio.com] 
Sent: Friday, May 29, 2009 8:47 PM
To: Jenni Beard
Cc: css-d@lists.css-discuss.org
Subject: Re: [css-d] css or javascript hacks for firefox

Jenni Beard wrote:
> Generally these days I code for IE7, then check out Mozilla and
> Opera (and am getting ready to embark on Google Chrome, alas!), then add
> hacks where needed since these all seem to render most CSS layouts a bit
> differently.
>   




Code to IE/7???  I don't think so. Code to compliant browsers. Hack 
non-compliant browsers: IE/6 and IE/7.

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread Tim Snadden

On 30/05/2009, at 9:47 AM, Jenni Beard wrote:
>  Generally these days I code for IE7, then check out Mozilla and
> Opera

With respect I would suggest a different approach to the line above.  
If you write standards compliant markup and CSS you will rarely have  
to make significant changes to make things work in recent versions of  
Firefox, Safari, Opera and Chrome unless you are doing something  
particularly complicated.

IE is the 'problem child' so I always check it *last* and ensure that  
none of the nonsense rules required to make IE work make it into the  
main stylesheet. That way I know I'm working on a solid foundation and  
my thinking hasn't been polluted by IE's incorrect rendering.

As far as hacking for versions of firefox etc. goes... I generally  
resort to javascript at that point by adding a class to  (e.g.  
'lessthanff3') and hanging CSS rules off that.

YMMV, different strokes etc.

Cheers, Tim



__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-29 Thread David Laakso
Jenni Beard wrote:
> Generally these days I code for IE7, then check out Mozilla and
> Opera (and am getting ready to embark on Google Chrome, alas!), then add
> hacks where needed since these all seem to render most CSS layouts a bit
> differently.
>   




Code to IE/7???  I don't think so. Code to compliant browsers. Hack 
non-compliant browsers: IE/6 and IE/7.
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] css or javascript hacks for firefox

2009-05-29 Thread Jenni Beard
“then it is also present in Safari (3.2.2). Hacking Firefox 3 is 
dangerous since particular bugs have been fixed with this version but 
the hacks are more specific (targeting or filtering) to Gecko engine 
versions. There is many of them. Anyway how can you hack a fix for this
bug?”

I’m no expert, but have been working with CSS for awhile now.  I’ve found it
particularly difficult when trying to make a site layout work for all
browsers.  Generally these days I code for IE7, then check out Mozilla and
Opera (and am getting ready to embark on Google Chrome, alas!), then add
hacks where needed since these all seem to render most CSS layouts a bit
differently.

Here’s an example of the one I found and have been using for awhile for
Mozilla 3+:
---
#content { 
background-image: url(../images/content.jpg);
background-repeat: no-repeat;
overflow: visible;
width: 824px;
float: right;
margin-top: 20px;   
color: #40352F;
}

  /* First hide an element in Firefox 2 and higher */
  html[xmlns^=""]:not([lang*=""])  [id=" #content"] 
   {margin-top: 20px; }
   
  /* Now reverse the above in Firefox 3 and higher */
  html[xmlns^=""]:not([lang*=""]) #content:not([id="#content"]) 
   {margin-top: 0px; margin-left: -50px;}


Hope this helps!


     Jenni Beard
 The Web Lotus   
Web Design, Development, and Marketing
  www.TheWebLotus.com
    je...@theweblotus.com 

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-18 Thread Philippe Wittenbergh

On May 18, 2009, at 3:26 PM, Alan Gresley wrote:

> Interesting. The hack you have is.
>
> @-moz-document url-prefix() {
> :root>body #login_form label input {margin-top: -1.3em;}
> :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
> #login_form label input { margin-top: 0;}
> }

As I posted in the same thread, that second selector is overly  
complicated.



> Does this hack separate Firefox 3.0.1 ~ 3.0.10 from Firefox 3.5b4?

Yes.

> I can
>  not test. This part of the hack,
>
> |*:not(|
>
>
> causes a parsing error. Is this fixed in Firefox 3.5b4?
Not a parse error, a warning that nth-child is not supported in Gecko  
1.9.0.

As mentioned earlier, the bug you're talking about is FIXED in Gecko  
1.9.1+ (fx 3.5b4), as clearly marked in the bug reports you link to.


Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-18 Thread Gunlaug Sørtun
Alan Gresley wrote:

> This part of the hack,
> 
> |*:not(|
> 
> causes a parsing error. Is this fixed in Firefox 3.5b4? I must admit 
> that your hackery (possibly combining structural pseudo class support
> and parsing errors) is hackier than mine. :-)

I'm not surprised :-)
However, keep in mind that I only test hacks to check progress and see
what one can get away with in various browser versions. I do not use
hacks for anything serious.

Also: validity is not an issue (for me) in such test-stylesheets.

> 
>  Does Firefox 3.5b4 now send those images above the text line?

Yes.

> The same test case but with your hack.
> 
> 

No.

> 
> 
> 

I usually don't check what's on such bug lists unless I run into a
specific bug in a real-world case, so I have no idea what the status is
for those bugs in latest versions of affected browsers.

---

Those who utilize bugs in relatively new browsers for anything serious,
will have to check and update every time a new version is released --
not only the browser they try to target but nearly all browsers. There
are 4 major engines one has to keep track of, and one has to check at
least the last 2-3 generations/versions of each. There are also between
25 and 30 individual browsers that use these 4 engines, and many lag one
or more generations/versions behind the major browser on each engine.

Staying on top of all these while trying to target/hack individual
versions, should keep any web developer busy. If one wants to use ones
time for something else, one better not enter such a hacking-race in the
first place.

---

Testing browsers, with hacks and all, in ways/places where it doesn't
hurt no matter the outcome, is of course an entirely different matter.

That's what I do...

...and I focus on engine versions, not individual, "named", browsers.
For each major or minor modification to my browser targeting stylesheet...

...I also test in at least two dozen browsers with engines that may be
affected because they share bugs and/or proprietary selectors, and a
dozen or so more that simply may not be "shielded" well enough.

The need to provide extra shielding for non-targeted browsers, is the
main reason my selector-chains are so complex and often contain
nonsensical and "unnecessary" parts.


Hackers who check only in a few browsers, tend to produce what looks
like "cleaner" hacks, but such "clean" hacks tend to fail more often and
end up hurting the wrong browsers. Failing hacks on regular web sites do
at least as much damage for developers and end-users as all browser bugs
put together, so one really shouldn't hack if one can't test the outcome
in nearly all 25-30 browsers that are in use today, _and_ also make sure
future (not yet released) versions are somewhat shielded.

The latter means thorough testing in all new beta and RC versions, so
one can keep track of progress and regress and be prepared for the final
releases. Of course; no one in his right mind will hack a beta or RC
version for real, so the purpose for beta/RC testing here is to make
sure hacks meant for older versions won't disturb new versions.

Those who want to can then check bug lists and report problems/bugs
found during beta/RC testing. Such reports are usually "most welcome"
for all browsers.

--

To see, and eventually test, which hacks (selector chains) that hit the
various versions, look at my page and stylesheet linked to above.

Haven't checked and updated my browser targeting stylesheet in any
detail since March this year, but it still seems to select the right
engine versions across the board - including [Mozilla/5.0 (Windows; U;
Windows NT 6.0; en-US; rv:1.9.1b4)], so I'm in no hurry. Got other
things on my mind these days, and complete and proper testing is time
consuming.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-18 Thread Alan Gresley
Philippe Wittenbergh wrote:
> 
> On May 18, 2009, at 3:26 PM, Alan Gresley wrote:
> 
>> Interesting. The hack you have is.
>>
>> @-moz-document url-prefix() {
>> :root>body #login_form label input {margin-top: -1.3em;}
>> :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
>> #login_form label input { margin-top: 0;}
>> }
> 
> As I posted in the same thread, that second selector is overly complicated.
> 
>  


Aha, thank you Philippe. Firefox 3.5b4 supports only-of-type.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-18 Thread Alan Gresley
Gunlaug Sørtun wrote:
> Alan Gresley wrote:
> 
>> If this is this bug
> 
>>  
>>
> 
> Although dealing with vertical alignment of floats, our test case isn't
> revealing just one bug.
> 
> Reordering the markup is the old solution, and it'll still work -
> if that's an option.
> 
> Another option is to absolute position relevant elements, thus avoid old
> float-alignment bugs altogether.
> 
> 
> To return to what appears to be the original poster's case:
> 
> ...a fix for older Geckos will make it appear like this...
> Page: 
> CSS: 
> 
> Yes, it is backwards (hacking both old and new Gecko versions). I've
> also ignored very old Geckos completely.
> However, when dealing with a case that falls apart when subjected to the
> slightest amount of font resizing in any browser anyway, such a solution
> doesn't really add serious problems.


Interesting. The hack you have is.

@-moz-document url-prefix() {
:root>body #login_form label input {margin-top: -1.3em;}
:root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
#login_form label input { margin-top: 0;}
}


Does this hack separate Firefox 3.0.1 ~ 3.0.10 from Firefox 3.5b4? I can 
  not test. This part of the hack,

|*:not(|


causes a parsing error. Is this fixed in Firefox 3.5b4? I must admit 
that your hackery (possibly combining structural pseudo class support 
and parsing errors) is hackier than mine. :-)

This is similar to a more recent test case on this list which I have 
hacked to target Gecko 1.9.




With this hack.

img:not([class*=""]) {margin-top:-1.3em; border-right: 4px solid red;} 
/* targeting Gecko 1.9 */


Does Firefox 3.5b4 now send those images above the text line? The same 
test case but with your hack.




I may learn a thing or two about CSS.


> The best solution is always to leave new browser versions alone - not
> hack them, but if that's not an option...
> 
> regards
> Georg


I would dare say to not hack something that is not present when the 
source is changed. Yes with IE this may be done but this is Gecko we are 
dealing with. Also this can cause confusion between these different bugs.






The former does not effect Safari. Both bugs have been fixed with 
Firefox 3.5b4? The later is still present in Safari.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-03 Thread Gunlaug Sørtun
Ido dekkers wrote:

> the is the problem
> 
> what i don't understand is why not use the fix?

I see no problem with the fix in your case, because of the way it is
built up and used.

The simplified selector for Gecko 1.9.1 + suggested by Philippe, will
actually make it even safer against future problems by utilizing
progressive enhancement with (only) a selector that is unlikely to be
removed from or changed in CSS standards and/or browser support.


Generally: it is the unstable nature of new browser versions -
especially beta versions of course, that makes us hesitate to add hacks
that targets them. Only stable browser versions should be hacked at all,
and then only when there's no other, sensible, option.


Your markup - source order - is correct as is, and should rather not be
modified in order to work around a CSS weakness (bug) in a browser.
When compensating for browser bugs it is almost always better to rework
or add something to the stylesheet, than to modify the markup.

Years back we had no choice but to go through and modify both markup and
stylesheets when we encountered especially problematic bugs, but these
days sensible markup should be left as is and all hacks (if any are
needed) should be kept in the stylesheets. Only IE6 still creates a few
exceptions to this "rule".

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-03 Thread Ido dekkers
thank you all for the reply

the is the problem

what i don't understand is why not use the fix?
and if not, what is the correct way to build the HTML ?

thanks again

Ido

On Sun, May 3, 2009 at 4:09 AM, Philippe Wittenbergh  wrote:

>
> On May 2, 2009, at 8:16 PM, Gunlaug Sørtun wrote:
>
> > This reduced hack should otherwise work, at least back to Fx 1.5 (not
> > thoroughly tested)...
> >
> > @-moz-document url-prefix() {
> > :root>body ELEMENT-SELECTOR {/* fix old Gecko */}
> > :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
> > ELEMENT-SELECTOR {/* correct value for new Gecko */}
> > }
> You don't really need to make it that complicated
>
> @-moz-document url-prefix() {
> :root>body ELEMENT-SELECTOR {/* fix Gecko 1.9.0 and older */}
> :root>body:only-of-type ELEMENT-SELECTOR {/* correct value for Gecko
> 1.9.1 + */}
> }
> works just as well :-)
>
> Gecko 1.9.0 and older (Fx 3.0.x and older) don't understand the ':only-
> of-type' pseudo-class. The second line just makes the selector a tad
> more specific.
> (not that I really recommend using this kind of stuff for all the
> reasons you mentioned. And I wouldn't  build the form as in the given
> problem file).
>
> Philippe
> ---
> Philippe Wittenbergh
> http://l-c-n.com/
>
>
>
>
>
> __
> css-discuss [cs...@lists.css-discuss.org]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-03 Thread Philippe Wittenbergh

On May 2, 2009, at 8:16 PM, Gunlaug Sørtun wrote:

> This reduced hack should otherwise work, at least back to Fx 1.5 (not
> thoroughly tested)...
>
> @-moz-document url-prefix() {
> :root>body ELEMENT-SELECTOR {/* fix old Gecko */}
> :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
> ELEMENT-SELECTOR {/* correct value for new Gecko */}
> }
You don't really need to make it that complicated

@-moz-document url-prefix() {
:root>body ELEMENT-SELECTOR {/* fix Gecko 1.9.0 and older */}
:root>body:only-of-type ELEMENT-SELECTOR {/* correct value for Gecko  
1.9.1 + */}
}
works just as well :-)

Gecko 1.9.0 and older (Fx 3.0.x and older) don't understand the ':only- 
of-type' pseudo-class. The second line just makes the selector a tad  
more specific.
(not that I really recommend using this kind of stuff for all the  
reasons you mentioned. And I wouldn't  build the form as in the given  
problem file).

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-02 Thread Alan Gresley
Gunlaug Sørtun wrote:
>>> BTW: which known bug? Just in case there are better options.
> 
>> namely bug 50630: float should be as high as previous line box 
>> https://bugzilla.mozilla.org/show_bug.cgi?id=50630
> 
> That bug is indeed old and well known, and has caused problems all
> along. Don't know of any option but to hack back and forth between old
> and new Geckos for that bug.
> 
> Problem is: one has to hack older Gecko version with a fix (lift float)
> and new versions with the correct value, and it is always unsafe to hack
> new versions.
> 
> 
> This reduced hack should otherwise work, at least back to Fx 1.5 (not
> thoroughly tested)...
> 
> @-moz-document url-prefix() {
> :root>body ELEMENT-SELECTOR {/* fix old Gecko */}
> :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
> ELEMENT-SELECTOR {/* correct value for new Gecko */}
> }
> 
> Good thing is: the hack won't affect non-Gecko browsers.
> Bad thing is: it isn't anywhere near "safe" since one has to hack all
> 3.1+ versions back to standard float-alignment now that the bug is fixed.
> At some point in the near or more distant future one may have to delete
> the entire hack, to avoid getting caught up in a hacking-race caused by
> future development of Gecko and/or CSS standards.
> 
> regards
>   Georg


If this is this bug




then it is also present in Safari (3.2.2). Hacking Firefox 3 is 
dangerous since particular bugs have been fixed with this version but 
the hacks are more specific (targeting or filtering) to Gecko engine 
versions. There is many of them. Anyway how can you hack a fix for this bug?

I would think that changing the order of the markup may be better. Can 
this structure be changed Robert?


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-02 Thread Gunlaug Sørtun
Alan Gresley wrote:

> If this is this bug

> 

Although dealing with vertical alignment of floats, our test case isn't
revealing just one bug.

Reordering the markup is the old solution, and it'll still work -
if that's an option.

Another option is to absolute position relevant elements, thus avoid old
float-alignment bugs altogether.


To return to what appears to be the original poster's case:

...a fix for older Geckos will make it appear like this...
Page: 
CSS: 

Yes, it is backwards (hacking both old and new Gecko versions). I've
also ignored very old Geckos completely.
However, when dealing with a case that falls apart when subjected to the
slightest amount of font resizing in any browser anyway, such a solution
doesn't really add serious problems.

The best solution is always to leave new browser versions alone - not
hack them, but if that's not an option...

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-02 Thread Gunlaug Sørtun
>> BTW: which known bug? Just in case there are better options.

> namely bug 50630: float should be as high as previous line box 
> https://bugzilla.mozilla.org/show_bug.cgi?id=50630

That bug is indeed old and well known, and has caused problems all
along. Don't know of any option but to hack back and forth between old
and new Geckos for that bug.

Problem is: one has to hack older Gecko version with a fix (lift float)
and new versions with the correct value, and it is always unsafe to hack
new versions.


This reduced hack should otherwise work, at least back to Fx 1.5 (not
thoroughly tested)...

@-moz-document url-prefix() {
:root>body ELEMENT-SELECTOR {/* fix old Gecko */}
:root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
ELEMENT-SELECTOR {/* correct value for new Gecko */}
}

Good thing is: the hack won't affect non-Gecko browsers.
Bad thing is: it isn't anywhere near "safe" since one has to hack all
3.1+ versions back to standard float-alignment now that the bug is fixed.
At some point in the near or more distant future one may have to delete
the entire hack, to avoid getting caught up in a hacking-race caused by
future development of Gecko and/or CSS standards.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-01 Thread Philippe Wittenbergh

On May 2, 2009, at 8:17 AM, Gunlaug Sørtun wrote:

>> is there a css hack for ver 3 and below or something using
>> javascript? i need to to fix a known bug only in FF without effecting
>> other standard complaint browsers?
>
> If you really want/need to hack Gecko versions, yes...
> 
>
> Not recommended.
>
> BTW: which known bug? Just in case there are better options.

Issue is this, I think:
http://css-discuss.markmail.org/search/?q=input%20in%20label%20dropping%20a%20line%20in%20firefox

namely bug 50630: float should be as high as previous line box
https://bugzilla.mozilla.org/show_bug.cgi?id=50630


Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] css or javascript hacks for firefox

2009-05-01 Thread Gunlaug Sørtun
Ido dekkers wrote:

> is there a css hack for ver 3 and below or something using 
> javascript? i need to to fix a known bug only in FF without effecting
>  other standard complaint browsers?

If you really want/need to hack Gecko versions, yes...


Not recommended.

BTW: which known bug? Just in case there are better options.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] css or javascript hacks for firefox

2009-05-01 Thread Ido dekkers
HI

is there a css hack for ver 3 and below or something using javascript ?
i need to to fix a known bug only in FF without effecting other standard
complaint browsers?


Thanks

Ido
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/