Enforce the use of CSS Logical Properties in core

Created on 30 September 2022, about 3 years ago
Updated 20 August 2024, about 1 year ago

Problem/Motivation

CSS Logical Properties enable one-line CSS declarations that work in both left-to-right and right-to-left languages.

Instead of writing

.selector {
  padding-left: 10px;
}

[dir="rtl"] .selector {
  padding-right: 10px;
}

We will now write

.selector {
  padding-inline-start: 10px;
}

Logical properties are supported by all of Drupal 10's supported browsers, and now will ship them without transpiling (as of #3312481: Update core's browserlist โ†’ ).

Steps to reproduce

Proposed resolution

We should enforce the use of logical properties through automation. This will ensure that RTL styles are not neglected, and it will also result in a smaller CSS bundle (as opposed to writing our using the dir attribute).

Remaining tasks

Failing tests:
core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php
core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
CSSย  โ†’

Last updated 3 months ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024