0

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.

asked May 5, 2017 at 8:02

1 Answer 1

0

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.

answered May 5, 2017 at 8:26
4
  • 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 want Commented May 5, 2017 at 8:38
  • Yes. You can do the same. Commented May 5, 2017 at 8:57
  • I tried what you suggested, still, css is not updating. Commented 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. Commented Jun 3, 2017 at 6:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.