Sam Croft

Full-stack developer

Using the CSS content property responsibly without compromising your design and markup


Filed in: css, html, Uncategorized, usability

CSS has a wonderful property; content. This property allows extra content to be added to a design directly from your stylesheet. Unlike JavaScript, however, it does not add the extra content to your markup after the DOM has loaded. The content will not appear anywhere in your markup, it only appears in the actual rendering of a page.

The content property can be used to great effect providing it is used responsibly in ways that do not break your page if the content, you are adding via this property, did not exist.


Minimal form markup; simple, slender and semantic


Filed in: forms, html, semantics, Uncategorized

Recently I have been creating a lot of forms for RITH‘s own product, Lemontree. When I create forms I’m always out to write lean markup, as semantically correct as possible while also maintaining enough CSS hooks to achieve the desired layout.

I hate forms that rely on bloated markup and for every form I create I am always left wondering whether or not I could have created something more efficient and correct.