Mistake in documentation and examples

@jessegrosjean,

I noticed that item[empty] stoped working at one point. I knew that we also had item[leaf] and it did the same, but according to the documentation and the example stylesheet, item[empty] was the way to go. Now leaf works and empty doesn’t. I have no strong feeling whether one sounds better than the other one, but I think that at this point, the documentation should change so that people are not following the documentation and the example

Again, thank you for all the hard work.

I “think” these attributed are still working. Try:

item[leaf] {
  handle-color: red;
}

item[empty] {
  handle-color: green;
}

leaf matches all items without children.
empty matches all items without text AND without children.

It might be that changes in the default theme rules made your theme’s rules have different effects… but I think the underlying attribute behavior is still the same.

I figure it out. If you place empty before leaf, then leaf overrides the behavior. Since I had both and empty was before leaf, the last was overriding the former’s.

Thanks

1 Like