Connect with:
About Me
Alessandro Annini
I'm a freelance developer currently working at I really love 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
Meta Code | Sizing a Surface within your Stylesheet

Sizing a Surface within your Stylesheet

08 Jul Sizing a Surface within your Stylesheet

Someone asked how they would be able to size a Surface within famous using a stylesheet. Seemed simple enough, but upon first try my render of the object within famous would overwrite the sizing of the object.

The trick is to size your surface with [true, true]:

var surface = new Surface({
classes: ['square'],
size: [true, true]

This allows the surface object to not apply the size (width and height) in famous.
The demo below shows the style changing on events:


, ,