Ableton / aqt-stylesheets

Apply CSS style sheets to QML applications
Other
215 stars 39 forks source link

Parsing issues when using dimensions and colons in CSS #70

Open FMeinicke opened 3 years ago

FMeinicke commented 3 years ago

Hi, first of thanks for this cool plugin!

While playing around with it a little bit I noticed that some things don't seem to work as I expected:

  1. Using dimensions such as px or pt result in a syntax error when they're not inside double-quotes. I.e. font-size: 12px; does not work but font-size: "12px"; does. (Same for font: 12px serif; vs font: "12px serif";.)
  2. When a selector contains a : (colon) the parser also throws a syntax error.

My goal is to use the stylesheets we already have for our QWidget-based application (which heavily utilize Qt's QSS syntax, thus the requirement for having : and :: in the selectors) for QML as well. We just added a part to the application that provides a QML UI inside a QQuickWidget and we want to be able to style it just like we do it with widgets.

I would be totally happy if the parser simply wouldn't throw any errors for the two things I described. (I would love to create PR for that but I'm not familiar with the PEGlib at all, unfortunately.)

But do you think that pseudo-states like :hover or :enabled or even sub-controls could be implemented in the future as well? And generally speaking, is or was your plan at any point to support QSS or is this plugin just for vanilla CSS?