From d6b949649010dc0926396cf5b831ca3c26de1dc0 Mon Sep 17 00:00:00 2001 From: cananoo <2059997196@qq.com> Date: Thu, 27 Aug 2026 22:03:25 +0800 Subject: [PATCH 1/2] Recognize overflow-wrap in CSS3 text profile --- cssutils/profiles.py | 1 + tests/test_profiles.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cssutils/profiles.py b/cssutils/profiles.py index 1175f3a5..074c4608 100644 --- a/cssutils/profiles.py +++ b/cssutils/profiles.py @@ -727,5 +727,6 @@ def validateWithProfile(self, name, value, profiles=None): # noqa: C901 macros[Profiles.CSS3_TEXT] = {} properties[Profiles.CSS3_TEXT] = { + 'overflow-wrap': 'normal|break-word|anywhere|inherit|initial|unset', 'text-shadow': 'none|{shadow}({w},{w}{shadow})*', } diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 688ad9c0..e4d2deb9 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -681,6 +681,11 @@ def test_validate(self): 'black', ), ): (False, False, C3T), + ( + 'overflow-wrap', + ('normal', 'break-word', 'anywhere', 'inherit', 'initial', 'unset'), + ): (True, True, C3T), + ('overflow-wrap', ('auto', 'wrap', 'break_word')): (False, False, C3T), ('unicode-range', ('u+1', 'U+111111-ffffff', 'u+123456 , U+1-f')): ( True, True, From 15765669765d270e049555f435405d51bfdfff9f Mon Sep 17 00:00:00 2001 From: cananoo <2059997196@qq.com> Date: Thu, 27 Aug 2026 22:04:10 +0800 Subject: [PATCH 2/2] Add changelog entry for overflow-wrap --- newsfragments/82.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/82.bugfix.rst diff --git a/newsfragments/82.bugfix.rst b/newsfragments/82.bugfix.rst new file mode 100644 index 00000000..e4881389 --- /dev/null +++ b/newsfragments/82.bugfix.rst @@ -0,0 +1 @@ +Recognize the CSS Text Level 3 ``overflow-wrap`` property.