haystack / listit

The listit lightweight notetaking client
http://listit.csail.mit.edu/
MIT License
9 stars 6 forks source link

Color scheme #220

Open xiangcy opened 10 years ago

xiangcy commented 10 years ago

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 commented 10 years ago
  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.