It seems that older versions of sass can convert automatically between .less and .scss though they've since removed the feature as of about 8 months ago.
I tried to give it a shot but the version installed in Ubuntu doesn't have the dependency and the version installed via gem was too new, but I'd wager it's worth a go.
David Scotson
Posts made by David Scotson
Was just having a look at the Foundation stuff again in light of what we've been doing recently with Bootstrap.
I think you should think about using SASS compilation, not for randomly renaming things to be more semantic, which I agree is often misguided, but to get up and running quickly with the bits of Moodle HTML that can't be changed easily in renderers or layout files, but that you can apply styles to via mixins and variables.
If you ported the .less version of the core Moodle styles in the Bootstrap theme to .scss (which would mostly involve changing some . characters to @, some @ characters to $, mapping a few variable names, and could probably be scripted) you can get a fairly good "base-coat" with relative ease and it also retains a lot of the flexibility that SASS and Foundation offer. And one more set of eyes working on refactoring and stripping down these core styles would be good.
That and changes to layout/general.php are the two big things in the Bootstrap theme at the moment. There's only really two renderers I've found so far that you can cleanly change and have the results appear throughout Moodle (navbar and notification in core, https://github.com/bmbrands/theme_bootstrap/blob/moodle_25/renderers/core.php#L26-L57) so bigger changes to rendererss have been de-prioritized in the hope that the core ones will be re-written on top of a collection of smaller, more focussed renderers (otherwise you're essentially forking large swathes of core code just to make some buttons look nicer, and even then often requiring some wacky maneuvers).
Oh, and I've just noticed that Foundation applies it's styles directly to the table tag. You probably want to change that to be a mixin on .generaltable, so that's another good reason to compile. Even if the remaining tables used for layout in Moodle get fixed, people creating content in Moodle are still going to use them that way.
I think you should think about using SASS compilation, not for randomly renaming things to be more semantic, which I agree is often misguided, but to get up and running quickly with the bits of Moodle HTML that can't be changed easily in renderers or layout files, but that you can apply styles to via mixins and variables.
If you ported the .less version of the core Moodle styles in the Bootstrap theme to .scss (which would mostly involve changing some . characters to @, some @ characters to $, mapping a few variable names, and could probably be scripted) you can get a fairly good "base-coat" with relative ease and it also retains a lot of the flexibility that SASS and Foundation offer. And one more set of eyes working on refactoring and stripping down these core styles would be good.
That and changes to layout/general.php are the two big things in the Bootstrap theme at the moment. There's only really two renderers I've found so far that you can cleanly change and have the results appear throughout Moodle (navbar and notification in core, https://github.com/bmbrands/theme_bootstrap/blob/moodle_25/renderers/core.php#L26-L57) so bigger changes to rendererss have been de-prioritized in the hope that the core ones will be re-written on top of a collection of smaller, more focussed renderers (otherwise you're essentially forking large swathes of core code just to make some buttons look nicer, and even then often requiring some wacky maneuvers).
Oh, and I've just noticed that Foundation applies it's styles directly to the table tag. You probably want to change that to be a mixin on .generaltable, so that's another good reason to compile. Even if the remaining tables used for layout in Moodle get fixed, people creating content in Moodle are still going to use them that way.
Very cool. I'd be very much interested in working with you on renderers that work for both Foundation and Bootstrap (and others). I think there's a lot of stuff that's common to modern frameworks that Moodle should be adopting in it's HTML and that it should be doing so via renderers, so that it's not painting itself into a corner by being too tightly bound to any one framework.
cheers,
dave
cheers,
dave
The theme currently set for mobiles on moodle.org doesn't seem to be related to the work being done in MDL-38016.
It looks like it's based mostly on the MyMobile theme, going by the HTML and CSS, but there was some discussion that someone had been tasked with creating a Bootstrap-based theme for Moodle.org as they commented on a bug I submitted, but I can't remember who it was though.
It looks like it's based mostly on the MyMobile theme, going by the HTML and CSS, but there was some discussion that someone had been tasked with creating a Bootstrap-based theme for Moodle.org as they commented on a bug I submitted, but I can't remember who it was though.
Note some further investigation shows this is much less likely to affect you. There are partial mitigations already in place for this, so only if a) your installed plugins, b) your parent theme or c) your current theme individually cross the 4095 selector limit are you likely to see any problem, which is fairly unlikely unless you're doing something unusual.