fbreuer / qute-html5

Qute Text Editor - built with web technologies
http://www.inkcode.net/qute
GNU Affero General Public License v3.0
127 stars 6 forks source link

css options #39

Open pkra opened 12 years ago

pkra commented 12 years ago

I was wondering if there could be some global css options.

For example, the blockquote styling is too soft for me (I like having a slightly different background color).

I know I should probably just hack the themes, but I'd love to have your expertise on this. Do you think some global overrides for css-options could make sense (eg. ul, blockquote, headings)?

fbreuer commented 12 years ago

Yes, more options for customizing the styles are definitely a good idea. The question is, which way to go about it.

Up to now, the CSS styles are divided into three independent layers.

1) The "theme" that manages colors, backgrounds, shadows, etc. 2) The "font" which manages fonts. 3) main.css which manages the UI.

Right now, all the HTML elements of the preview are rendered with their default style as specified by the W3C standard. But, as we discussed elsewhere, it may be desirable to tweak at least the style of code blocks. Changing the blockquote style would also be a customization of the style preview HTML elements. The question is now at what level these changes should be implemented.

In principle, I think adding another layer of style definitions would be the best way to go, as changing the style of the preview is yet another separate concern (that should also be reflected in print). There is one problem, however: In your customizations you may well want to refer to the colors of the theme, or introduce new colors that somehow match the theme you are currently using. But this makes your customizations theme dependent. (CSS does not provide a mechanism to pass variables such as "the dominant foreground color" between CSS stylesheets.)

I do not see a way around this, so we have to look for second-best alternatives.

1) Simply add a new preference option, where users can paste custom CSS that is "active" at all times, with all themes. (This may render some themes unusable in practice.)

2) Simply add a new pkra theme to the list of themes. :) Then your customizations would only work with that theme, but the usability of other themes would not be impaired.

Which option would you prefer? Or do you have a completely different idea?

2011/8/10 pkra < reply@reply.github.com>

I was wondering if there could be some global css options.

For example, the blockquote styling is too soft for me (I like having a slightly different background color).

I know I should probably just hack the themes, but I'd love to have your expertise on this. Do you think some global overrides for css-options could make sense (eg. ul, blockquote, headings)?

Reply to this email directly or view it on GitHub: https://github.com/fbreuer/qute-html5/issues/39

http://www.felixbreuer.net