I need to edit the font for the product titles in the catalog page. I believe it is referenced by "product-item-link" or "product-item-name" ?

1 Answer 1


Please follow below steps:-

1 Create new file catalog_category_view.xml in vendor/module/view/frontend/layout.

2 In catalog_category_view.xml add css file like below:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
         <css src="Vendor_Module::css/style.css"/>

3 Create style.css file in vendor/module/view/frontend/web/css/.

4 In style.css, to change font-size add below code:

.product-item-details .product-item-name .product-item-link{
  font-size: 20px !important; // whaterver font size you want

5 Run commnad php bin/magento setup:static-content:deploy(add -f for magento 2.2)

6 Flush the cache and try again.

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.