An Event Apart Notes: Nicole Sullivan, Our Best Practices are Killing Us

Grep to for analyze css.

CSS duplication is a web-wide problem.

Started helping facebook optimize thier site and they had 1.9MB of css loading. The same color showing up hundreds of times. Many many color statements and declarations.

  • !important declarations get dangerous. Sites found to have over 500 !important declarations!
  • float is a serious problem when there are a lot of them. It’s better to use some sort of abstraction rather than floating everything for layout.
  • font-size: there should not be a need for more than half a dozen size declarations, use abstraction!

insanity: doing the same thing over and over and expecting different results.

We all have this problem of duplication. CSS (like JS) will let you do anything you want (even if it’s stupid). But we don’t have to do stupid things!

New Best practices

  • Pixels for fonts: became frowned on with ie6, but all modern browsers use pixels, ems and percentages just fine. Why not avoid percentage and ems because they have significant drawbacks and compounding effects.
  • Adding extra syntax/markup: separations of concerns – make functionality overlap as little as possible. Solve one problem at a time and use extra mark-up judiciously (don’t go nuts with dives, but also don’t strip out too much and introduce bugs).
  • Semantics: class names and ids are not usually read by end users, so let’s make sure class names and ids work well for developers. More is not always better. Create abstractions that solve problems one time. Don’t couple CSS too tightly to the content or the display. DRY (Don’t Repeat Yourself – Every piece of knowledge must have a single, unambiguous, authoritative representation within a system).
    Media block (like a SLAT in dan’s talk). Separate structure from chrome (design). May have some extra css class names or divs, but it will cut html and css overall.
  • Classitis: use specificity to accurately target elements. Class order in attribute doesn’t matter, but order in the actually cascade. Specificity grows over time and you end up coding via firebug. !important is like nuclear trump in CSS. Avoid the nulcear option: keep specificity low: avoid IDs, inline styles, !important, and very complex selectors. Apply classes to the element we are trying to affect (not to a parent node). Use class “h6” along with h3 elements for visual and code semantics to play nicely.

Great developers can build amazing things if we move worst-best practices out of our way.

Resources:
oocss – join the oocss google group
csslint.net

An Event Apart Notes: Eric Meyer, The Future of CSS

Cormorant trained to fish for the fishermen. The fishermen tie bands around the birds necks that are. Fishermen fish at night, using lamps they attract bugs, which attract fish, and the cormorant get to fish but cant swallow them and the fishermen take the fish.

Browser vendors are promising us new CSS tools, but don’t actually let us use them. It’s a big tease! Cormorinths are either fish in the hand, diving for fish or still sitting on the shore. A lot of really cool stuff we’ve just been teased with and told we can’t quite use yet.

(SASS and LESS will any and all prefixes.)

  • Transforms: Go for them right now! Widely supported and mainly just for decorations.
  • Transitions: Go for them now! Basically event driven, if the browser doesn’t support them they don’t work and no one needs to know. No reason not to use this stuff, it’s decoration.
  • Animations: These have some issues still. Animations are constant, and the problem is only webkit supported them until recently but then the working group took it went back to the drawing board. Still in production.
  • Multicolumn: Not fully supported yet. Some browsers support the main idea, but none of the details like gutters.
  • Grid Layout: Hang elements off of specified grid lines for layout. Only supported by IE10, but not bug free…
  • Exclusions: define an area that content will flow around. Not locked to rectangular objects (can use alpha channels or svg shapes to define areas).
  • Regions: Define text-flow from one area to another. Requires document structures we are not used to, using empty structure for the browser to implement.
  • Combinations: Using all or any of these elements together.
  • Flexible Boxes: If you have a use case, then go for it. But they are going to be changing the spec for it. It will be a different spec though, so it shouldn’t break.
  • Scoped CSS: using a style but limiting it’s scope to the parent element that imports it.
  • Calc: Really nice, but for now rely on preprocessors. Drawback is that it’s only on first render, if element is updated via scripting
  • Masks, text-stroke, box-reflection: webkit only! And not looking like they will spread.
  • Paged Media:
  • Hyphenation: use now with a good polyfill. (Polyfill – spackeling paste to fill in cracks and crevices – nothing to do with polygons and fills)
  • Gradients: Borderline shore and dive… Really cool, webkit and gecko have totally different syntaxes (to the degree of english and chinese), fun to look at, but a torture to declare. Calling it now, gradients will be web 3.0, rounded-corders was 2.0
  • Border Image: border is defined by slicing an image into sprites and applying it to the border (and even background image). It is supported in a number of browsers though, so use it but don’t depend absolutely on it.
  • Border-radius: fish! Use now and go crazy with it.
  • Web fonts: use it now, but use it wisely (refer to Jake’s talk).

