Ableton / aqt-stylesheets

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

Fix that '#' was not allowed in CSS #75

Open FMeinicke opened 2 years ago

FMeinicke commented 2 years ago

The '#' character is used in CSS as the id selector. Since we're using the stylesheets in our application for QWidgets as well as QML we at least need the parser to not fail when it encounters rules like

QLabel#nameLabel
{
    /* ... */
}

This commit does just that: it allows the '#' character as a valid character for identifiers. This results in the parser not failing on rules like the above anymore. However, the above would be parsed as an identifier with the name "QLabel#nameLabel". I don't think that this is a problem since aqt-stylesheets does not support selecting components by id anyway.