From 3584ab048c7bd04b853fef56a425aa55e6294777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 5 Nov 2025 19:51:05 +0100 Subject: [PATCH] Replace word-break: break-word with overflow-wrap According to W3C documentation [1]: > For compatibility with legacy content, the word-break property also > supports a deprecated break-word keyword. When specified, this has the > same effect as word-break: normal and overflow-wrap: anywhere, > regardless of the actual value of the overflow-wrap property. This is currently *not* detected by the `property-no-deprecated` stylelint rule. However, since this rule detects other places where we should use `overflow-wrap`, we're changing it as part of the same pull request. Note that, as of November 2025, 98.22% of the browsers support `overflow-wrap: anywhere`. We're still making this change because we only use this property in two specific places and it isn't very likely that long words will really be a problem with the remaining 1.78%. By the way, I'm not sure why we use this property in the budget invesment show paragraphs and not in other similar places. It was introduced in commit e3878ff43, alongside other changes which don't seem to be related. When in doubt, we leave things as they were, so we're doing the same thing here. [1] https://www.w3.org/TR/css-text-3/#word-break-property [2] https://caniuse.com/mdn-css_properties_overflow-wrap_anywhere --- app/assets/stylesheets/admin/polls/questions/options/table.scss | 2 +- app/assets/stylesheets/participation.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/admin/polls/questions/options/table.scss b/app/assets/stylesheets/admin/polls/questions/options/table.scss index 381f959df..6fd2f40a7 100644 --- a/app/assets/stylesheets/admin/polls/questions/options/table.scss +++ b/app/assets/stylesheets/admin/polls/questions/options/table.scss @@ -7,7 +7,7 @@ } &.description { - word-break: break-word; + overflow-wrap: anywhere; } } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 22532dbbd..347b84124 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -316,7 +316,7 @@ } .budget-investment-show p { - word-break: break-word; + overflow-wrap: anywhere; } .proposal-show,