Parsing RGBA hex codes fails (feature from CSS Color Module 4)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 92
- Fork
- 30
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
When a stylesheet with RGBA hex codes is parsed, it triggers `ERROR`-level logs.
Quick proof from an interactive Python session using `cssutils==2.15.0`:
```bash
$ python
Python 3.12.3 (main, Jun 19 2026, 12:46:00) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cssutils
>>> cssutils.parseString("body { color: #00808080; }")
ERROR PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): ('HASH', '#00808080', 1, 15)
ERROR No content to parse.
ERROR PropertyValue: Unknown syntax or no value: #00808080
ERROR CSSStyleDeclaration: Syntax Error in Property: color: #00808080
cssutils.css.CSSStyleSheet(href=None, media=None, title=None)
```
_CSS Color Module 4_ documents that as a supported syntax (8-digits): https://drafts.csswg.org/css-color/#hex-notation
I guess it's linked to #29 which covers a generic need to implement features from the _CSS Color Module 4_.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Start by reproducing the issue with cssutils.parseString("body { color: #00808080; }") and trace the parser path for color values. Check the existing handling of CSS Color Module 4 hex notation; done means 8-digit RGBA hex colors parse without ERROR-level logs or property syntax errors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- web-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100