1. iOS/iMessage gradient effect, with css/svg
  2. and good performance
  3. Scroll down to better see the effect.
  4. well, since I need to add some messages here so it scrolls, i might as well explain how it works
  5. it's a bit tricky.
  6. there's a big gradient background, that spans the entire window
  7. the white background you see is actually being added on each message
  8. the bubble shape itself is not a blue bubble, but a white border with a transparent center
  9. Effectively, each message is a "window" through which one can take a peek at the background
  10. A little trick is used to give the bubble shape to the messages.
  11. they have an svg image as a border
  12. using the (little known?) "border-image-source" and "border-image-slice" css properties
  13. ok cool
  14. why not use, like, background-attachment: fixed or something though?
  15. for performance reasons
  16. fixed background makes the browser redraw things every time it scrolls
  17. while doing it this way makes the browser do only a composite operation
  18. that's it, just move things around instead of redrawing them
  19. that's what I gather, anyway
  20. not completely sure
  21. might depend on the browser, gotta test a bit more
  22. ok cool