0

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.

4
  • which specific page do you want to add CSS?
    – Priya
    Commented Jun 21, 2023 at 5:34
  • on product listing page.
    – Cv Gandhi
    Commented Jun 21, 2023 at 13:02
  • magento.stackexchange.com/questions/137439/…
    – Priya
    Commented 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
    Commented Jun 30, 2023 at 13:06

1 Answer 1

0

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>
2
  • 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
    Commented Jun 20, 2023 at 13:21
  • @Cladiuss yes thats the main challenge here.
    – Cv Gandhi
    Commented Jun 21, 2023 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.