the wonderful world of bugs
Post on 17-Oct-2014
3.016 views
DESCRIPTION
The talk I gave on CSS bug hunting during @media 2006TRANSCRIPT
![Page 1: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/1.jpg)
The Wonderful World
of Bugs
1by Andy Budd of Clearleft.com
![Page 2: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/2.jpg)
Hacks
2by Andy Budd of Clearleft.com
![Page 3: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/3.jpg)
How many people feel they use too many hacks?
and how many people feel that use too few?
3by Andy Budd of Clearleft.com
![Page 4: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/4.jpg)
Hacks have been
given a bad name…
…literally
4by Andy Budd of Clearleft.com
![Page 5: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/5.jpg)
Wouldn’t be here
today if it wasn’t for
CSS hacks
5by Andy Budd of Clearleft.com
![Page 6: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/6.jpg)
Sadly, hacks have
become synonymous
with CSS
6by Andy Budd of Clearleft.com
![Page 7: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/7.jpg)
It doesn’t have to be
this way…
7by Andy Budd of Clearleft.com
![Page 8: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/8.jpg)
Bug Fixing
8by Andy Budd of Clearleft.com
![Page 9: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/9.jpg)
Browsers are buggy…
9by Andy Budd of Clearleft.com
…but not as buggy as we’d like to think
![Page 10: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/10.jpg)
Bugs come from
lots of places•Syntactic errors
•Specificity clashes
•Overly complicated code
•Browser bugs
•Incomplete understanding of the
CSS specification
10by Andy Budd of Clearleft.com
![Page 11: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/11.jpg)
Andy’s first law of bug fixing…
…keep it simple (stupid)
11by Andy Budd of Clearleft.com
![Page 12: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/12.jpg)
Andy’s second law of bug fixing…
…always assume it’s your fault
12by Andy Budd of Clearleft.com
![Page 13: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/13.jpg)
Andy’s third law of bug fixing…
…prevention is better than cure
13by Andy Budd of Clearleft.com
![Page 14: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/14.jpg)
Andy’s fourth law of bug fixing…
…offence is the best form of defence
14by Andy Budd of Clearleft.com
![Page 15: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/15.jpg)
Andy’s fifth law of bug fixing…
…isolate the problem
15by Andy Budd of Clearleft.com
![Page 16: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/16.jpg)
Andy’s sixth law of bug fixing…
…use hacks only as a last resort
16by Andy Budd of Clearleft.com
![Page 17: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/17.jpg)
Using Hacks Sensibly
17by Andy Budd of Clearleft.com
![Page 18: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/18.jpg)
Types of Hack•Hacks that rely on parsing bugs
•Hacks that rely on unsupported or
misinterpreted CSS
18by Andy Budd of Clearleft.com
![Page 19: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/19.jpg)
Good hacks…
19by Andy Budd of Clearleft.com
• Are valid
• Only target older browsers
• Are ugly?
![Page 20: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/20.jpg)
Responsible hacking
• Use hacks sparingly
• Only add a small number of hacks to
your main CSS
• Better to filter hacks into separate
stylesheets
• Always comment your hacks
20by Andy Budd of Clearleft.com
![Page 21: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/21.jpg)
Questions?
21by Andy Budd of Clearleft.com
![Page 22: The Wonderful World of Bugs](https://reader034.vdocuments.mx/reader034/viewer/2022051322/5441c6d3afaf9f52208b47df/html5/thumbnails/22.jpg)
Thanks you!
http://www.andybudd.com/atmedia06
22by Andy Budd of Clearleft.com