---
title: "Comment by Richard Uie on \"DRY HTML or DRY CSS? 🤯\" | Hashnode"
description: "Almost without exception, I find it dead simple to keep HTML DRY with either Java or PHP, using the Composite View pattern. &#39;Tis exceedingly rare that I fin"
url: "https://hashnode.com/posts/dry-html-or-dry-css/5c94e11e1e0fb7505b9b1093/comment/5c97dbd72b0e27997ad3c84c"
---

[Discussion](https://hashnode.com/posts/dry-html-or-dry-css/5c94e11e1e0fb7505b9b1093)

Comment [DRY HTML or DRY CSS? 🤯](https://hashnode.com/posts/dry-html-or-dry-css/5c94e11e1e0fb7505b9b1093)

[Richard Uie](https://hashnode.com/@RichardUie)

[Mar 24, 2019](https://hashnode.com/posts/dry-html-or-dry-css/5c94e11e1e0fb7505b9b1093/comment/5c97dbd72b0e27997ad3c84c)

Almost without exception, I find it dead simple to keep HTML DRY with either Java or PHP, using the Composite View pattern. 'Tis exceedingly rare that I find cause to _wet_ my HTML.

On occasion, I specifically choose to ignore my CSS validator and be intentionally less DRY with CSS in order to pander to the less machine-like aspects of me and any other humans on my team.

I may be less DRY with CSS in order to promote a looser coupling of HTML subviews. This motive is especially relevant when there is uncertainty about the ongoing evolution or even existence of some subviews.

I ain't sayin' I recommend going extremely unDRY with CSS, but I am willing to repeat a style property (or six) for the sake of visually organizing the properties according to tags (rare), classes (less rare), or ids (least rare). Over time, I may elect to refactor the CSS declarations to make them DRYer, but not always.

Less DRYness in CSS is especially true of late addition elements to long-established pages or temporary elements that I know beforehand will have a very short lifespan.

I take my HTML very DRY, like my martinis. My CSS is shaken and has more vermouth.
