W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

[csswg-drafts] [css-logical] More shorthands, e.g. margin-start (#3651)

From: Valtteri Laitinen via GitHub <sysbot+gh@w3.org>
Date: Fri, 15 Feb 2019 14:32:12 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-410795143-1550241131-sysbot+gh@w3.org>
valtlai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-logical] More shorthands, e.g. margin-start ==
Spec: https://drafts.csswg.org/css-logical/#box

I would propose more flow-relative shorthand properties:

| Property | Corresponds to
|---|---
| margin-start | margin-block-start, margin-inline-start
| margin-end | margin-block-end, margin-inline-end
| inset-start | inset-block-start, inset-inline-start
| inset-end | inset-block-end, inset-inline-end
| padding-start | padding-block-start, padding-inline-start
| padding-end | padding-block-end, padding-inline-end
| border-start | border-block-start, border-inline-start
| border-end | border-block-end, border-inline-end

They could make CSS more DRY.

```css
/* For example, the following: */
inset-start: 0;

/* would be equivalent to: */
inset-block-start: 0;
inset-inline-start: 0;

/* and sometimes to: */
inset: 0 auto auto 0;
```

There’s already shorthands for the block and inline directions (e.g. `margin-block`, `margin-inline`) but not for the start or end directions (`margin-start`, `margin-end`).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3651 using your GitHub account
Received on Friday, 15 February 2019 14:32:15 UTC

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