MyBB Community Forums

Full Version: LESS CSS Support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I posted this on GitHub a few days back, then I realised it was probably smarter to post it here. Toungue

IMO, MyBB should implement LESS support into the theme editor, even if it's like the code that Euan posted here where it gets transformed into pure CSS on commit.

Should be beneficial to theme authors, especially if it is transformed into CSS - that makes it easier for the end user to understand, instead of staring at a foreign syntax. Of course, if the user doesn't know what LESS is, they can simply use CSS.

Of course, one problem I encountered (and haven't fixed yet) is that variables don't get carried over sessions, so saving and reopening the stylesheet will cause variables to be parsed and lost.

What do you think? I tested it, adding in support on Stylesheet Creation and Editing only took about six lines of code, plus an extra file (the lessc.inc.php Euan posted).
I'd prefer SASS
Yes yes yes yes yes yes yes yes
I just now visited the LESS and SASS websites.

Yes, I have been that out of touch with cool stuff for CSS -- though I knew they existed and sort of what they did. Wow.
Agree, wanted to suggest this myself.
If the rest of the team are in favour, I'd be happy to add it while I make other changes to the style system. Personally I prefer SASS these days though. Not sure if there's a PHP absed compiler for it though.
+1 SASS.

Not sure how feasible it is to add to 1.8 though.
We're already doing a few changes in that department with minification and CDN support. If there's a library out there, it'll only take like 3-4 more lines of code and a new setting.
Well, it would require to maintain and integrate another third-party library. I think this is more suitable as a plugin (shouldn't be hard if the required hooks exist).
Which they don't. So we could at the very least add a new hook or two then?
Pages: 1 2 3 4