I don't know if this is exactly what you want - you can't apply the "small" style this way to the button without copying the css into an own identifier.
Anyhow, workaround: Give the whole upload component a new style name and style the button relative to the upload component.
Code:
Java:
1Window mainWindow = new Window("Test app");
2setMainWindow(mainWindow);
3upload = new Upload("foo bar", null);
4upload.setImmediate(true);
5upload.addStyleName("myCustomUpload");
6mainWindow.addComponent(upload);
7setTheme("testTheme");
CSS:
1@import "../reindeer/styles.css";
2
3.myCustomUpload .v-button {
4 background: none;
5 border: 1px solid black;
6 height: auto;
7 padding: 0 !important;
8}
9
10.myCustomUpload .v-button .v-button-wrap {
11 height: auto;
12 background: none;
13 padding: 0 !important;
14}
15
16.myCustomUpload .v-button .v-button-wrap .v-button-caption {
17 height: auto;
18 padding: 2px;
19}
Result:

So if you want to do your own theme for the button, that'd be the way I'd go. If you'd like to use something predefined, like the small-style, you'd have to copy the whole small style into your theme and add the .myCustomUpload in front of the names.
And yeah, the new immediate upload is quite nice!