Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Right and left padding with Opera

2 views
Skip to first unread message

Andreas Prilop

unread,
Apr 23, 2010, 10:39:07 AM4/23/10
to
Testcase:
http://www.user.uni-hannover.de/nhtcapri/temp-5.html

Opera 10.51 (Windows XP) takes "padding-right" to mean "padding-left"
on table cells when the text direction is right-to-left;
other browsers (Firefox, Internet Explorer, Konqueror) don't.

Can you reproduce this behaviour in Opera? Bug or feature?

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/

Ben C

unread,
Apr 23, 2010, 11:38:05 AM4/23/10
to
On 2010-04-23, Andreas Prilop <prilo...@trashmail.net> wrote:
> Testcase:
> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
>
> Opera 10.51 (Windows XP) takes "padding-right" to mean "padding-left"
> on table cells when the text direction is right-to-left;
> other browsers (Firefox, Internet Explorer, Konqueror) don't.
>
> Can you reproduce this behaviour in Opera?

Yes, Opera 10.10 on GNU/Linux does it too.

> Bug or feature?

Bug. The spec says padding-right means padding-right (and it would be
really confusing if right started meaning left when direction changed).

What all browsers do is swap left and right for whichever of margin or
padding they use in the default stylesheet to indent list items when
direction is rtl.

One way to do this, I think what Firefox did, is create some custom
properties like -moz-padding-start and -moz-padding-end and use those in
the default stylesheet. Another would be to invent a new pseudo called
:rtl or something.

CSS3 probably has padding-start/padding-end (or something like that,
don't know what name they used) as well as padding-left/padding-right.

dorayme

unread,
Apr 23, 2010, 5:18:52 PM4/23/10
to
In article
<Pine.LNX.4.64.10...@zen.rrzn.uni-hannover.de>,
Andreas Prilop <prilo...@trashmail.net> wrote:

> Testcase:
> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
>
> Opera 10.51 (Windows XP) takes "padding-right" to mean "padding-left"
> on table cells when the text direction is right-to-left;
> other browsers (Firefox, Internet Explorer, Konqueror) don't.
>
> Can you reproduce this behaviour in Opera? Bug or feature?

Opera is a lone ranger when it comes to fonts and font sizes.
"padding-right" means more what it says, for example, in Opera
when you use pixels.

--
dorayme

Thomas 'PointedEars' Lahn

unread,
Apr 23, 2010, 6:32:50 PM4/23/10
to
Andreas Prilop wrote:

> Testcase:
> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
>
> Opera 10.51 (Windows XP) takes "padding-right" to mean "padding-left"
> on table cells when the text direction is right-to-left;
> other browsers (Firefox, Internet Explorer, Konqueror) don't.
>
> Can you reproduce this behaviour in Opera?

Confirmed for Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.51
(on Wine, where it is a PITA as compared to Opera 10.10).

> Bug or feature?

Maybe neither. CSS 2.1 contains a note about the HTML `dir' attribute with
regard to table columns. AIUI, it is not a good idea to use that attribute
on a table cell, instead of the `direction' CSS property, and other CSS on
the same element to begin with.

<http://www.w3.org/TR/CSS21/visuren.html#propdef-direction>

Isn't there a bug tracking system at opera.com?


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16

Ben C

unread,
Apr 24, 2010, 12:21:33 PM4/24/10
to
On 2010-04-23, Thomas 'PointedEars' Lahn <Point...@web.de> wrote:
> Andreas Prilop wrote:
>
>> Testcase:
>> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
>>
>> Opera 10.51 (Windows XP) takes "padding-right" to mean "padding-left"
>> on table cells when the text direction is right-to-left;
>> other browsers (Firefox, Internet Explorer, Konqueror) don't.
>>
>> Can you reproduce this behaviour in Opera?
>
> Confirmed for Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.51
> (on Wine, where it is a PITA as compared to Opera 10.10).
>
>> Bug or feature?
>
> Maybe neither. CSS 2.1 contains a note about the HTML `dir' attribute with
> regard to table columns.

Yes, cells in columns go right to left when direction is rtl. That
doesn't mean padding-left means right padding!

> AIUI, it is not a good idea to use that attribute on a table cell,
> instead of the `direction' CSS property, and other CSS on the same
> element to begin with.

Why not? direction: rtl make cells go right to left just the same as
dir=rtl.

The only reason to use dir=rtl instead of direction would be something
like Korpela's CSS Kaveats.

Jukka K. Korpela

unread,
Apr 24, 2010, 12:40:53 PM4/24/10
to
Ben C wrote:

> The only reason to use dir=rtl instead of direction would be something
> like Korpela's CSS Kaveats.

The usual CSS Caveats are particularly important here, because writing
direction is not a casual rendering feature like color, font, or padding.
Instead, it is an inherent feature of the writing system. It would be absurd
if your English-language page got right to left direction (with
directionally neutral pieces running right to left, default alignment set to
right, column order in tables right to left) just because your style sheet
is not found, or is not applied.

?It would look odd, wouldn't it

(Latin letters would still run right to left, since they have inherent left
to right directionality, but e.g. some punctuation would get thrown in odd
places.)

Well, _that_ won't happen of course, since default direction is left to
right, but the situation is just as absurd in the real case of writing
systems that differ from this default.

I don't see much reason to use the direction property (instead of the dir
attribute in HTML) except in cases where you deliberately play with
direction - on fun pages, basically.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Ben C

