I use RaisedButtons that contain case-sensitive content (long story), but I am unable to set text-transform: none on the inner span element. Using buttonStyle, the transform is applied to the parent div of the span, but the span overrides it with its own inline styles.
<RaisedButton label="foo" buttonStyle={{
textTransform: 'none'
}}/>
With this, I would expect to see foo, but instead I see FOO. This is because it renders to:
<div style="text-transform: none">
<span tyle="text-transform: uppercase">foo</span>
</div>
A solution would be to apply the text-transform the to parent div and then let the span inherit it:
<div style="text-transform: uppercase">
<span tyle="text-transform: inherit">foo</span>
</div>
This way, I will be able to override it with buttonStyle correctly.
I'll be willing to send in a pull request if someone can list me the files that contain this logic.
A possible workaround, pass your button content via children:
<RaisedButton>foo</RaisedButton>
Not ideal, though.
Do you need set this on a case-by-case basis via props, or are all of your RaisedButtons case-sensitive? If you are okay setting text-transform: none for all your raised buttons, you can set this in your custom muiTheme.
raisedButton: {
textTransform: 'none',
},
Ah, good option. Sadly it's only a part of the application :-(
Most helpful comment
A possible workaround, pass your button content via
children:Not ideal, though.