How to modify or add CSS properties?

I cannot figure out how Dolibarr actually manage the CSS properties. And I cannot find any information relevant to that in this forum or wikipage.

I would like to modify or add some CSS properties. For instance, for the table part of the Purchase Order module which are managed by the following templates:

  • htdocs/core/tpl/objectline_title.tpl.php
  • htdocs/core/tpl/objectline_view.tpl.php

On core/tpl/objectline_title.tpl.php, there are the following settings for instance:

// Description
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
.
// Price HT
print '<td class="linecoluht right" style="width: 80px">'.$langs->trans('PriceUHT').'</td>';

As we can see above, there are CSS class selectors linecoldescription and linecoluht. However, they don’t exist on any CSS files in Dolibarr.

From what I observed, the only CSS file that is being used by Dolibarr is the CSS file of the theme, e.g. htdocs/theme/eldy/style.css.php. But the above CSS class selectors linecoldescription and linecoluht are not there as well.

The last resort that I can use is to add CSS properties using the style element like on the setting for PriceUHT above.

Do any of you have better suggestions than the above?

And how is the CSS actually being utilised in Dolibarr?

Thanks a lot in advance for your help.

Não entendi o por que da tamanha complexidade do CSS do Dollibar, funções para rendenrizar o que o CSS já faz por nativo, ja fiz temas pro mediawiki, osclass, worpress mas pro Dollibar até agora nem entendi por que o css é .php e tantas funções pra renderizar CSS.

hello @lucianoo6
here it is the english speaking forum; so if you hope for some answer, you should write in this language.
Otherwise i will speak in french, other in russian or chinese, and so on…

I saw this post, even if it is a little late, I put what I did for the community:

In file: style.css.php

Just before this code:

if (is_object($db)) {
	$db->close();
}

Add:

    header("Content-type: text/css");
    // Lire le contenu du fichier monstyle.css
    $content = file_get_contents("monstyle.css");
    // Imprimer le contenu du fichier monstyle.css
    echo $content;

Don’t forget I add monstyle.css file in the same folder.

The CSS included in this file should be recognized.

Works with version 17.0.2

Have a good day,