W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2016

[csswg-drafts] [css-backgrounds][css-logical-props] Define logical values for <position> in CSS Logical Properties

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Thu, 29 Sep 2016 07:00:37 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-179967736-1475132435-sysbot+gh@w3.org>
SebastianZ has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-backgrounds][css-logical-props] Define logical values for 
<position> in CSS Logical Properties ==
The `<position>` data type is [defined in CSS Backgrounds 
3](https://drafts.csswg.org/css-backgrounds-3/#position) to only take 
physical values. `<length>` and `<percentage>` values are resolved 
against the top left corner of the referenced area.
In [CSS Backgrounds 
4](https://drafts.csswg.org/css-backgrounds-4/#typedef-position) the 
logical values `start`, `end`, `x-start`, `x-end`, `y-start` and 
`y-end` are added to the definition.

To keep the logical values consistent they should be defined in CSS 
Logical Properties and be changed to `block-start`, `block-end`, 
`inline-start` and `inline-end` so that the syntax looks like this:

```
<position> = [
  [ left | center | right | top | bottom | <length-percentage> ]
|
  [ left | center | right | <length-percentage> ]
  [ top | center | bottom | <length-percentage> ]
|
  [ center | [ left | right ] <length-percentage>? ] &&
  [ center | [ top | bottom ] <length-percentage>? ]
|
  [ [ inline-start | inline-end ] <length-percentage>? ] ||
  [ [ block-start | block-end ] <length-percentage>? ]
]
```

I might be missing something, though I think the syntax could even be 
reduced to this:

```
[ center | [ left | right | inline-start | inline-end ] 
<length-percentage>? | <length-percentage> ] ||
[ center | [ top | bottom | block-start | block-end ] 
<length-percentage>? | <length-percentage> ]
```

The only difference I can see is that it would allow to mix logical 
and physical directions like in `block-end 10px left 30px` and 
requires to interpret `<length-percentage>`s a bit differently, as it 
allows values like `20% left 2em`.<br/>
`<length-percentage>`s would still refer to the top or left edge if no
 direction is given.

Sebastian

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/549 using your GitHub 
account
Received on Thursday, 29 September 2016 07:00:47 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:03 UTC