Connect with:
About Me
Alessandro Annini
I'm a freelance developer currently working at Leaff.it/ I really love famo.us framework and its amazing potential and if you're like me, and you want the web to win, please share some snippet of code for the community and grow faster with us
Categories
Meta
Famo.us Code | Use css syntax for Surface properties instead of camelCase
315
post-template-default,single,single-post,postid-315,single-format-standard,ajax_updown_fade,page_not_loaded,,qode-theme-ver-6.2.1

Use css syntax for Surface properties instead of camelCase

  • so the actual tip here is to just wrap the property names up in quotes?

    backgroundColor -> “background-color”

    and this works?

    • zawaung

      Hi Dc,

      Yeah it works, check out the jsfiddle, javascript section

      from the code: –

      var surface = new Surface({
      size: [200, 200],
      content: ”,
      properties: {
      ‘color’: ‘white’,
      ‘text-align’: ‘center’,
      ‘background-color’: ‘#FA5C4F’
      }
      });