Missing CSS property: overflow-wrap
- Langage dominant
- Python
- Étoiles
- 92
- Forks
- 30
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Ouvrez cssutils/profiles.py et lisez le profil CSS3_TEXT, dans lequel sont définis les noms de propriétés connus et les modèles de valeurs. Ajoutez-y l’entrée de propriété manquante, puis vérifiez que overflow-wrap est reconnu sans l’avertissement de propriété inconnue et accepte les valeurs décrites dans l’issue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- css, python
- Domaine
- tooling, web-dev
- Type d'issue
- Bug
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Activité
- Calme
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 78/100