Missing CSS property: overflow-wrap
- Dominant language
- Python
- Stars
- 92
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
### 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`:
```python
# 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:
```python
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Open cssutils/profiles.py and read the CSS3_TEXT profile where the known property names and value patterns are defined. Add the missing property entry there, then verify that overflow-wrap is recognized without the unknown-property warning and accepts the values described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, python
- Domain
- tooling, web-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100