From a5e788dde4b32c4eb627f2715c96c7b163f039c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 4 Nov 2025 15:39:51 +0100 Subject: [PATCH] Add and apply property-no-deprecated stylelint rule This rule was introduced in stylelint 16.23. Out of the deprecated properties it detects, we were only using `word-wrap`. According to the CSS Working Group [1]: > For legacy reasons, UAs must treat word-wrap as a legacy name alias of > the overflow-wrap property. Since there's universal browser support for `overflow-wrap: break-word` [2], we can safely replace `word-wrap` with `overflow-wrap`. [1] https://drafts.csswg.org/css-text/#overflow-wrap-property [2] https://caniuse.com/mdn-css_properties_overflow-wrap_break-word --- .stylelintrc.yml | 1 + app/assets/stylesheets/documents/document.scss | 2 +- app/assets/stylesheets/layout.scss | 4 ++-- app/assets/stylesheets/participation.scss | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.stylelintrc.yml b/.stylelintrc.yml index 59e7fb013..0851a5633 100644 --- a/.stylelintrc.yml +++ b/.stylelintrc.yml @@ -29,6 +29,7 @@ rules: max-nesting-depth: 4 media-feature-name-no-vendor-prefix: true no-invalid-position-declaration: true + property-no-deprecated: true property-no-unknown: true property-no-vendor-prefix: true rule-empty-line-before: diff --git a/app/assets/stylesheets/documents/document.scss b/app/assets/stylesheets/documents/document.scss index ce08d2bdc..2d357caec 100644 --- a/app/assets/stylesheets/documents/document.scss +++ b/app/assets/stylesheets/documents/document.scss @@ -4,7 +4,7 @@ } a { - word-wrap: break-word; + overflow-wrap: break-word; .document-metadata { &::before, diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d95e72179..1373682d4 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2020,7 +2020,7 @@ table { position: relative; a { - word-wrap: break-word; + overflow-wrap: break-word; } > :first-child { @@ -2139,7 +2139,7 @@ table { &.description { color: $body-font-color; - word-wrap: break-word; + overflow-wrap: break-word; } } } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 73ad32cdd..22532dbbd 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -162,7 +162,7 @@ h1, p { - word-wrap: break-word; + overflow-wrap: break-word; } .callout { @@ -274,7 +274,7 @@ position: relative; a { - word-wrap: break-word; + overflow-wrap: break-word; } .icon-video { @@ -660,7 +660,7 @@ } .investment-external-link a { - word-wrap: break-word; + overflow-wrap: break-word; } } @@ -1334,7 +1334,7 @@ } a { - word-wrap: break-word; + overflow-wrap: break-word; } } }