Change css dict to a list,
even though this introduces O(N) complexity, it fixes a bug
where path dependent css traits could be executed out of order,
making it impossible to actually set the traits from the back-end.
Merge pull request #5936 from jdfreder/i5821

Change widget css dict to a list,