0

Do famo.us surface have any support for pseudo CSS selectors? Specifically, I'm trying to style the placeholder text on an InputSurface. Any way of doing this without giving it a class and using CSS?

nicholas
  • 14,184
  • 22
  • 82
  • 138

1 Answers1

2

Famo.us at this time has not created any special pseudo-element styling helper. Famo.us supports the changing of styles through setProperties of the Surface object.

Surfaces in version 0.3.0 also support the attributes option. Add an attribute for the placeholder as shown in the code below.

Example of working code here

  var surface = new InputSurface({
    size: [200, true],
    content: '',
    attributes: {
      placeholder: 'Enter Something'
    }
  });

You could also use the setAttributes method:

  var surface = new InputSurface({
    size: [200, true],
    content: ''
  });

  surface.setAttributes({ placeholder: 'Enter Something'});
  surface.setProperties({borderColor:'red'});
talves
  • 13,993
  • 5
  • 40
  • 63