0
http://websitename.com/pub/static/frontend/organica/organica_default/en_US/css/style.css

I want to change in to this folder. I have no idea where to make css changes

/app/design/frontend/organica/organica_default/web/css

can i create a style.css in above location and remove style.css from pub and then run deploy ?

UPDATE : I changed in style.less file in

 /app/design/frontend/organica/organica_default/web/css and then deploy , every things work.

so my problem is solved but

I have a doubt that is it necessary to make changes in style.less file. can't i create a style.css and make changes in them.

7ochem
7,61516 gold badges54 silver badges82 bronze badges
asked Jun 3, 2017 at 5:23

2 Answers 2

0

Yes you can add a new css for your styles:

<head>
 <css src="Vendor_Module::css/custom-style.css"/>
</head>

But it's not the best way, especially if you have many customizations to do.

answered Jun 3, 2017 at 9:34
5
  • this means in magento 2 using less is standard and we must make changes in less. Commented Jun 3, 2017 at 9:55
  • how to edit .less files Commented Jun 3, 2017 at 11:08
  • Just open the main less file under your theme directory and deploy if your in default or in production mode, new CSS will be generated and replaced in pub folder. Commented Jun 6, 2017 at 15:38
  • Hope you have basic knowledge of less file, they are very simple just some basic rule . sitepoint.com/write-better-css-with-less you can learn some basic from here. Commented Jun 6, 2017 at 15:44
  • Or this one verekia.com/less-css/… Commented Jun 6, 2017 at 15:57
0

I'm making the assumption that you are using this theme here. It's most often best practice to not edit the theme file from a vendor, as there is a chance that your customizations to that theme will be lost in an update. So you are better off making a child theme that inherits from the vendor's. There is a great article here that will show you how.

As a rule (as i think you point out) you never edit anything in the pub folder, as that all gets deleted when you compile your code.

You can follow this post here to get your less files set up correctly, Magento 2 - Overriding CSS without using !important everywhere. There are a lot of good suggestions from all the posters. And when you get the time, set up grunt, it's the best way to work with styles

answered Jul 2, 2017 at 4:05

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.