Skip to content

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