fiatjaf / coisas

a client-side CMS for editing GitHub Markdown (and other) files
https://coisas.fiatjaf.com/
MIT License
328 stars 29 forks source link

Setting up customization through CSS variables #8

Closed Kapnobatai3434 closed 7 years ago

Kapnobatai3434 commented 7 years ago

(I think I messed up with namings, please check it)

I think I need help with proper namings.

https://github.com/fiatjaf/coisas/issues/3

fiatjaf commented 7 years ago

Thanks!

Have you tried changing these variables in the Chrome/Firefox Developer Tools window and see if the changes matter? Because I see some, like h5prosecolour, that I don't even know where are applied.

Actually, I think we should ignore the entire prosemirror.css file and focus just on the other file, set up general styles, like bgcolour, which I like, but could be named background-color. brdcolour is also good, it applies to the upload and preview boxes, so it should be named upload-preview-color or something like that. editorbgcolour makes no sense, one would think it would apply to both Prosemirror and Codemirror editor backgrounds (we should have a variable for that!), but instead it applies to the metadata editor that appears on top of the actual file contents editor. Name variables by context, not by the immediate CSS selector to which they are applied.

All button colours and are set by the CSS framework with their default class names. We should get rid of these and set our own colours directly with CSS variables, but this should be left for another PR.

Also, please use "color" instead of "colour". I prefer "colour" myself, but since most users of every software in the world are American (or have learned English with the Americans) we are doomed to follow their preferences.

Another irrelevant point: you've defined global CSS variables in two different files. These variables are global and would conflict if let that way (there are variables with the same names in both files).