cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Custom Styling

Regarding Custom Styling

I have a multi store setup on the localhost, one store on the main domain and the other on a sub-domain. As soon as I apply a custom style in default, it never gets applied to the 2nd store i.e. the sub-domain one. Even if I change the scope to the the store on the sub-domain, then to the style never gets applied. This is a bug in the Magento system, I guess.

 

As I have to manually go the the directory and and edit the files in the "\pub\media\mgs\css\2" then only the css is changed for the sub-domain, if that is the scenario, why even these is an option to apply a custom style to the other multiple stores. 

1 REPLY 1

Re: Regarding Custom Styling

Hi @sahebyuvrajsingh 

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

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

1. app/code/Vendor/ModuleName/view/frontend/web/i18n/en_US/css/style.css
2. app/code/Vendor/ModuleName/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.

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!