Famo.us Surfaces have a single way to set the size of a surface. They have a "size" property that takes an array of 2 numbers which correspond directly to pixel values. This is not overly useful when dealing with mobile devices given the large number of different screen sizes. This will require the user to do math on the size of the parent container rather than Famo.us doing the math behind the scenes.
If one of the values is not given, it will use 100% available of that dimension, but there is no way that I can see to specify 50% or 33%.
var firstSurface = new Surface({
size: [100, 400],
content: 'hello world',
properties: {
color: 'white',
textAlign: 'center',
backgroundColor: '#FA5C4F',
width: "200px"
}
});
The "width" property doesn't do anything whether or not the 0th array element is removed, even though it's claimed that you can use CSS properties in camelCase. I assumed this would be the proper way to use %'s, but it is not.