Tag Archives: best practices

The Web Standards Sherpas

Just realizing that with the busy Spring I’ve missed announcing a recently launched project that I’m honored to be serving on the editorial team for. Web Standards Sherpa’s experts provide helpful, pragmatic and up-to-date advice on best practices for web … Continue reading

This entry was posted in web and tagged , , , , , , . Bookmark the permalink.

PNHTagTest Now On GitHub

Taking a moment away from a truly busy summer of client work and other fun projects to bring you this little announcement:

There’s now a permanent home on GitHub for PNHTagtest, a little piece code that I’ve had floating around for ages as an aid for building and reviewing CSS on a project.

Sample of PNHTagTest contents Continue reading

This entry was posted in meta, web and tagged , , , , , , , , , , . Bookmark the permalink.

Minimized HTML5 Attributes, Selectors & jQuery

After working with some HTML5 web forms attributes on a small project I have come to the conclusion that for now it is best to…

Use <input required="required"> not <input required>

Some backstory — A few weeks back I was working on a small non-public web site heavy on forms and thought it would be a good fit as an HTML5 test case. For a variety of technical reasons [input formatting in particular] I didn’t go whole hog into it using all the various input type attributes, but did use the required attribute as a hook for JavaScript based form validation and styling. What I found was that generally there was adequate support for styling and selecting based on this new, and unknown to many browsers, required attribute — Yay! we can use this stuff today! However, there were a few browser CSS selector and jQuery 1.3.2 quirks that lead me to the conclusion that it is safest to use the expanded form of the required attribute and not the minimized or shorter form as HTML5 allows. This gives you the most solid and flexible options when choosing selectors in CSS or jQuery code.

Continue reading

This entry was posted in web and tagged , , , , , , , , , , . Bookmark the permalink.

Pseudo Pseudo-Classes

Some of the most powerful CSS2 and CSS3 selectors defined in the specs are avoided by web developers because they’re not supported by commonly used web browsers. Sometimes in order to work around these shortfalls solutions with large overhead such as javascript libraries are used or code becomes littered with many specialized classes and sites become difficult to maintain.

Over time I’ve developed the habit of using specifically named class attributes to represent exactly where a pseudo-class would have applied. To aid in clarity and maintenance these classes are named with the same text as the name of the pseudo-class being represented.

Continue reading

This entry was posted in web and tagged , , , , , , , , , , , , , . Bookmark the permalink.