Description
overflow-wrap is not in the known properties list, causing the following warning:
Property: Unknown Property name. [overflow-wrap]
Background
overflow-wrap was standardized in CSS Text Module Level 3 as the official
replacement for the IE-era word-wrap property. It has been supported in all
major browsers since 2017 and is defined here:
https://www.w3.org/TR/css-text-3/#overflow-wrap-property
Suggested Fix
Add overflow-wrap to the CSS Text Level 3 profile in cssutils/profiles.py:
# CSS Text Level 3
properties[Profiles.CSS3_TEXT] = {
...
'overflow-wrap': 'normal|break-word|anywhere|inherit|initial|unset',
'word-wrap': 'normal|break-word|inherit|initial|unset', # legacy alias
}
Workaround
Users can currently work around this by manually registering the property:
import cssutils
cssutils.profile.addProfile(
'overflow-wrap support',
{'overflow-wrap': 'normal|break-word|anywhere|inherit|initial|unset'},
{}
)
Environment
- cssutils version: 2.15.0
- Python version: 3.x
Description
overflow-wrapis not in the known properties list, causing the following warning:Property: Unknown Property name. [overflow-wrap]Background
overflow-wrapwas standardized in CSS Text Module Level 3 as the officialreplacement for the IE-era
word-wrapproperty. It has been supported in allmajor browsers since 2017 and is defined here:
https://www.w3.org/TR/css-text-3/#overflow-wrap-property
Suggested Fix
Add
overflow-wrapto theCSS Text Level 3profile incssutils/profiles.py:Workaround
Users can currently work around this by manually registering the property:
Environment