Missing CSS property: overflow-wrap
- Vorherrschende Sprache
- Python
- Sterne
- 92
- Forks
- 30
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Öffne cssutils/profiles.py und lies das CSS3_TEXT-Profil, in dem die bekannten Eigenschaftsnamen und Wertmuster definiert sind. Füge dort den fehlenden Eigenschaftseintrag hinzu und überprüfe anschließend, dass overflow-wrap ohne die Warnung für unbekannte Eigenschaften erkannt wird und die im Issue beschriebenen Werte akzeptiert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- css, python
- Bereich
- tooling, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 78/100