C H A P T E R  13


Button Control

Here’s another seemingly simple piece of HTML to make into a control. However, while it may seem like an odd place to invest effort, doing so pays off in consistency, flexibility, and developer velocity. We’ll stick with the fractal design pattern. That is, we’ll use (reuse, really) the same HTML for each kind of button, use Boolean values on the server side to identify which kind of button to display, and create the presentation variations by dynamically setting a CSS class.

images Note We often call each variation ...

Get Pro HTML5 Performance now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.