But what can we do about it? Can we prod the working group to move things along.

First thing to do is experiment with the properties! You spread the cool effects, second you find crazy unexpected bugs. Use html5please.us as a guide (even though he disarees with some of their points and they talk about css3, js and stuff as if it is html5). Browsersupport.net documents which browsers and versions of those browsers support css3 properties. CSS3.info (subscribe to the rss to be kept in the loop, as well as the css3 working group). Even subscribe to the [email protected] emails list (and f you’re like me, I know I am, set up a filter and archive it and then poke into it when you have some time. Take it even further and join the w3c with a reduced membership fee for startups (advantage is that you can send a representative to the working group). Also, blog about it! Document what you discover, write it up and publish it, tell others what you’ve written maybe even in the mailing list. CSS samurai documented top 10 failings in each browser and each one got fixed eventually.

We didn’t get here all at once, it’s been here a little there a little. But we are progressing and eventually will get somewhere good. Every day, week and month more support is coming.

An Event Apart Notes: Ethan Marcotte, Rolling Up Our Responsive Sleeves

Henry Adams (Descendant of 2 presidents: great-grandson to John Adams and grandson to John Quincy Adams). He lived between the civil war and world war 1. He witnessed the industrial revolution.

Chaos was the law of nature, Order was the dream of man

Samuel Johnson – funniest man in the 17th Century…

Responsive Design:
1. Flexible of fluid grid
2. Flexible images and media
3. Media Queries

“Solve the parts, not the whole problem.” – Mr Kaizer

1. Layout
2. Staring Small
3. Advertising
4. Media Queries

Formula:
target / context = result

thegreatdiscontent.com
Bootstrap and dribbble and great discontent star big and go small.

We should start small and go big – Yiibu

Site > Structure > Skin > Services > Space Plan > Stuff

Slow constants quick, slow controls quick – Stewart Brad – How Buildings Learn.

Trent Walton – “trade control in photoshop for a network of context” in Responsive designs

Layout is most susceptible to change

Width, hierarchy, density, interaction.

Don’t just hide content on mobile – simplify before you suppress.

Move nav into footer? Link to it in the header

We’ve been too focused on layout and columns and grids.

paul robert lloyd.com
Ads: Keep relative position but have it adapt it’s position. document.write is not friendly. Responsive Advertising: Mark Boulton and Roger Black.

Images and Media:
Images with width: 100%
Media set via javascript? No we don’t need to, let’s use css only, it’s more fluid! Althoug it does require a bit of un-semantic mark-up.
Width x Height = Aspect Ratio
Wrap media in div. Give container a padding-top matching the aspect ratio percentage, position rellative. Give media inside position absolute and width and height both 100%!

BBC – responsivenews.com

Bandwidth is a blind spot. and now extra complicated with image prefetching.

categorizr and craig mod – bibliotype
– Give users choice/options to view content they aer interested in.

Art is Messy – Andrew Stanton, Pixar

Many hands make light work

An Event Apart Notes: Jake Archibald, In Your @font-face

Disclaimer: I have less notes for Jake, but only because it was the most entertaining presentation and he kept my attention so well I neglected my notes.

Font-face has been around a while but no progress. It’s taken us 18 years to get to the point we are at now. This is ridiculous! People are born and receive their complete education in this same amount of time, and browsers, font foundries and wc3 haven’t worked out how to allow fonts online!

ttf – true type
woff
eof

Font squirrel

Font foudries hate you.

Story about earphones landing in the toilet. that is how fonts online makes us feel.

Web font loader

The phases of the internet with media:

  1. Internet is coming, run!
  2. Sell, but with ball and chain attached
  3. Make buying easier and more pleasant than pirating

Serve ttf and eof in a way that works:

He showed lots of text results and different ways different browsers each failed to load fonts in a desirable way: https://github.com/jakearchibald/font-testing (http://lanyrd.com/smwxy)

An Event Apart Notes: Dan Cederholm, Handcrafted Patterns


2011 was a year to step back and learn something new. What else other than the banjo! Banjos are very misunderstood. Learning new things helps us to become better at things we already do. The process of learning can be applied to things we know to break it apart and we can better ourselves.

  1. Imitation – LEARN – view source of greats
  2. Repetition – DO – And do until it reaches second nature – build repetitive patterns
  3. Innovation – apply your own creativity – reinterpret – stylize – own

Frameworks are great tools, but they are learning tools. A good craftsman builds their own tools!

Pears

http://pea.rs/ – common patters of mark-up & styles
-an open source wordpress theme to allow anyone to set up their own library of repetitive patterns.

Let’s be semanticaly correct.

Examples: HTML5 – placeholders, roles (ARIA landmark roles – Jeremy Keith of adactico.com)

stronger css selectors rather than more classes in css. (nth-child() in place of even, odd, alt, classes)

Slats – are blocks of content usually containing an image (thumbnail), title and description and even more optional info(date, tags, etc). They are often teasers of more content that should click through.

Breaking things into patterns you can solve small problems w big impact.

Overview of SASS (I agree with Dan and have been hesitant to implement CSS preprocessors)
Love the idea of preprocessors for CSS

Earl Scruggs revolutionized banjo playing with a new style (Flint Hill Special)
Bluegrass killed the banjo (arguable) by making it too hard for average people to play the new cooler styles.

One reason why CSS didn’t have many of these SASS and LESS features to begin with was the creators didn’t want to make it a complicated language. If you make something too powerful it can get too overly complex and people don’t use it.

There is a pride also in the handcraftedness of the source code. We like tools that plug holes, but don’t mess with our craft. But the benefits of using CSS preprocessors outweighs these nits. It’s easy to install:

$ gem install sass

(There are also tools that can help: Scout) It’s easy to watch a sass file and have it automatically recompile a CSS file on save.

watch $ sass ...

This is beautiful for those who follow the DRY mantra: Don’t Repeat Yourself!

CSS Preprocessors give us: variables, functions (mixins), inline media queries.

Respond or Adapt! Responsive Web Design

Dribbble set with a single breakpoint at 500 in which it makes the ayout of the site fluid. This is so we don’t have to consider the plethora of mobile devices using various sizes around the same.

We should let our content dictate our breakpoints rather than the popular devices dictating the breakpoints. Avoid display:none; give better options or if it’s really not needed get rd of it everywhere.

  1. Embrace Patters
  2. Solve Small Problems
  3. DIY Frameworks
  4. http://pea.rs

An Event Apart Notes: Cindy Li, Inclusive Design

Usability should be called inclusive design so we don’t forget that we shouldn’t leave anyone out!

Indifference toward people = design cardinal sin!

VisionSim – usability ios app.

When designing and coding, think of those with disabilities! (use alt tags properly)
– It’s a big business

Think of color blindness which is a very common “disability” and use a healthy contrast in text on backgrounds.

LayerVault – version control for designers.

Tools – colororacle.org – screen viewing modified for color blindness.

Use technologies to make smart decisions

Keyboard shortcuts [shift + ?] – as seen in google mail and yahoo mail…

Contrast for text and good color choices.

Captcha, could there be a worse experience?

Look at projects in the context in which they may/will be used. Test In Context.

Resources:
simplyaccessible.com
yaccessibilityblog.com/library

An Event Apart Notes: Jeffrey Zeldman, Content First!

Very exciting to hear THE Zeldman!

Do designers actually control what a site always looks like? What is a web designers job anyways? It’s to serve the customer/user, an advocate to give all users a better experience.

Bebo became synonymous for spam for only carrying about conversions no matter what they had to do to get them. Clearing your throat doesn’t always mean you want to go to Berlin!

Design that does not serve people, does not serve business.

Were here to study best practices. Good Web design starts with content. Content should precede design. Templates are not that!

Blogger template design story. Jeffrey and friends were excited to design blog templates with Web standards in mind! But very hard to design a site with no idea what the content would be.

Progressive enhancement: good experience for all! Http://easy-readers.net. Adaptive Web design and responsive Web design = progressive enhancement taken to the next level.

1. Content is a design problem. Goss Web design starts with content. Yet our designers are often hostile to content.
2. If our designers don’t serve content, users well find ways to get the content anyway.
3.progressive enhancement rethinks design to put great user experience (and content) first.
4. Responsive and mobile are creating a new interactive design landscape that puts users and content first.

Speaker at WordCamp Atlanta 2012

I’m proud to announce that I’ve been asked to speak at WordCamp Atlanta this year! WordCamp will be held this weekend and hosted at SCAD Atlanta! My session is titled: From PSD to WordPress Theme: Under the skin. Obviously, I’ll be focusing on themes. We’ll look at what they are, what they can do, how to make one and we’ll also go through the process of creating a theme in my presentation. I know that’s a lot, but I’ll do my best to get it all covered in my time. I’m really excited since this is my first speaking gig at a conference (and also a bit nervous). I’ll be sure to post my presentation slides here as well as submit them to the wordcamp site. I even hear they are attempting to record all sessions to post on wordpress.tv, so I may have a post with that too. Here’s the official session description:

We’ll cover how to get from photoshop to WordPress. There are many different roads to a theme. We’ll go over a few possibilities and then cover getting from a design in photoshop to an actual WordPress child theme while trying not to reinvent the wheel.

Are there any questions you want covered in the presentation? Ask quick and I’ll do my best to work them in!

UPDATE: Here are my slides for the presentation: WordCamp Presentation Slides: From Photoshop PSD to WordPress Theme!

Drupal Summit and Camp Atlanta 2011

I was fortunate enough to be able to attend drupal camp atlanta over the weekend. It was great! I was also able to attend the drupal business summit as well as drupal camp. They were both awesome and I learned quite a bit more than I expected to. Here are some of the highlights for me:

Keynotes

Morning Keynote: The Drupal Revolution – Keiran Lal

Keiran discussed the revolution side of drupal, how it’s played a hand in the world revolutions of late with the help of social media. It is great to see the drupal community making open technology possible to the world.

How Drupal is Transforming the United States Government – Jeff Walpole

This one was perhaps my favorite keynote presentation of the weekend, although it wasn’t all new to me. I was aware of the recent push of gov sites being built in drupal, especially the white house site. It’s a great case study to say, yes, open source is stable and secure and can be used effectively. This talk was interesting in that Jeff discussed drupal positioning and how gov clients are beginning to see the power of open source and developing components and contributing them back to the community. So for example, Georgia could have a site for the state congress and develop a certain functionality, they would then release it back to the community and with a bit of extra work, New York state could implement the same component on their site with little effort. That is a beautiful thing in these days of budget cuts. He is an expert on the topic as well and has written quite a few articles about drupal and .gov sites: Drupal: The New Gov 2.0 Site Builder? and 5 government sites using Drupal effectively for open government initiatives and even State of Georgia Making the Move to Drupal Using OpenPublic

International Collaboration on Drupal Commerce 1.0 – Ryan Szrama

Ryan discussed more the process he and his international team have gone through to progress on this project. He has his roots with UberCart, and with this new venture he’s focusing more on an ecommerce drupal framework for ultra flexibility rather than every option out-of-the-box. Very impressive so far! E-commerce is one area from my experience where there really is no great solution in the Open Source Software world. Magento? e-commerce plugin for WordPress? meh.

Sessions

Image credits to tmgstudio

Think Like a Drupal Developer – Erik Webb – A great way to start the day, getting insight into the why’s of drupal helped me understand other issues throughout the day. Erik set us up with a good base to jump from.

Introduction to Views and Panels. Or, How views and panels will change your life. – Jason Smith – A great insight into the power of views and then panels, code reuse is a marvelous thing.

Tame Your Wild WYSIWYG Editor. – Doug Vann – Very entertaining presentation. Working through live bugs with style and teaching at the same time!


One Theme to Rule Them All!
 – 
Geoff Maxey – This was a presentation about having one theme for desktop and mobile viewers. Using responsive web design techniques to adjust the layout depending on the screen size. A little trouble with the demo, but those things happen.

Beginning Drupal 7 Theming Using Omega – Ben Hosmer, JP McNeal – These guys introducted me to Omega, a great base/blank theme to begin sites from. A bonus is this parent theme already has responsive web design technique built in!

FLEX | 360 Atlanta | Day 3

From the community…
people I saw quickly but didn’t get to attend their session: Renaun showed off his voip app Pacifica,  Zach from Yahoo showing some things available with Yahoo Maps AS3 API, Adam talking about Merapi where you can access Java from AIR apps and Joe showed us some awesome music app he’s working on, keep your ears open for noteflight(?)!

Brad Umbaugh- Practical 3-D: Immersive interfaces for regular people

Brad Umbaugh , Senior Developer @ effectiveui. In the discussion of 3D we pointed out that 3D is associated with the future. There have been many 3d success stories such as: games, CAD, sketchup, maya… But we decided that making good 3D interfaces is a lot different than making 3D interfaces- just because it’s 3D doesn’t mean it’s good.
Brad explained the steps in the 3d graphics rendering pipeline: place object in world coordinate system, illuminate models, transform world coords to viewing coords, perform clipping, project to screen and rasterize. Luckily there are 3d engines that will do all of this so we don’t have to think about it. It takes a lot of Linear Algebra Math. 3d apps are constantly performing lots of calculations, and thus can perform rather poorly.
Brad discussed the process of his Discover Earth Live project. They started project with papervision3d, but had problems with pinpoints and how they were wrapping around the globe as it spun. So, they tried Away3d and it fixed these problems “out of the box”. Another plus to Away3d they found is that it lets us do correct Z ordering.
We then talked about setting up the scene in away3d and making objects and he showed some 3D Globe examples: nike, mars.com, wii forecast, discovery earth live.

Ben Stucki – Reinventing Flex:

Ben an independent flex developer (nice soundtrack by the way), let’s talk about Flex, baby.
He started out giving everyone a pair of red/blue anaglyphic 3D glasses and showing us mr doob’s anaglyphic rendering tests. The 3d glasses work by filtering different colors to give your eyes two different views of the same image. Red filters out the red lines, cyan filters out the green/blue lines.
Ben has his own staging area for code that’s not yet released… lots of it is probably broken… but it is open source (benstucki.googlecode.com).
Ben then walked us through lots of openflux, his project that is rebuilding some built in componentes of flex with different proerties and capabilities in mind. Great job Ben!

Dave Hassoun – Flash Video tips (and tricks)

Dave from realeyes taught us about video codecs! Flash video gives us the compression options of sorenson, on2 VP6 and the famed H.264.
Sorenson is easy on cpu performance, but struggles with good color and quality. For the quality the file size is a bit high, but sorenson is a good standard.
on2 vp6 has high quality image, but lots of processing demand, plus it has transparency capabilities!
h.264 (& AAC/AAC+ audio is the newest with the most bells and whistles. As it’s new it’s only supported by flash player 9 (which is beginning to be less and less of an issue). It does support true HD video (1080p), multi-core support, many devices, and lots lots of metadata.
A general rule (equation) to help with encoding: frame height x frame width x frame rate) / compression = total bits/sec
Tools he mentioned to help with encoding: rools, riva, fmpeg, on2fix, sorenson squeeze, cs & adobe media encoder.
Dave pointed out that flex video integration was simple, but too simple, making it weak. There is only video display, which is very simple. AS3 is way better equipped to handle video.
h264 streaming requires a streaming media server, can stream or seek to any point (non-linear or random access), has quicker playback and is much more secure. H264 contains a lot of metadata: length, dimensions, codec, seek points, cover art, subtitles, audio book chapters, image tracks, and more!
Dave’s tips for video compression: quality in, quality out | use the right codec for the job | be creative | code reusability! write stuff to be reused | metadata is your friend, use it
He gave so many resources! I won’t copy them here, so go check his Presentation Notes and source. Here is one resource though, Tinic Uro‘s blog about the flash player and video.

Juan Sanchez – Degrafa

Juan (better known as scalenine) taught about his open source project Degrafa – Declarative Graphics Framework for Flex. Degrafa uses mxml to make graphics so you don’t have to use the AS3 drawing API! It makes drawing objects more intuitive and allows you to do it using less code! Plus, rather than creating graphics in photoshop and importing the static image (which takes more memory and then can’t be modified), we can bind properties to the graphic and make it dynamic in flex. So far Degrafa allows us to make surfaces, shapes, objects, fills, strokes, groups, geometry compositions, segments, graphic image, graphic text, and even use svg path data, with much much more in the works! Degrafa is a great way to add custom graphics to your app and it supports advanced css as well, so it is very simple to skin your app! Juan showed us many examples of what degrafa can do and promised there is much more soon to come. Thanks for this great library Juan and everyone else at degrafa, and thanks for the T-shirt as well!

Personally, I got the most out of Day 3 at the conferenc! It was awesome! I got to attend sessions about 3D, drawing graphics, and video! Thanks to all the speakers and Big Thanks to Tom and John, who are Flex360!