Magento ver. 2.2.0-dev
I want to make changes in style.css which is located at "pub/static/frontend/mytheme/mytheme_default/en_US/css/style.css".
If I make any changes in this folder directly no changes are taken place.
There is a file style.less in /app/design/frontend/theme/theme2/web/css
Update:
i created a file style.css in /app/design/frontend/theme/theme2/web/css/style.css
and called the same class as defined in "pub/static/frontend/mytheme/mytheme_default/en_US/css/style.css"**
with some changes and run php bin/magento setup:static-content:deploy from putty still it caches old styles.
then flushed cache also
Flushed cache types:
config
layout
block_html
collections
reflection
db_ddl
eav
customer_notification
config_integration
config_integration_api
full_page
translate
config_webservice
Update:
CSS is not merged from admin panel.
I commented old pub and run deploy - f, still CSS not updated and all the images are not showing. In the console, they are showing 404 for all images.
image path http://website.in/pub/media/Plazathemes/brandslider/images/2/_/2_2.png what to do.
Any suggestions.
Thank You.
1 Answer 1
You need to change in style.less or style.css in your theme folder and then deploy content as follows.
php bin/magento setup:static-content:deploy
You need to run above command from Magento 2 root directory.
-
There is no style.css in my theme , so I must change in style.less or I should make a style.css and make changes to those classes which I wantinrsaurabh– inrsaurabh2017年05月05日 08:38:00 +00:00Commented May 5, 2017 at 8:38
-
Yes. You can do the same.Kishan Patadia– Kishan Patadia2017年05月05日 08:57:38 +00:00Commented May 5, 2017 at 8:57
-
I tried what you suggested, still, css is not updating.inrsaurabh– inrsaurabh2017年06月02日 11:40:43 +00:00Commented Jun 2, 2017 at 11:40
-
I am accepting your solution as i make changes in style.less file and then deployed , style.css in pub is updated. My problem is solved
but , is it necessary to write in less always because if i create .css in same folder and then deploy nothing happens.inrsaurabh– inrsaurabh2017年06月03日 06:24:25 +00:00Commented Jun 3, 2017 at 6:24