unread,
Apr 24, 2010, 1:26:00 PM4/24/10
to
On 2010-04-24, Jukka K. Korpela <jkor...@cs.tut.fi> wrote:
> Ben C wrote:
>
>> The only reason to use dir=rtl instead of direction would be something
>> like Korpela's CSS Kaveats.
>
> The usual CSS Caveats are particularly important here, because writing
> direction is not a casual rendering feature like color, font, or padding.
> Instead, it is an inherent feature of the writing system.

[...]


> I don't see much reason to use the direction property (instead of the dir
> attribute in HTML) except in cases where you deliberately play with
> direction - on fun pages, basically.

I agree. I think this "belongs" in HTML rather than in CSS. But since
they need to specify various things about how things are laid out it
needs a CSS property for consistency and to save cross-referencing the
HTML specs.

The only place the direction property should probably normally be used
is in the browser default stylesheet.

Andreas Prilop

unread,
Apr 27, 2010, 12:14:17 PM4/27/10
to
On Sat, 24 Apr 2010, Ben C wrote:

>>> Testcase:
>>> http://www.user.uni-hannover.de/nhtcapri/temp-5.html

Updated version with direction:rtl .

> direction: rtl make cells go right to left just the same as dir=rtl.

I have not yet seen the updated version of my test page in Opera
but I would be even more surprised if there is a difference between
dir=rtl and direction: rtl .

--
In memoriam Alan J. Flavell

http://www.alanflavell.org.uk/charset/text-direction.html

dorayme

unread,
Apr 28, 2010, 10:52:56 AM4/28/10
to

> On Sat, 24 Apr 2010, Ben C wrote:
>
> >>> Testcase:
> >>> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
>
> Updated version with direction:rtl .
>
> > direction: rtl make cells go right to left just the same as dir=rtl.
>
> I have not yet seen the updated version of my test page in Opera
> but I would be even more surprised if there is a difference between
> dir=rtl and direction: rtl .

On Mac Opera 10.10, there is no difference between your rtl and
ltr tables showing up. Once again, the "bug" that is being found
here is dependant on you specifying right-padding in em rather
than other units. Continue to find this uninteresting.

--
dorayme

Andreas Prilop

unread,
Apr 29, 2010, 11:01:36 AM4/29/10
to
On Thu, 29 Apr 2010, dorayme wrote:

>>>>> Testcase:
>>>>> http://www.user.uni-hannover.de/nhtcapri/temp-5.html


>
> On Mac Opera 10.10, there is no difference between your rtl and
> ltr tables showing up. Once again, the "bug" that is being found
> here is dependant on you specifying right-padding in em rather
> than other units.

I see - when I write { padding-right: 50mm }, I get the padding
on the right side. Strange, strange, strange

> Continue to find this uninteresting.

Yes, because I continue to specify length only in relative units.

--
In memoriam Alan J. Flavell

http://groups.google.co.uk/groups/search?q=author:Alan.J.Flavell

dorayme

unread,
Apr 29, 2010, 5:14:51 PM4/29/10
to

> On Thu, 29 Apr 2010, dorayme wrote:
>
> >>>>> Testcase:
> >>>>> http://www.user.uni-hannover.de/nhtcapri/temp-5.html
> >
> > On Mac Opera 10.10, there is no difference between your rtl and
> > ltr tables showing up. Once again, the "bug" that is being found
> > here is dependant on you specifying right-padding in em rather
> > than other units.
>

On Mac Opera 10.10, as on other browsers, there is no difference
between the two tables. That is one thing to get out of the way.
But the left cells in both tables show a wrong implementation, a
bug, in having the padding on the wrong side. Try to forget what
I said above. Please carry on as if it was not said.

>
> > Continue to find this uninteresting.
>
> Yes, because I continue to specify length only in relative units.

This I find surprising. It is correct of you to want to use ems
for padding, I was not criticising this. But being uninterested
in how this bug is possibly confined to font-size units is like
going to the circus to watch the show and then to find it
*uninteresting* that a vicious criminal is escaping from the
police and runs into the tent, there is a shootout, several
police are wounded. He is finally captured by clever and brave
tactics by various individuals, both police and civilians - right
in front of eyes that came to watch circus performers including
lions... Can you never be diverted from anything? I would kill to
obtain that kind of concentration. <g>

--
dorayme

0 new messages