Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   Different way CSS files are handled, posted by Stefan Ritt on Fri Jun 5 14:24:34 2015 
    icon2.gif   Re: Different way CSS files are handled, posted by Andreas Luedeke on Fri Jun 5 19:01:05 2015 
       icon2.gif   Re: Different way CSS files are handled, posted by Stefan Ritt on Tue Jun 9 09:39:14 2015 
Message ID: 67959     Entry time: Fri Jun 5 14:24:34 2015     Reply to this: 67960
Icon: Idea  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Info  OS: All  ELOG Version: 3.1.0+ 
Subject: Different way CSS files are handled 

Hi,

I just implemented a different way CSS files are handled in ELOG. Previously, we had the default.css, which could be adjusted for specific needs. Some people did that (like myself). So I changed a few colors etc. When I now implement a new feature in elog, it might need a new CSS class which I put in default.css. But this means that people who have modified this file get it either overwritten, or do not get the new styles.

In order to fix this, the default.css is now called elog.css and is always inluded in any ELOG page. If one specifies a CSS file with "CSS = <file.css>", then this CSS file is loaded in addition to elog.css. So one can put only the modifications into that file and inherits all the rest from elog.css. If new features come in elog.css, the installation with the personalized CSS file will then get the new features from the new elog.css automatically, and just overwrite a few settings in the personalized file. Here is an example:

elog.css:

td {
  color:black;
  font-size:12px;

}

Personalized file special.css, activated with "CSS = special.css" in the elogd.cfg file:

td {
  font-size:18px;
}

This personalized file now overwrites the font size from elog.css to 18 pixel, while maintaining all the rest from elogd.css.

The modification is committed to GIT and will be contained in the next release of elog.

/Stefan

ELOG V3.1.5-fe60aaf