Each element type comes with its own CSS classes, so you can upload a file named PennController.css under css_includes in your Ibex project and define your own aesthetics.
When an element is printed, it is included in a container element along with two siblings: a before and an after node. As an illustration, here is what the structure of a Text element that you add with [js]newText(“dots”, “…”).print()[/js] looks like:
.PennController-Text-container
.PennController-dots-container
.PennController-Text-before
.PennController-dots-before
.PennController-dots
.PennController-Text-after
.PennController-dots-after
So if you wanted to add 10px above and below each Text element on the page, you could write this in your PennController.css file (remember that Ibex automatically adds the controller’s prefix):
[css]
.Text-container {
margin: 10px auto;
}
[/css]
Say you want to underline this specific Text element:
[css]
.dots {
text-decoration: underline;
}
[/css]
Or in this case, you could also use the css settings command directly on the Text element:
[js highlight=”2″]
newText(“dots”, “…”)
.settings.css(“text-decoration”,”underline”)
.print()
[/js]
Index
- Installing PennController
- Ontology
- Aesthetics
- Preloading resources
- ZIPped resources
- Spreadsheet (CSV)
- Canvas creation
- Setup for audio recordings collection
- Commands by element categories
- Standard Element Commands
- Audio element
- Button element
- Canvas element
- Function element
- Html element
- Image element
- Key element
- Scale element
- Selector element
- Text element
- TextInput element
- Tooltip element
- Timer element
- Var element
- Video element
- VoiceRecorder element
- Youtube element
- Special clear command
- Special end command
- Global PennController Commands
- PennController
- PennController.AddHost
- PennController.AddTable
- PennController.CheckPreloaded
- PennController.DownloadVoiceButton
- PennController.FeedItems
- PennController.Footer
- PennController.GetTable
- PennController.GetURLParameter
- PennController.Header
- PennController.InitiateRecorder
- PennController.PreloadZip
- PennController.ResetPrefix
- PennController.Template