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

Color scheme #220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Color scheme #220

wants to merge 2 commits into from

Conversation

xiangcy
Copy link
Collaborator

@xiangcy xiangcy commented Dec 12, 2013

This is a very scratch version. Have three problems:

  1. How to make persistent change of color scheme, shall I create a new model, and how should I sync to the server?
  2. How to change another page's view from one page's view?
  3. I find that the CSS files are very nested. Changing a color scheme means changes many CSS rules. Is there a way to handle this?
    Steven, do you have any suggestions? Thank you!

@Stebalien
Copy link
Member

  1. How to make persistent change of color scheme, shall I create a new model, and how should I sync to the server?

I would add color scheme selection to the preferences module/view. Currently it only supports hotkeys, checkboxes, text-inputs, and number-inputs so you'll need to extend it to support a select field.

  1. How to change another page's view from one page's view?

Don't. Take a look at how toggle the editor toolbar in src/js/setup-views.js. Basically give each color scheme a class (scheme-red, scheme-blue, etc.) and add it to the body. Then in the css file, include rules like:

.scheme-red .my-other-selector {
  /* stuff */
}
  1. I find that the CSS files are very nested. Changing a color scheme means changes many CSS rules. Is there a way to handle this?

Clean up the CSS (sorry)... Also, you don't need to change every CSS rule, just open up the element inspector and start adding new css rules until you get it to look how you want. Also, I would put each scheme in a separate file.

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

Successfully merging this pull request may close these issues.

2 participants