Open Scorr opened 7 years ago
Hi Scorr,
PseudoStates are currently for internal use only. In the future, some of them could be exposed as properties. The behavior you described was fixed in 2017.2: When a leaf element is hovered, the entire container parenting chain is flagged as hovered.
If you need this for styling purposes, a current workaround would be to catch mouse move events with a RegisterCallback
A VisualElementAsset allows the instantiation of VisualElement hierarchy from an xml description. Creating custom VisualElementAssets is not currently supported in 2017.2. We are currently working on improvements to this workflow and Uxml support for custom VisualElements will be greatly simplified in 2017.3. Stay tuned!
Please have a look at the previous versions: 2017.2: https://docs.google.com/document/d/19MzE8uTK_UjtYZkrrb7oMuNHF_nFpjBPdBIvgMBRNew/edit 2017.1: https://docs.google.com/document/d/1ZmtPhJqridaJuzoMJUtBlDq26uHHopdF8M1v6H9McTo/edit#heading=h.9kkpbg5kzeeq
Thanks for answering.
Hover does flag the entire chain in 2017.2. However it seems that focus does not (have not tested other pseudo-states). Could you confirm if this is intended behaviour?
Thanks for the workaround suggestion! I'm trying to use it for focus due to the above, but it does not seem to take order into account. Thus:
.test:hover {
background-color: #FFFFFF;
}
.testFocus {
background-color: #000000;
}
Will result in :hover always taking precedence over .testFocus, regardless of the order in the .uss.
When trying to make .testFocus override .test:hover it seems the same workaround is needed for hover, using a .testHover and AddToClassList. Shouldn't it order overrides in order of appearance in the .uss?
Hi all, could you solve my misunderstanding please. I tried to make:
.scrollView.verticalScroller.slider.dragElement
{
width:25;
slice-top:22;
slice-bottom:22;
background-image:resource("Images/Knob Vertical");
}
But it doesn't work. How to change view of scrollView elements?
EDIT: Just realized 3 might not be intended to be public yet, so disregard that.