premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Improve core CSS parser. #129

Closed stoivo closed 3 months ago

stoivo commented 2 years ago

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

grosser commented 2 years ago