isElementCenteredInPage()

Our first CSS test doesn’t check much. Let’s do something harder. A quintessential layout problem is centering elements on the page. Can we make an assertion about that? Maybe—but maybe not. We can figure out the element’s size and location, but how can we detect the page width?

  1. E211Why Test-Drive CSS?

    Mon, 16 June ’14
  2. E212Tilting at Windmills

    Wed, 18 June ’14
  3. E213Inventing the Future

    Mon, 23 June ’14
  4. E214isElementCenteredInPage()

    Wed, 25 June ’14
  5. E215Asserting the Layout

    Mon, 30 June ’14
  6. E216A CSS Loading Conundrum

    Wed, 2 July ’14
  7. E217A Promising Beginning

    Mon, 7 July ’14