stylesheets will change your widget properties, so changing same thing in code and in stylesheet is not necessary. If you want to make widget fixed size with CSS you need to set both min and max size. Otherwise widget may be resized. Try to keep all styling stuff in one place to keep everything clear, as sometimes properties will mix up with those in code and in CSS.
Remember that properties will be changed in order they are applied. So if you apply CSS on application first, then change properties in code, property will keep value from code. If you change property in code and then apply CSS, CSS value will be kept