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
This commit is contained in:
Javi Martín
2025-11-04 15:39:51 +01:00
parent 917c9e6ac4
commit a5e788dde4
4 changed files with 8 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ rules:
max-nesting-depth: 4 max-nesting-depth: 4
media-feature-name-no-vendor-prefix: true media-feature-name-no-vendor-prefix: true
no-invalid-position-declaration: true no-invalid-position-declaration: true
property-no-deprecated: true
property-no-unknown: true property-no-unknown: true
property-no-vendor-prefix: true property-no-vendor-prefix: true
rule-empty-line-before: rule-empty-line-before:

View File

@@ -4,7 +4,7 @@
} }
a { a {
word-wrap: break-word; overflow-wrap: break-word;
.document-metadata { .document-metadata {
&::before, &::before,

View File

@@ -2020,7 +2020,7 @@ table {
position: relative; position: relative;
a { a {
word-wrap: break-word; overflow-wrap: break-word;
} }
> :first-child { > :first-child {
@@ -2139,7 +2139,7 @@ table {
&.description { &.description {
color: $body-font-color; color: $body-font-color;
word-wrap: break-word; overflow-wrap: break-word;
} }
} }
} }

View File

@@ -162,7 +162,7 @@
h1, h1,
p { p {
word-wrap: break-word; overflow-wrap: break-word;
} }
.callout { .callout {
@@ -274,7 +274,7 @@
position: relative; position: relative;
a { a {
word-wrap: break-word; overflow-wrap: break-word;
} }
.icon-video { .icon-video {
@@ -660,7 +660,7 @@
} }
.investment-external-link a { .investment-external-link a {
word-wrap: break-word; overflow-wrap: break-word;
} }
} }
@@ -1334,7 +1334,7 @@
} }
a { a {
word-wrap: break-word; overflow-wrap: break-word;
} }
} }
} }