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
(2013-04-30, 12:16 AM)labrocca Wrote: [ -> ]I don't get how LESS is better when the example itself requires more code than it's output.

http://less2css.org/

Straight CSS is not complicated. Why would I need to learn more functions and language crap to write basic CSS?

http://lesscss.org/#reference

I think someone had too much time on their hands. As if anyone really needs all that anyways.

I really don't see why the trend in webmastering is to complicate every simple task possible.

I don't use LESS but SASS is generally the same. Developers uses pre-processors to write code faster. For example:

#sidebar {
     width: 450px;
     .widget {
      background: #eee;
      ul {
           li {
      padding:L 10px;
           }
       }
    }
}

Is a very popular reason why pre-proc's are awesome. It'll generate the proper syntax without the developer spending time writing out/copypasting the parent and children.

It just saves time while developing websites. Extends what you can do with CSS.

But it's really a useless suggestion. MyBB shouldn't add this. Besides, coding CSS for it will be less painless anyways since they're implementing codemirror.
The LESS demo is pretty...awful. You shouldn't be using LESS if it's only that small amount of code. LESS is useful when you have a large file where you're referencing @theGoodThings multiple times.
Quote: It'll generate the proper syntax without the developer spending time writing out/copypasting the parent and children.

I don't see how that syntax is easier and it's not less code.

View my attachment.

The code example above outputs this in CSS:

#sidebar {
  width: 450px;
}
#sidebar .widget {
  background: #eee;
}
#sidebar .widget ul li {
  padding: L 10px;
}

So you retype #sidebar and .widget a couple times. Not sure about you but if you're up to these tricks to save time here is a tip...type faster.

I'd much rather write pure css than deal with more syntax, extra javascript, and complicating my development with stuff I don't need.
(2013-04-30, 12:48 AM)labrocca Wrote: [ -> ]I'd much rather write pure css than deal with more syntax, extra javascript, and complicating my development with stuff I don't need.

As I said before, it's there if you want it. And the thread that I linked to, Euan's tutorial on 1.6 - the file is about 30KB in size, all php, no js.
Or you could just write your CSS in LESS and compile it using their application.
Is a pre-processor really important when the average user will edit a line or two in a theme stylesheet then carry on with their business?

This kind of thing is overkill. If you want to use LESS or SASS or whatever, write your stylesheets using your own software then import the stylesheet into MyBB.
@Labrocca the usefulness of SASS/LESS comes in when you use mixins. If you use Compass with SASS, you can ditch browser prefixes completely and instead use things like "@include box-sizing(border-box);" which is transformed into the valid CSS3 with all the required vendor prefixes. If you do a lot of CSS work, this can save you a ton of time.

Granted, it might not be too useful for forums where you only tend to edit a few lines at a time as stated above, but it is supremely useful if you're building a large site from scratch.
I agree that it's very useful on large scale projects and I've mean meaning to try them out (I currently write out everything by hand). One of these days. Smile
SASS + Inuit.css = the perfect combo for me.
(2013-04-30, 12:48 AM)labrocca Wrote: [ -> ]
Quote: It'll generate the proper syntax without the developer spending time writing out/copypasting the parent and children.

I don't see how that syntax is easier and it's not less code.

View my attachment.

The code example above outputs this in CSS:

#sidebar {
  width: 450px;
}
#sidebar .widget {
  background: #eee;
}
#sidebar .widget ul li {
  padding: L 10px;
}

So you retype #sidebar and .widget a couple times. Not sure about you but if you're up to these tricks to save time here is a tip...type faster.

I'd much rather write pure css than deal with more syntax, extra javascript, and complicating my development with stuff I don't need.

That CSS is outdated, technically speaking.

IDs should never be used for styling, and the descendant selector should be avoided as much as possible. In that case, I'd add a class to the ul and just style it that way.

Just sayin'.
Pages: 1 2 3 4