Live data from Hacker News

A modern responsive front-end framework based on Material Design

materializecss.com

81–90 of 96 posts

Re: A modern responsive front-end framework based on Material Design

#81
post #2

Looks great. However, I've never really understood this sort of approach: Alvin Alvin Alvin Alvin Rather than assigning a "collection-item" class to each "li", would you not simply style the "li" in the context of "collection"? Bootstrap does a similar thing. Drives me nuts...

What will you do when you need div.a list instead of ul.li?

Re: A modern responsive front-end framework based on Material Design

#82
Many comments here use the phrase "best practices" as a means to shut down opposing opinions or practices. That feels very wrong to me.

I am often heard saying (in classes, public presentations, etc.), "I don't like the phrase 'best practice'. It implies that someone knows your requirements better than you. So I don't use it. What's 'best' for me might suck for you. So I say: the best practice is, in many cases, simply to have a practice that you and your team adhere to. One which meets your requirements, now and foreseen."

Class-itis, div-itis, selector-nesting-itis... They all have a place in the Real World.

Re: A modern responsive front-end framework based on Material Design

#83
post #61

Earlier quoted context omitted.

There's a reasoning behind this. You may not agree with it, but it's good to fully understand the problem it's trying to solve. There are two problems with your suggested approach -- specificity and coupling. The rules of CSS are such that .collection > li is a more specific selector than .collection-item. So if you want a particular item in the list to be red, you can't just give it a class name .warning-item and st…

Performance is penalized too. Since CSS rules are parsed from right to left and you have probably a lot of "li" tags, the rule would be very inefficient. Of course this doesn't matter in small pages.

I was going to ask why that is as it seems counterintuitive at first glance. Instead, I Googled it and found the following (excellent) answer at StackOverflow: http://stackoverflow.com/questions/5797014/why-do-browsers-m...

I'm just provided the link here in case anyone else was wondering the same thing.

Re: A modern responsive front-end framework based on Material Design

#84
post #49

Earlier quoted context omitted.

References : [1] http://www.smashingmagazine.com/2011/12/12/an-introduction-t... [2] http://bramsmulders.com/how-i-improved-my-workflow-with-smac... [3] https://github.com/davidtheclark/scalable-css-reading-list I don't usually reply in this way, but this way of writing CSS has been proven to me in many hard to predict situations and is something that I would fight for in every possible way, everywhere I can. :D I've…

* "and is something that I would fight for in every possible way, everywhere I can. :D" At my last job, fighting about CSS and dev processes sometimes overtook actual coding and design. I'm glad to be free of control-freak colleagues. Smart and nice control-freaks, but control-freaks nonetheless. No matter how you sell it, what you have here is a css tautology. It's a "list item", the element name is right there for…

> No matter how you sell it, what you have here is a css tautology. It's a "list item", the element name is right there for all to see and use, including the machine.

The names are similar because they've created a general framework. They should have probably name-spaced the component as well with prefixes.

Using class names creates a scope so your rules don't spill out and pollute everything else. It's like local variables in a function, and it's also a hack to behave more like XML. For example:

is approximating:

Maybe web components will fix this, but I'm not up-to-speed with that technology.

Re: A modern responsive front-end framework based on Material Design

#85
post #33

Nice. I'm not a Google fanboy, but I believe Material is the best visual language for UI. Okay, there are different contexts, but it's best thought-through, and most modern. For instance, the use of animation is finally mature and at the same rich and amplifying user experience (rather than being an eye-candy). And I think it's very compatible with web apps. A Material-ish popular chess site: http://en.lichess.org/ (…

What? Why? I personally find Material to be hideous because of its color abuse. It makes your UI look like an over-saturated Fischer-Price toy because of all the bright primary colors everywhere, and that's before we get into the lack of shadow and shading that seems to have infected "modern" design.

    and that's before we get into the lack of shadow
So we are not talking about the same thing, because Material uses shadows extensively - certainly more so than older versions on Android. See https://developer.android.com/training/material/shadows-clip... and http://www.google.com/design/spec/what-is-material/objects-i... for more details

Re: A modern responsive front-end framework based on Material Design

#86

Earlier quoted context omitted.

What? Why? I personally find Material to be hideous because of its color abuse. It makes your UI look like an over-saturated Fischer-Price toy because of all the bright primary colors everywhere, and that's before we get into the lack of shadow and shading that seems to have infected "modern" design.

Colors are easily changed, and certainly expected to be changed for reach site; that really isn't relevant to the tech being present. And are you railing against flat design in general? This is another personal preference religious war that's been waged back and forth since the advent of digital design. Don't worry, the pendulum will undoubtedly swing back your way again in a few years.

Well, Material is already a bit of a compromise, it's not as radical as Microsoft's Metro (I know they don't call it that anymore). It uses physical metaphores and fake 3D, it's just very subtle at it.

Re: A modern responsive front-end framework based on Material Design

#87

Earlier quoted context omitted.

There are performance considerations as well. Using selectors is more performant than raw tags. https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Writi... Using nesting and tags is less performant than classes. So using more classes is better than less.

That article is old > Note: This document was originally written in 2000. Much has changed when it comes to writing CSS that is fast.

Oh...woops. Do you know of any more recent articles? I've been playing by this since I bombed an interview where they asked about CSS performance a few months ago and I had nothing smart to say.

Re: A modern responsive front-end framework based on Material Design

#88
post #64

One thing I've noticed about Material Design is that most of the examples of "best designs" have elements that are overlapping to some extent, but none of the frameworks that I see make it easy to have overlapping elements with defaults like grid layouts. I guess this isn't limited to just material design though. It seems like many times overlapping visual elements is a subtle indicator of a more professional design.…

I don't know any frameworks that do it, but it seems like you could have an element that fits into the normal grid, and then inside that have an element with a "breaks the grid" class applied which uses positioning raise it up and make it overlap grid boundaries. You might need a special class on the parent element too so you can prevent it from collapsing. This seems like something that can be done in a fairly gener…

Yeah, I think in isolation stuff like that can be useful, but I feel like there should be a better abstraction. I'm not enough of a designer to know what that abstraction would be, and it seems like unexplored territory in CSS frameworks now as far as I can tell.

Re: A modern responsive front-end framework based on Material Design

#89
post #16

Earlier quoted context omitted.

The main issue with bootstrap-material is that this project is afflicted by the dreaded "developer thinks he needs his own license" bug[0][1]. It's effectively CC BY-SA-NC which is rather bold when you consider that it's adopting a design framework from Google for a css framework from Twitter. [0] https://github.com/FezVrasta/bootstrap-material-design/blob/... [1] https://github.com/FezVrasta/bootstrap-material-desig…

+1. Saw this earlier, thought "looks good, I should use it for a project", then read license and went "hahahahhaha no chance, not using a normal/standard licence is way too high risk for me, no matter the project".

If you follow the discussions on github, the latest consideration is to use AGPL. For a CSS library. But fear not!

> There will be a commercial license as well. [0]

Well, if he goes that far, perhaps Google or Twitter lawyers will finally put an end to this.

[0] https://github.com/FezVrasta/bootstrap-material-design/issue...

Re: A modern responsive front-end framework based on Material Design

#90

Many comments here use the phrase "best practices" as a means to shut down opposing opinions or practices. That feels very wrong to me. I am often heard saying (in classes, public presentations, etc.), "I don't like the phrase 'best practice'. It implies that someone knows your requirements better than you. So I don't use it. What's 'best' for me might suck for you. So I say: the best practice is, in many cases, simp…

i think this is a good perspective. at the some practices are clearly better than others, and sometimes it is appropriate to say "best practice", because in certain narrowly defined circumstances, there really is a best. but the idea of team practice as the goal overall, and best practice as something that is both personal and defined by external circumstance is solid.
Post reply on HN