On Tue, Dec 18, 2012 at 10:16 AM, Łukasz Mach <[email protected]>wrote:

> W dniu 18.12.2012 16:08, Lex Berezhny pisze:
> [...]
>
>
>> I don't really understand your CSS requirements. Why do you want to
>> dynamically inject the CSS? The complexity introduced in that seems
>> unnecessary. What is the goal or reason for this?
>>
>
> Now, when you need to use some widget (eg. HorizontalSplitPanel), you need
> to go documentation or code or examples of HorizontalSplitPanel, see what
> .css classes it uses, and what should be defined in your CSS, and
> copy&paste it to CSS of your web application. Otherwise - it will look like
> a shit.
>
> It's especially visible in all dialog boxes.
>
> It's annoying. I think it should work in such way, that you just use
> HorizontalSplitPanel, and you have default look of it. Eg - default look
> could be like in https://github.com/pyjs/pyjs/**tree/master/examples/**
> splitpanel/public<https://github.com/pyjs/pyjs/tree/master/examples/splitpanel/public>-
>  and if you want it to look different, you can override it in .css
>
> When using analogy of eg. wxWidgets or pyQT - when you use wx.Button,
> wx.Calendar or something, you just use it - you don't need to worry about
> copy appropriate images to your application, or write definition of look of
> button somewhere in your app.
>
>
>
The simple solution to this would be to have a base.css file with all of
the widgets styled. You can then overwrite it in a custom CSS.

base.css:

.button {
  color: blue;
}

custom.css:

.button {
  color: green;
}

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.

 - lex

-- 



Reply via email to