Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css options #39

Open
pkra opened this issue Aug 10, 2011 · 1 comment
Open

css options #39

pkra opened this issue Aug 10, 2011 · 1 comment

Comments

@pkra
Copy link

pkra commented Aug 10, 2011

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
Copy link
Owner

fbreuer commented Aug 10, 2011

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:
#39

http://www.felixbreuer.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants