My_Changes In 4.2

hi all,

Playing with the new version and Im a little confused about my_changes.

Where exactly do i need to place styles.css fo changes? It’s a bit different than in V3 that i used and in KB there’s not much written about how to make this work.



Also, if saving “modern” theme to “mytheme” is this the right way to start making modifications?



thanks,

css files for my_changes would go into design/themes/[your theme]/addons/my_changes directory.

There's no “Addons” folder in the [color=#282828][font=arial, verdana, tahoma, sans-serif] design/themes/responsive/[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Should I just create it?[/font][/color]

Sorry, it should be design/themes/[your theme]/css/addons directory. You will probably have to create the my_changes folder and then create your less/css file. Remember to add the hook in design/themes/[your theme]/templates/addons/my_changes/hooks/index/styles.post.tpl file that references it.

Great…

Is this path correct:

```php


```


one question also.
As I used theme editor already and made modifications to the modern theme I saved it to Mytheme. and I noticed that in
design/themes/responsive/styles/data two new files:
-mytheme.css
-mytheme.less

should I leave these two files there or they have to be moved to my_changes?

They are fine. Generally, using my_changes is for more new development/projects. If you are simply wanting to change the styling of an existing them, then there's no need to use my_changes, you can just use the theme editor and save to a new theme.

We strongly recommend you to add new .css file with the following code:



{style src="addons/my_changes/styles.css"}

Is there a difference between making css changes using the my_changes add-on vs. putting all new css in the Theme Editor CSS section? I just upgraded to 4.2.1 (responsive theme) from 4.1.3, and I used to put all the code in the Theme Editor, but now (possibly because of the responsive theme), most of the code doesn't work.

[quote name='tbirnseth' timestamp='1408076162' post='189612']

Sorry, it should be design/themes/[your theme]/css/addons directory. You will probably have to create the my_changes folder and then create your less/css file. Remember to add the hook in design/themes/[your theme]/templates/addons/my_changes/hooks/index/styles.post.tpl file that references it.

[/quote]



about .less file. I don't understand this.

So next to styles.css there should be styles.less in /my_changes/hooks/ folder?

The .css is created from the .less. Do a Google search on “less styling”. It is a pre-compile language that is much more readable than css. The .less files are read and compiled into .css files.

it is now recommended to use .less files which the system will compile into the corresponding .css files. However, for now, if a .less file does not exist and a .css file does, the .css file will be used.

Thanks. I will have to read about .less files. :)