Missing CSS property: overflow-wrap
- Lingua principale
- Python
- Stelle
- 92
- Fork
- 30
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Apri cssutils/profiles.py e leggi il profilo CSS3_TEXT, in cui sono definiti i nomi delle proprietà note e i pattern dei valori. Aggiungi lì la voce della proprietà mancante, quindi verifica che overflow-wrap venga riconosciuta senza l’avviso di proprietà sconosciuta e accetti i valori descritti nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- css, python
- Ambito
- tooling, web-dev
- Tipo di issue
- Bug
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 78/100