-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
Selectors matching on a base class are not matched by subclasses.
For example:
// in: TitleBar.qml
Item {
property color color: root.StyleSet.props.color("color")
}
// in: HorizontalTitleBar.qml
TitleBar {
// ... things
}
// in: styles.css
TitleBar {
color: "white";
}
HorizontalTitleBar {
// color: "green";
}
When using HorizontalTitleBar the color property (from the TitleBar selector) is not matched.
To achieve this the rule matcher has not only to match rules for the class' type proper but also for it's super classes. This should be fairly trivial to do, but needs some thoughts on specificity. E.g. for a class setup like
C is-a B is-a A
Z is-a Y is-a X
which rule is more specific:
A Z { }
B Y { }
C X { }
One possible solution is to give all of them the same specificity and let the css-writer resolve ambiguities in the normal way (order, classnames, etc.)
Reactions are currently unavailable