css_parser
css_parser copied to clipboard
Improve core CSS parser.
It's still early in development. I have started and wanted to share my progress in case you have some imitate feedback.
Also I have some questions With the existion parser did you but any thouth into what you want to happend to comments? is it ok if we parse them and remove them from the return value?
You can have nested @media queries in CSS3 like below, it is valid but not recomended, it is ok not to parse it?
@media screen {
@media (min-width: 1px) {
@media (min-height: 1px) {
@media (max-width: 9999px) {
@media (max-height: 9999px) {
body {
background: red;
}
}
}
}
}
}
The direction with a StringScanner, does it look ok? It can still be clean up and refactored a but. Also what would you like to name sucha a thing is css_parser? CssParser::Parser::Parser isn't greate
Pre-Merge Checklist
- [ ] CHANGELOG.md updated with short summary
- I don't see any code changes
- never thought/cared about comments, if there are no tests for them feel free to drop ... and even if there are tests but they are hard to implement just drop 🤷
- nested
@media
queries would be nice to support if they were previously supported, but feel free to drop since it seems like an edge-case