Install Persian Language.
The Persian admin language folder contains a specific fa-IR.css which is there to override the font used in the backend template to be more readable in Persian.
In this case it is font-family:Tahoma, Geneva, sans-serif;
Switch admin to Persian.
The default body font is now Tahoma.
The code is there in index.php
// Load specific language related CSS HTMLHelper::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', ['version' => 'auto']);
(same issue btw for a custom.css
file.)
The fa-IR.css (or custom.css) is loaded BEFORE loading the template-rtl.css in rtl (or the template.css in ltr). In some cases also before loading boostrap.css.
Therefore they are overriden and now useless.
This was working perfectly in 3.x and before.
Looks related to joomla.asset.json
use instead of simply loading the template css as before.
Labels |
Added:
?
|
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
Obviously. The point is why are we using this Asset Manager and how to solve the issue.
Oh, it's just a wrapper for HTMLHelper: https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/WebAsset/WebAssetItem.php#L301
@SharkyKZ
will do.
In the mean while I found a simple fix by not using the HTMLHelper
$langCssPath = JPATH_ADMINISTRATOR . '/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';
// Load specific language related CSS
if (file_exists($langCssPath))
{
$langCss = file_get_contents($langCssPath);
$this->addStyleDeclaration($langCss);
}
This loads the css after all others.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-07 03:50:27 |
Closed_By | ⇒ | Quy |
I suppose the Asset Manager (used for template CSS) deals with things differently to HTMLHelper (used for language CSS)