Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5490

How to write different css store wise in Magento2

$
0
0

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

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.


Viewing all articles
Browse latest Browse all 5490

Trending Articles