Live and learn

Take a step out of your normal environment and you learn a lot. I’ve had the luxury of having most of the control over the markup & css on previous projects I’ve worked on. With the last five web applications I’ve written in the 2011-2010 year I’m surprised I never caught some of the things I’ve learned from working on someone else’s project. If markup was created dynamically I had access to put what markup was being created and that was that.

Except recently I’ve been contracted at Touchstone which has a great team of I think eight other developers. So now I like a fish out of water, I’m not controlling everything which is okay in fact it’s nice because now I can focus more on what I want to do. Recently I was creating a skin for a new site and I noticed it wasn’t applying the style I gave to <strong> correctly. So I look in the code and see how the generated code is adding a <span> inside the <strong> so it’s pretty much doing <strong><span>Sample</span></strong>, and I’m thinking why isn’t this picking up the style?

I mean come on it’s freaking CSS - CASCADE! style sheets… Well turns out in my css I have the font-style set to normal instead of inherit… so instead of the span inside the strong inheriting the style I applied to just strong it was staying normal…

Sad thing is by having full control over my code I never noticed this and thus if I change it on one of the last sites I built, it’s going to take more time fixing that stylesheet (since I pretty much styled it not to inherit anything) so that site will remain how it is… as for future projects - I shall allow it to inherit.

I thought to myself - How long have I been doing this? Because even though I had my css reset that I used with the year of 2010 in the copyright I know I was using another reset previously that I would later take apart to become my new reset which is becoming more of a base rather than a css reset…

Now I have an idea of why I did it however - Chances are at some point I got sick of people assuming <strong> meant bold - and that <em> meant italic so I did it to make it normal and I would style it how I felt it should be styled later on but that’s only an idea why I’m not 100% sure if it’s correct why I ever did it.

Tags: Css web