LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
234 stars 258 forks source link

Redundant theme CSS #1343

Open Vishwas-Adiga opened 5 years ago

Vishwas-Adiga commented 5 years ago

Every theme has its own CSS file, each around 20KB, most of which is just redundant code. The new CSS variables can be used instead.

For instance, style_prism.css, style_tan.css, and style_light.css each have the same code for the same classes and ids. Alternatively, all these styles can be added to style.css where the colours, fonts, and other parameters can be CSS variables.

These variables can be set in each style CSS file, thereby greatly reducing the file size of each theme and reducing repetition in styles.

Vishwas-Adiga commented 5 years ago

I am working on refactoring the themes as suggested in the description above.

aethelwulffe commented 5 years ago

My goal for this has always been:

Dump Light and Tan (to the contribs) and work on perfecting Prism.  Prism should be perfected to the point that you can use preferences to make it LOOK LIKE Tan or anything else, and even save configurations.  We want color (with contrast restrictions), button/menu/tab proportion, whitespace settings controllable by configuration.

We have already dropped a great number of themes.  Light theme is very difficult to use in some workflows.  Some like TAN, but there are issues with that in some things too.  I used to like the purple theme, but gave it up for prism which I could tweak well enough.  Light theme is default, and it is the most problematic (or it has been in the past).  Better to have just one that is good quality, and none of this duplicate code in the core.

On 2018-12-07 11:59, Vishwas Adiga wrote:

I am working on refactoring the themes as suggested in the description above.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr/issues/1343#issuecomment-445296713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzFwlIlnck0adnrDBLWF5xvHtL8DzAks5u2p5rgaJpZM4ZIzW9.

KoniKodes commented 5 years ago

@aethelwulffe I like having more than one option for theme, as the users have different needs (color blind, light sensitive...).

I agree the Light is not fun to work with. The Tan seems to work well, but the Purple is pretty. I must admit that I don't understand Prism.

I do like @Vishwas-Adiga idea of having one strong style file. But I can also see how the file can quickly become bulky and cumbersome.

aethelwulffe commented 5 years ago

We want one set of style sheet (plus RTL layout etc...) and accessibility configurations of the colors, sizes and settings. -Yes, I want to use Prism to recreate Purple. That is my goal. Having a single file that contains all the REPLICATED code will make the file content smaller. The only thing in individual files are the DIFFERENCES if he does this.