My first excursion found this quite difficult. Since
it appears that
textInput's always have class='text'. I solved this by wrapping them in
a div class='agent-code' in a custom component and using the following
to effect the styling.
.contents form .agent-code input.text {
width : auto;
}
I was finding it tricky to target specific input.text elements within a
custom subclass of MATextInputComponent.
how about this change?
MAComponentRenderer-classFor: aDescription
^ String streamContents: [ :stream |
"<mod>"
stream nextPutAll: ((self childAt: aDescription) ifNil: [
component ]) cssClass.
"</mod>"
aDescription isReadonly
ifTrue: [ stream space; nextPutAll: 'readonly' ].
aDescription isRequired
ifTrue: [ stream space; nextPutAll: 'required' ].
(self hasError: aDescription)
ifTrue: [ stream space; nextPutAll: 'error' ] ]
together with
MAComponent-cssClass
"Answer a CSS class that should be used when this component is
rendered."
^ ((self class fullName readStream) next:2; upToAll: 'Component')
asLowercase
best regards
Keith