Closed
Bug 548378
Opened 15 years ago
Closed 14 years ago
-moz-transform should be a shorthand
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 598609
People
(Reporter: pjdkrunkt, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
When -moz-transform is used on the same element with different selectors, it resets properties of overlapping selectors to the default settings, and only uses the last in order.
Reproducible: Always
Steps to Reproduce:
1. Set a -moz-transform property for one selector, say [iconsize="small"].
2. Set a -moz-transform property for an overlapping selector, say :-moz-locale-dir(rtl).
3. Set a -moz-transform property for another overlapping selector, say toolbar[orient="vertical"].
Actual Results:
Whichever property was assigned last is used and the overlapping properties are reset to the default. In the case of the example, only the instructions for a vertical toolbar are used, even if Firefox is in a RTL locale and is in small icons mode. The only way to work around this is to create separate instructions for each and every individual case.
Expected Results:
-moz-transform properties should carry over from overlapping instructions. In the above example, those three statements are all that should be needed to handle a wide range of circumstances.
The "background" property is an example of the expected behavior.
Comment 1•15 years ago
|
||
Yes, this is how CSS works. You have a list of rules, you take the most specific one that sets the property, you use the value it sets as the specified value. background works exactly the same way as -moz-transform in this regard.
Unless you mean that -moz-transform resets properties _other_ than -moz-transform? In that case, I'd like to see a testcase showing that.
| Reporter | ||
Comment 2•15 years ago
|
||
No, I mean that -moz-transform has several different properties like rotate, scale, skew, translate etc. that are all reset every time -moz-transform is called. Background allows you to change say the background color without resetting the background image, position or repeat values. Maybe what is needed is separate properties:
-moz-transform-rotate
-moz-transform-scale
-moz-transform-translate
-moz-transform-skew
This probably still wouldn't help for mirroring images for RTL, but it would be a start.
Comment 3•15 years ago
|
||
> I mean that -moz-transform has several different properties like rotate,
> scale, skew, translate etc
But it doesn't. It just has a single value that has those parts, but they're not settable independently.
> Background allows you to change say the background color without
> resetting the background image,
Right, because it's a shorthand.
> Maybe what is needed is separate properties:
If you want it to work the way I think you do, yes. You may want to post to www-style@w3.org about this, since that's something that would need to change in the http://www.w3.org/TR/css3-2d-transforms/ draft specification. The "transform" property would need to have the final transformation matrix decomposed into the 4 parts you list. That said, such decompositions are non-unique, so a method of choosing the preferred decomposition would need to be chosen, and the exact order in which the four are combined into the overall transform would need to be defined.
> This probably still wouldn't help for mirroring images for RTL
What exactly is needed for that?
Status: UNCONFIRMED → NEW
Component: General → Style System (CSS)
Ever confirmed: true
QA Contact: general → style-system
Summary: -moz-transform resets properties to default settings every time it is called. → -moz-transform should be a shorthand
| Reporter | ||
Comment 4•15 years ago
|
||
That just seems terribly short-sighted for something that could possibly completely re-invent the way that many parts of the web and browsers are handled.
Comment 5•15 years ago
|
||
What seems short-sighted?
Comment 6•14 years ago
|
||
Looks like the same as bug 598609?
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•