As more academic and academic related staff adopt the ‘individual as institution’ approach, institutions must reflect on their response. Readers familiar with Twitter may be familiar with the phrase “The views expressed here are mine and do not reflect the views of my employer”. This is an often cited phrase designed as a response to risk averse “social media policies”, which have the effect of further distancing the individual and individual thought from host institutions.
I have skimmed over nth-child (css) for the past few years, effectively ignoring it and boy was I silly for doing so. Picture this typical scenario:
I often have items in a list that are laid out horizontally and covering multiple rows. Until I discovered nth-child I was closing that list at the end of each row and starting a new list for each row so that I could control the margins and padding to ensure each item was correctly aligned.
Although this works it is very wasteful and assumes that all rows are different which isn’t always true. Then I stumbled across a tutorial by Trevor Davis who works at the amazing Viget. In a tutorial about css-transforms and diamonds I discovered he was using nth-child to change the margin for items that start on each row and it was this explanation that was my light-bulb moment with nth-child.
Over at Css-tricks where I could lose days learning new techniques they explain how nth-child works very well and I suggest you head over there now to see it in action.
I have just added nth-child to my base templates and implemented it for a current project for CUPP. On the Shop page I have used nth-child to space the 4th and 5th items so they can sit nicely between the row above.
This week Amber Thomas released an ebook of all her blog posts from the Jisc digital infrastructure team blog.
Having read pretty much all of those posts over the years and getting a lot out of them, returning the favour by way of an ebook was the least I could do.
Amber explained how everything went pretty well so I don’t have much to add except that including any comments from a blog is a rather interesting point for consideration which i’ll save for a future ramble.
So dust off your ebook reader (oh no he didn’t!) and enjoy the best of Amber Thomas.