Internal properties should not be exposed via style[N]

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
7 years ago
5 years ago

People

(Reporter: neil@parkwaycc.co.uk, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
SeaMonkey composer tries to enumerate inline styles by iterating over the numbered properties of the CSSStyleDeclaration object. However some internal border, margin and padding properties are exposed. These properties cannot be written back. Reading the style attribute does not expose those properties.

The code used is roughly equivalent to
foo.setAttribute("style",
                 Array.map(foo.style,
                           function(prop)
                               prop + ": " + foo.style.getPropertyValue(prop)
                           ).join("; "));
(I say roughly because this is done as an editor attribute transaction.)

This bug makes it difficult to edit left and right border, margin or padding styles. Unless of course someone knows a better way of enumerating them, preferably one that works with Gecko 1.9.1 which also has this bug :-(

Comment 1

5 years ago
It's impossible to set properties like padding, margin or border with the inline styles dialog, because the next time you open the dialog these properties are transformed into the internal version  and the values for left and right (margin, padding, border) are removed. This makes the inline styles editor basically useless because setting these properties is the main reason to use it in the first place.
You need to log in before you can comment on or make changes to this bug.