> Hmm, I bet that almost everyone will call such file "bloat". > >
Web browsers are the most optimized software in existence at this point. Hundreds of millions of dollars have been spent making sure that parsing HTML, CSS and JavaScript was as fast as possible without resorting to quantum computers :-p DO NOT PREMATURELY OPTIMIZE YOUR CSS. Sorry about the caps, just trying to really get the point across. Just don't worry or think about the size of your CSS, it will never be an issue. By the way, I highly recommend you replace your CSS with LESS. That way you can write cleaner style specifications with less code. http://lesscss.org/ Also, I think there should be mechanism of adding style to browser, even > when making custom widgets. Dammed, it's annoying for me even if I must > copy&paste .css between my own projects. > > I still don't really understand what you mean by adding style to browser. Can you describe in a bit more detail what you're doing and why. There is probably a simple solution to your problem but without knowing the details of your workflow and the reason behind why you chose that workflow I can't really help. > >> Try not to think of Pyjs as equivalent to wxWindgets or pyQT. Your life >> will be easier if you think in terms of web design, DOM and CSS. >> >> Pyjs is just a way of using Python to manipulate DOM. Styling is up to >> you. >> > > Ok. Example from web application world - django. When I use admin plugin, > I don't need to copy&paste CSS and copy files by hand - everything looks > nice, and I need to play with .css only when I want to modify something. > > I think that "just works" approach is good no matter if it's web or > desktop application. All of the widgets in pyjs have class tags. There is nothing preventing you from making a base.css file to style the widgets. Then re-use this file across all your projects and overwrite the style however you like. Having a base.css and then custom.css files in each project is pretty much industry standard for web design. You can start a theme/base css project for Pyjs and style it the way you think the widgets should be styled. Then anyone who wants to use your style can just plop it into their public folder and reference it in the HTML. With limited resource and much more important issues to resolve I don't think core Pyjs project should be trying to solve the default theme/styling problem. Although if you put something together that is comprehensive and looks nice maybe it will be integrated into core. Most of the people who depend on pyjs for production systems already have their own CSS and that's why you haven't seen much effort put into a default style. Most people end up with their own custom style anyways. - lex --
