New issue
Advanced search Search tips

Issue 921226 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 16
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

web_dev_style: enforce CSS style guide -start/end recommendation (instead of -left/right)

Project Member Reported by dbeam@chromium.org, Jan 11

Issue description

from https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md#rtl

Use RTL-friendly versions of things like margin or padding where possible:

margin-left -> margin-inline-start
padding-right -> padding-inline-end
text-align: left -> text-align: start
text-align: right -> text-align: end
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9920ac7bedf86b0d649464b342544cf77389a805

commit 9920ac7bedf86b0d649464b342544cf77389a805
Author: Dan Beam <dbeam@chromium.org>
Date: Wed Jan 16 04:21:55 2019

web_dev_style: discourage CSS *-left/right properties and values

Instead, suggest equivalent *-start/end values that automatically
flip in RTL.  For example, if the presubmit finds something along
the lines of:

  margin-left: 5px;

It'll flag it and encourage the directionally-aware:

  margin-inline-start: 5px;

Unless annotated with:

  margin-left: 5px;  /* csschecker-disable-line left-right */

for code that's truly direction agnostic.

R=dpapad@chromium.org
BUG= 921226 

Change-Id: If649c4eed125af4dfd5cb8b3284dc1c900230847
Reviewed-on: https://chromium-review.googlesource.com/c/1407787
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623096}
[modify] https://crrev.com/9920ac7bedf86b0d649464b342544cf77389a805/tools/web_dev_style/css_checker.py
[modify] https://crrev.com/9920ac7bedf86b0d649464b342544cf77389a805/tools/web_dev_style/css_checker_test.py

Comment 2 by dbeam@chromium.org, Jan 16 (6 days ago)

Status: Fixed (was: Started)

Sign in to add a comment