Wednesday, November 27, 2013

clean up CSS manipulations in Dojo by pulling stuff up to the stylesheet (be less hacky/nasty)

Following up on this, I just replaced this:

domStyle.set(legend, "display", "none");

 
 

...with the following. You might be able to imagine what domStyle and domClass correspond to at the AMD define signature.

domClass.add(legend, "displaynone");

 
 

In my stylesheet I have:

.displaynone {
   display: none;
}

 
 

Now I feel clean and proud of myself.

No comments:

Post a Comment