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?Priya– Priya2023年06月21日 05:34:57 +00:00Commented Jun 21, 2023 at 5:34
-
on product listing page.Cv Gandhi– Cv Gandhi2023年06月21日 13:02:38 +00:00Commented Jun 21, 2023 at 13:02
-
magento.stackexchange.com/questions/137439/…Priya– Priya2023年06月21日 13:12:25 +00:00Commented 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 Gandhi– Cv Gandhi2023年06月30日 13:06:10 +00:00Commented Jun 30, 2023 at 13:06
1 Answer 1
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.Cladiuss– Cladiuss2023年06月20日 13:21:09 +00:00Commented Jun 20, 2023 at 13:21
-
@Cladiuss yes thats the main challenge here.Cv Gandhi– Cv Gandhi2023年06月21日 13:03:30 +00:00Commented Jun 21, 2023 at 13:03
default