I want to add some custom css for all of the admin pages for a specific admin role. I tried some methods but none of them worked.
-
which specific page do you want to add CSS?– PriyaCommented Jun 21, 2023 at 5:34
-
on product listing page.– Cv GandhiCommented Jun 21, 2023 at 13:02
-
magento.stackexchange.com/questions/137439/…– PriyaCommented Jun 21, 2023 at 13:12
-
@Priya no this won't work as i want to add css for a specific admin role not for all.– Cv GandhiCommented Jun 30, 2023 at 13:06
Add a comment
|
1 Answer
Add css file in admin
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Vendor_Module::css/test.css"/>
</head>
</page>
-
Could you specify where your code should be added ? Also, I think this kind of instruction will add a CSS file for everyone. You will not be able to add it only for a specific admin role.– CladiussCommented Jun 20, 2023 at 13:21
-