Skip to content

[css21] 9.4.3 Relative positioning(getComputedStyle does not handle over-constrained properties correctly) #190

Closed
@deokjinkim

Description

@deokjinkim

Hello,

I have a question about css 2.1 spec.(https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#relative-positioning)

  1. Background

I'm working on blink engine as deokjin81.kim@samsung.com.
As I know, getComputedStyle does not handle over-constrained properties correctly.
So I implemented it(https://bugs.chromium.org/p/chromium/issues/detail?id=601118) according to spec on blink engine.

  1. Spec(https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#relative-positioning)

Below paragraphs(from spec) describe detail operation to handle over-constrained properties.

If neither 'left' nor 'right' is 'auto', the position is over-constrained, and one of them has to be ignored. If the 'direction' property of the containing block is 'ltr', the value of 'left' wins and 'right' becomes -'left'. If 'direction' of the containing block is 'rtl', 'right' wins and 'left' is ignored.

The 'top' and 'bottom' properties move relatively positioned element(s) up or down without changing their size. 'Top' moves the boxes down, and 'bottom' moves them up. Since boxes are not split or stretched as a result of 'top' or 'bottom', the used values are always: top = -bottom. If both are 'auto', their used values are both '0'. If one of them is 'auto', it becomes the negative of the other. If neither is 'auto', 'bottom' is ignored (i.e., the used value of 'bottom' will be minus the value of 'top').

  1. Question

The spec text uses the verb “becomes.” I don’t know if this means that either 1) the rendering and the computed style should reflect this, or 2) just the rendering should reflect this.
Current implementation reflects second option("2) just the rendering should reflect this.").
I would like to know exact meaning of the verb "becomes.". Which one did you intend, 1) or 2)?

Thank you in advance,
Deokjin Kim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions