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.

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.

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
    – inrsaurabh
    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.
    – inrsaurabh
    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.
    – inrsaurabh
    Commented Jun 3, 2017 at 6:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.