So, I thought it'd be fun to share yours. If you had to pick one or two items from your arsenal of tips/tricks, which would they be?
Ask HN: Your coolest, most useful web design/dev tip?
1–10 of 18 posts
Re: Ask HN: Your coolest, most useful web design/dev tip?
#2Re: Ask HN: Your coolest, most useful web design/dev tip?
#3This may seem trivial/obvious, but if you are working on a large site, or a front end intensive site, it's pretty important and there is a lot of this, even in otherwise clean codebases. If you create lots of subclasses (like "absolute", "red" etc.) you tend to couple the styling of the page with the content in a really messy way (if you go to update the styles of this page you will have to do a lot of html editing as well, which defeats the purpose of external CSS).
Re: Ask HN: Your coolest, most useful web design/dev tip?
#4You'll solve so many headaches with layout, at the cost of having ugly CSS class names.
Re: Ask HN: Your coolest, most useful web design/dev tip?
#5Re: Ask HN: Your coolest, most useful web design/dev tip?
#6My #1 tip is to use a CSS grid system such as 960.gs - http://960.gs/ or Blueprint CSS - http://www.blueprintcss.org/ You'll solve so many headaches with layout, at the cost of having ugly CSS class names.
Re: Ask HN: Your coolest, most useful web design/dev tip?
#7The idea is simple: anything that you're going to put in more than a couple places/files, should be pulled out and put in a separate included file. Your doctype declaration? Your nav bar? Your generic site-wide footer? Put all these kinds of things in includes, update 1 file later and your changes take place everywhere.
Re: Ask HN: Your coolest, most useful web design/dev tip?
#8I know way too many front-end devs/designers who only learned from shitty second hand tutorials, and it always shows.
Re: Ask HN: Your coolest, most useful web design/dev tip?
#9My #1 tip is to use a CSS grid system such as 960.gs - http://960.gs/ or Blueprint CSS - http://www.blueprintcss.org/ You'll solve so many headaches with layout, at the cost of having ugly CSS class names.
Here's why:
Let's say you have a class "column-760" for a 760px wide column. Now let's say you want to re-design the page. Not only do you have to write new styles, you have to go in and remove all the places you've written "column-760" in the actual markup. This entirely defeats the purpose of external CSS, and incorrectly couples style with content. I can't tell you how frustrating it is to work on a page that says something like:
DO use content descriptive class names, DON'T use physically descriptive class names.
Re: Ask HN: Your coolest, most useful web design/dev tip?
#10My #1 tip is to use a CSS grid system such as 960.gs - http://960.gs/ or Blueprint CSS - http://www.blueprintcss.org/ You'll solve so many headaches with layout, at the cost of having ugly CSS class names.
This goes pretty much 100% against my tip. Absolutely DO use a grid system for your design, please DONT'T use a CSS grid framework. Here's why: Let's say you have a class "column-760" for a 760px wide column. Now let's say you want to re-design the page. Not only do you have to write new styles, you have to go in and remove all the places you've written "column-760" in the actual markup. This entirely defeats the pur…
Also, if you're using a template or theme, many of the changes you'd need to make if you were changing the layout would only be made in one place.