Category Archives: Web

Basic Style Guides in WordPress

I have built or maintained a number of custom WordPress themes over the last few years and I’m big on making testing/validation as easy as possible.  I’ve had some experience with unit testing through my Symfony and Python work and I wanted to do the same with WordPress.  However, testing the look and feel of a website doesn’t easily fall within the scope of unit tests. When I first heard people talking about style guides, it felt like an intriguing and natural solution to this problem… But how to make use of it?

Continue reading

Making clickable table rows accessable

This particular issue came up for me at work.  The project in question uses AngularJS and bootstrap.  We had a table where the rows were already clickable and opened up a modal popup (id = #recordModal) to edit the record.  However, it was not accessible via the keyboard.

<table class="zebra record-list" cg-busy="'tracker'">
    <tr ng-repeat="record in list
            data-toggle="modal" data-target="#record-modal"
        <td>{{ record.field1 }}</td>
        <td>{{ record.fieldN }}</td>

Continue reading

JavaScript, Fractions, and DOM Manipulations: A Proof of Concept

As part of a Django App I’m building, I wanted to be able to scale a list of numeric values that also happened to be fractions.  Furthermore, I wanted to do this completely in browser without incurring a call to the server each time I needed to recalculate.  To accomplish this, I found a library on github that nicely handles doing math with fractions (Ratio.js), then manually modified the HTML table’s DOM where the values to be scaled were stored/displayed.  The following was a proof of concept, and I make no claims that this is the best way to do this.

Continue reading

Book review: Responsive Web Design by Ethan Marcotte

My own thoughts…

As a person diving back into the web world, I found this book an incredibly helpful and invigorating read. The examples in the book are intuitive, easily conveyed, and reinforced; but they do require some prior knowledge of HTML/CSS.  From a technical perspective, Ethan focuses on 2 main ideas: relative/flexible sizing of a page’s physical layout and media queries to define different behaviors within different (width specific) contexts.  When I finished the book, I was excited not only at the prospect of rereading it, but also about reading many of the articles he references and to hack on my own learning projects for some hands on experience.  I cannot remember the last time I read a programming book with that much interest. Continue reading