Back to Top

How to write different css store wise in Magento2

Updated 8 July 2016

Here we will learn how to create different css file according to store. So we can style our module according to store.

To style your Custom Module according to store you need to create css for each store.

Let’s say our Custom Module is Webkul_DemoModule.

Now create css files for different stores (I have created two stores en_US & fr_FR).

1. app/code/Webkul/DemoModule/view/frontend/web/i18n/en_US/css/style.css

Searching for an experienced
Magento 2 Company ?
Find out More

2. app/code/Webkul/DemoModule/view/frontend/web/i18n/fr_FR/css/style.css

Now run the deploy command for both the store.

php bin/magento setup:static-content:deploy en_US
php bin/magento setup:static-content:deploy fr_FR

Now Change the store view you will see the different style which you have applied.

Here is the result.
Store en_US

write different css store wise magento2

Store fr_FR

 

write different css store wise magento2

That’s it.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home