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.

asked Jun 20, 2023 at 10:10
4
  • which specific page do you want to add CSS? Commented Jun 21, 2023 at 5:34
  • on product listing page. Commented Jun 21, 2023 at 13:02
  • magento.stackexchange.com/questions/137439/… 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. 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. Commented Jun 20, 2023 at 13:21
  • @Cladiuss yes thats the main challenge here. Commented Jun 21, 2023 at 13:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.