Closed
Bug 851624
Opened 11 years ago
Closed 11 years ago
Switching an element from position:relative to position:absolute causes incorrect width calculation if :first-letter is used
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 385615
People
(Reporter: cboon27, Unassigned)
Details
(Keywords: testcase)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.28 Safari/537.31 Steps to reproduce: When you apply a rule to text using the ::first-letter pseudo-style and then change the 'position' of the parent element from 'relative' to 'absolute' the element renders with the amount of space equal to if the ::first-letter attributes were applied to the entire element. For example if your first letter has uppercase applied the parent element expands to the width it would require if all letters had uppercase applied. Actual results: See examples here: http://codepen.io/chrisboon27/pen/DAFsg In these examples I've had the error happen on :hover just to show a simple test case. I first noticed the issue when using jQuery UI to allow users to reorder words to create a sentence where I was manipulating their order in the DOM and using div:first-of-type:first-letter{text-transform:uppercase} so there are use cases where this bug is a problem. Expected results: I've tried this in Firefox19 and also Nightly(22) and it has the same error. Chrome handles it correctly whereby the width fits the content properly.
Updated•11 years ago
|
Updated•11 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•