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?
Asked
Active
Viewed 123 times
1 Answers
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.
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
-
Read your question too fast, I will edit with respect to styling the `pseudo CSS` – talves Nov 06 '14 at 19:40