Skip to content

Parsing issues when using dimensions and colons in CSS #70

@FMeinicke

Description

@FMeinicke

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions