Live data from Hacker News

Why bother with a CSS build process?

lucidchart.com

31–39 of 39 posts

Re: Why bother with a CSS build process?

#31
post #13

I disagree with the first point, the spirit of the web is to be open. The other points do make sense though. On a side note, I'd really like to use LESS or an equivalent, but the way I design/develop (and I'm an admittedly bad designer) is to tweak things in CSS, alt-tab, refresh the browser, and see the changes instantly. Likewise I can open up Firebug and tweak some style to see how it would look, then apply that c…

You might want to check out yeoman, which can run a LiveReload server to auto-refresh the page you're working on, in addition to sass. http://yeoman.io/

Re: Why bother with a CSS build process?

#32

Earlier quoted context omitted.

I think this ignores the other benefits of things like LESS, SASS, etc. For instance, the variable notion for css. Now a change to a named color requires a single place of change - the definition of that color, not each and every place it is used. Similarly, any place you have to have a half a dozen -browser-specific-properties can be replaced with a single "function". These are nice features.

CSS has a mechanism for defining rules in such a way to abrogate the need for variables. I see far too many people using CSS classes to refer to one or only a handful of things, by a strict hierarchy of the layout of their page. In that case, you're almost always going to run into problems with extremely verbose CSS that repeats itself. But it's completely wrong, it's not how CSS is supposed to be done. If you need a…

trust me , using less makes CSS easier to maintain.

Re: Why bother with a CSS build process?

#33

Earlier quoted context omitted.

I think you're taking my tongue-in-cheek reply to a troll a wee bit too seriously :-) We love open source at Lucidchart and employ a lot of people who contribute in meaningful ways to a variety of open-source projects.

Then what was your explanation behind your previous statement?

Might be that the poster had no previous posting or commenting history.

Re: Why bother with a CSS build process?

#34
SASS, imo, is a much more mature and interoperable language.

Compare

.mixin (@a) when (lightness(@a) >= 50%) {

   display: none;
}

to

@if $boolean

    @debug "$boolean is #{$boolean}"

    display: block

  @else

    @debug "$boolean is #{$boolean}"

    display: none
Note, also, that there's a logger.

Re: Why bother with a CSS build process?

#35
post #34

SASS, imo, is a much more mature and interoperable language. Compare .mixin (@a) when (lightness(@a) >= 50%) { display: none; } to @if $boolean @debug "$boolean is #{$boolean}" display: block @else @debug "$boolean is #{$boolean}" display: none Note, also, that there's a logger.

How are these two code samples related to each other? They appear to be for completely different use cases, and therefore I'm not sure that they actually demonstrate anything useful.

Re: Why bother with a CSS build process?

#36
post #13

I disagree with the first point, the spirit of the web is to be open. The other points do make sense though. On a side note, I'd really like to use LESS or an equivalent, but the way I design/develop (and I'm an admittedly bad designer) is to tweak things in CSS, alt-tab, refresh the browser, and see the changes instantly. Likewise I can open up Firebug and tweak some style to see how it would look, then apply that c…

I use LESS a lot; with my dual monitor setup I have my IDE on the the left and the browser on the right. If you add #!watch to the end of the url and refresh the page, it will poll any LESS file linked in the page once a second and display changes without needing a refresh.

Re: Why bother with a CSS build process?

#37

People who are actually concerned about exposing their amazing Javascript and CSS to the world probably don't have very amazing code to begin with.

I'm not sure how well you can really obscure it anyway. Anyone who knows what they're doing can still get at the source.

Re: Why bother with a CSS build process?

#38
post #35
post #34

SASS, imo, is a much more mature and interoperable language. Compare .mixin (@a) when (lightness(@a) >= 50%) { display: none; } to @if $boolean @debug "$boolean is #{$boolean}" display: block @else @debug "$boolean is #{$boolean}" display: none Note, also, that there's a logger.

How are these two code samples related to each other? They appear to be for completely different use cases, and therefore I'm not sure that they actually demonstrate anything useful.

They are illustrations of two forms of IF statements. One is very weird and hard to use, and the other is... standard.

Re: Why bother with a CSS build process?

#39
post #5

People who are actually concerned about exposing their amazing Javascript and CSS to the world probably don't have very amazing code to begin with.

People who aren't concerned about exposing their amazing Javascript and CSS to the world probably don't have very amazing jobs to begin with.

That's pretty big talk coming from someone whose site has ~250 !important declarations in their CSS on a single page, and had to use a jQuery plugin to handle cookies (lol). If working there is an "amazing job" then I'm on a pretty awesome level.
Post reply on HN