This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
This issue has come up before, but not for about ten months -- would be good to have an update...
I'm a newbie playing with the demo theme to understand October.
In /assets/less/layouts/all.less
I changed
body {
padding-top: 50px;
}
to
body {
padding-top: 200px;
}
A change that, if successful, would be obvious.
However, nothing changed on web page refresh (<ctrl>-r
).
The first three results from a Google search on october cms preferred way to compile less
are forum posts:
1) How to compile theme.less? 2) LESS compiler for OctoberCMS 3) Updated less files, not showing up after page refreshes..
1) & 2) told me that in /layouts/default.htm
I need to replace
<link href="{{ [
'assets/css/theme.css'
]|theme }}" rel="stylesheet">
with
<link href="{{ [
'assets/less/theme.less'
]|theme }}" rel="stylesheet">
This worked until I made another change.
Then I discovered I could run, php artisan cache:clear
in the TLD.
Now I seem to be able to make any change to a .less
file, and then clear the cache, and the new css is compiled and downloaded to the browser on <ctrl>-r
.
Is this current best practice, or is there a preferred/better way?
Last updated
Ah. Just discovered that, as
Daniel81 said:
Yeah, it's a frustrating bug I've found while working in themes that you have to save the "master" LESS file for any changes to be compiled in "child" LESS files - bit annoying - hope they get round to fixing it soon.
For the phpless compiler to 'see' a change to any .less file, you have to make a change to /assets/less/theme.less
and save it, before then clearing the cache and reloading the page.
Still, is there yet a way to automate this without resorting to Grunt, Brunch, Gulp, ... ?
1-3 of 3