Closed Bug 36364 Opened 25 years ago Closed 22 years ago

[TXT]Space alloted for text doesn't grow to accomdate letter-spacing when applied

Categories

(Core :: Layout, defect, P4)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: kcook, Assigned: rods)

References

()

Details

(Keywords: css1, testcase, Whiteboard: [CSS1-5.4.2])

Attachments

(2 files)

In M15 (build 2000041805), adding letter-spacing (1px) to a submit button actually adds a preceding space to the button text, causing it to appear off-centre. In M14 (build 2000022820) and the button text centres correctly. A relatively minor detail, but it's fairly noticeable on a small button.
I'm renaming this bug to something more precise since I understand better what's going on now. I've seen this effect a couple of times. It appears that whenever letter-spacing is applied to an element, the size of the element's space allotment does not expand to accomodate the enlarged element. The letter-spacing is nonetheless rendered properly, so it tends to flow out of its space and overlap surrounding elements. In the case of the sample here, it looks like the original text was centred in the submit button, but then letter-spacing was applied to the button text. It seems like centring and other types of space reallocation need to be done after letter-spacing is applied.
Summary: letter-spacing creates uncentred text on submit button → Space alloted for text doesn't grow to accomdate letter-spacing when applied
Setting bug status to New
Status: UNCONFIRMED → NEW
Ever confirmed: true
Rod -- I'm guessing that you're better suited to this than buster. Please take a look.
Assignee: rickg → rods
Status: NEW → ASSIGNED
Target Milestone: --- → M21
the test case I just submitted makes the problem more obvious. the submit button is not changing it's size based on the content's size (or the content is not reporting it's size correctly.)
Target Milestone: M21 → Future
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Does this affect any other elements other than Button? Say, SPAN or something like that?
From what I've noticed, letter-spacing is generally broken when it needs to interact with page layout. I'd have to do more tests/samples to pin down specifics, but I recall seeing letter-spaced elements flowing off the edge of a page when it should just be aligned to the edge (I initially thought this was a float problem), and I've also seen letter-spaced links <A HREF> with a misaligned hover effect. I could come up with more samples if anyone would like, even though this bug is on hold for now.
Please do; the more dire the testcases, the more chance we have of un-holding the bug. ;-)
Keywords: testcase
massive update for QA contact.
QA Contact: petersen → lorca
Also, spaces (ASCII 0x20) do not grow with letter-spacing. When you do something like "letter-spacing : .3em" the spaces between word might actually be smaller than spacing between individual letters.
This last comment is another bug and was fixed recently.
Summary: Space alloted for text doesn't grow to accomdate letter-spacing when applied → [TXT]Space alloted for text doesn't grow to accomdate letter-spacing when applied
leaving Priority the same
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
FYI, Buster's testcase still shows this bug using build 2001021304 win32.
Interesting. I only see the problem in quirks mode (buster's testcase). In strict mode (testcase I am about to attach) the button stretches correctly (linux build 2001-02-12-08).
qa contact updated.
QA Contact: gerardok → bsharma
Seeing on Linux. OS/All. I agree with with BZ on the quirks mode thing. The only problem I see in the strict testcase is that on the last button, the amount of space to the left of the text is approximately twice that given to the right of the text. That is: |<---->w o r d<-->| which definitely looks weird.
OS: Windows NT → All
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
QA Contact: bsharma → moied
Boris, would your patch to that other button-size bug fix this too? It's still reproducible with both of the (quirks/strict mode) testcases.
I have no idea and have no tree to test with. Try that patch in your tree? :) The reason you see it in strict as well as quirks is because we now use quirks sizing in both modes....
Keywords: qawanted
Priority: P3 → --
Priority: -- → P4
Whiteboard: [CSS1-5.4.2]
Bug 115967 might be a dupe. Can someone check this, please? pi
Confirmed using FizzillaCFM/2002070913. The submit button styled "letter-spacing:5px" loses the "t" entirely. Setting Platform=All.
Hardware: PC → All
The answer to the question in comment 21 is "no", which I should have known offhand -- the form controls do their own text measurement when sizing and drop the letter-spacing on the floor.
Depends on: 167236
Fixed by bug 167236
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: