Skip to content

Add warning to CSS direction page#26835

Merged
estelle merged 2 commits intomdn:mainfrom
NickGard:patch-1
May 22, 2023
Merged

Add warning to CSS direction page#26835
estelle merged 2 commits intomdn:mainfrom
NickGard:patch-1

Conversation

@NickGard
Copy link
Copy Markdown
Contributor

@NickGard NickGard commented May 18, 2023

Description

The direction property, while not deprecated, is heavily discouraged by the CSS Spec authors. This PR adds this warning to the direction property page.

Motivation

As MDN is often the first stop for developers exploring CSS properties, this warning should be present here. A similar warning is posted about unicode-bidi.

Additional details

from https://drafts.csswg.org/css-writing-modes-3/#direction

Because HTML UAs can turn off CSS styling, we recommend HTML authors to use the HTML dir attribute and element to ensure correct bidirectional layout in the absence of a style sheet. Authors should not use direction in HTML documents.

CSS WG discussion on the topic: w3c/csswg-drafts#2091

Related issues and pull requests

The `direction` property, while not deprecated, is heavily discouraged by the CSS Spec authors. This information is not present on any MDN page addressing directionality but a similar warning is posted about [`unicode-bidi`](https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi). As MDN is often the first stop for developers exploring CSS properties, this warning should be present here.

Relevant links:
* w3c/csswg-drafts#2091
* https://drafts.csswg.org/css-writing-modes-3/#direction
@NickGard NickGard requested a review from a team as a code owner May 18, 2023 14:09
@NickGard NickGard requested review from estelle and removed request for a team May 18, 2023 14:09
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label May 18, 2023
Copy link
Copy Markdown
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants