News for hackers. Stuff that matters.
Re:Show HN: my boilerplate CSS code for new designs, written... by chegra84 on Friday April 22, 2011 @02:14PM (#2474894)
<Not Related>

Last weekend I finished reading "The Non-Designer's Design Book": http://www.amazon.co.uk/Non-Designers-Design-Book-Robin-Will....

So, I decided to test my newly formed designer skills and modify the look of the site here: http://i.imgur.com/k6y0g.png

The central point of the book is that we can tell when something is off with a design, but rarely we know how to fix it. So, yea this is what I thought need fixing on the site:

1. There is conflict between "What" and "Less Boilerplate" Header. Firstly, the fonts are the same size, so they are competing for who gets viewed first. Second, the orange on "What" is a warm color so it will stand our more, hence overpowering the header. So, I shrunk the "What" and increase "Less Boilerplate."

2. Too control the eyeflow from top to bottom, I increase the size of the navigation bar.

3. I increased repetition by changing the color of the header to white,the text to white and the separator in the navigation bar to white.

4.To highlight the "What" more I indent the text under it. And also set the text under it to be the same font size. There is no conflict here, since the header "What" is already highlighted alot.

5. To show what items that are important under "What", I bold the text that is not in the list.

</Not Related>

Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Friday April 22, 2011 @03:34PM (#2475164)
1) I agree. I made the H1 the same color as the examples (close to white, with some cream) and reduced the size of the H2s.

2) I agree that the navigation and H2s should have a similar visual weight, so the nav. got bigger.

3) I'm not a fan of dropout text for large quantities, so it's staying dark, but I did brighten the background to increase readability.

4) A rule of thumb for me is that you only need one layer of emphasis for a differentiation of text. Both of our solutions are currently breaking that rule, and I happen to like larger text.

Thanks for the feedback and mockup!

Re:Show HN: my boilerplate CSS code for new designs, written... by theoj on Friday April 22, 2011 @03:37PM (#2475172)
Not sure if over-emphasizing the site title and the navigational layout at the expense of the content is the right way to go. As a HN reader I came to the site for the content, but in your screenshot the content is small and hard to read.

That said, +1 for applying what you learned, even if it may still need some tweaking...

Re:Show HN: my boilerplate CSS code for new designs, written... by defroost on Friday April 22, 2011 @08:13PM (#2475870)
I've been using sass and going kind of mixin crazy in my latest project. Once you discover all the various CSS3 generators online, creating good-looking mixins is absolutely trivial and a lot of fun.

A couple of comments:

1. Aside from my dislike of CamelCase on a few classes, it might be simpler to call the .borderRadius helper "round"? .borderRadius(@radius) is not the best naming, IMHO. 2. As mentioned below, click-stops on gradients really make for nice looking gradients. 3. For the button, I suppose you could make it into a helper method where it can take @buttonColor as a parameter. I'm not loving the almost brown color for the active state. What I did was the reverse the gradient for the active state - so light to dark becomes dark to light when clicked on.

Lastly, what I'm finding is that all these gradients, mixins, shadows, etc. do add up, but I supposed if we compress our assets it will in most cases be less than using images. Anyway, nice work.

Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Saturday April 23, 2011 @06:10PM (#2477708)
I just updated the script with 3- and 4-color gradients, and with the call to action button as a helper method with color as a parameter. Thanks for the suggestions!
Re:Show HN: my boilerplate CSS code for new designs, written... by ihumanable on Friday April 22, 2011 @12:59PM (#2474636)
Anything like this for SASS that isn't Compass?
Re:Show HN: my boilerplate CSS code for new designs, written... by nathos on Friday April 22, 2011 @05:28PM (#2475490)
I'd highly recommend Compass, but I did a quick & dirty conversion of this to Sass: https://github.com/nathos/Sass-Boilerplate

Please log issues if I goofed anything :) I haven't fully tested all of the mixins. (Sass color math & functions work a bit differently than Less)

Re:Show HN: my boilerplate CSS code for new designs, written... by ch0wn on Friday April 22, 2011 @10:06PM (#2476065)
What's wrong with Compass?
Re:Show HN: my boilerplate CSS code for new designs, written... by rgbrgb on Friday April 22, 2011 @12:28PM (#2474540)
This might also be of interest to anyone looking for less boilerplate code... http://markdotto.com/bootstrap/
Re:Show HN: my boilerplate CSS code for new designs, written... by kaylarose on Friday April 22, 2011 @01:40PM (#2474776)
I really like the .transition, and the attention to browser support in .gradientH and .gradientV. Very nice touch!

Tiny nitpick: IMO the call to action styles doesn't belong (seems a bit to specific for a generic boilerplate). Other than that, nice job.

Edit: I also like that this is more lightweight than Bootstrap - which I hadn't seen before.

Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Friday April 22, 2011 @01:51PM (#2474813)
Most of the CSS3 browser compatibility came from Paul Irish's awesome CSS3please tool (http://css3please.com/). You should definitely check it out if you're coding css without a framework.
Re:Show HN: my boilerplate CSS code for new designs, written... by bitsm on Friday April 22, 2011 @03:18PM (#2475117)
Nice work. A few things you might consider adding:

1. color stops on gradients are very useful, especially if you use them to denote button states, for example

2. drop shadows can be inset

Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Friday April 22, 2011 @03:22PM (#2475128)
Yes, and yes. These are both now on my list. Thanks!
Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Saturday April 23, 2011 @06:11PM (#2477712)
I just updated the script with both of these features. Enjoy!
Re:Show HN: my boilerplate CSS code for new designs, written... by awad on Saturday April 23, 2011 @05:16AM (#2476548)
This looks pretty awesome, I like the idea a lot, will give it a try. Thanks! And thanks Michael for turning me onto Less in the first place while we worked together last year.
Re:Show HN: my boilerplate CSS code for new designs, written... by tsigo on Friday April 22, 2011 @03:08PM (#2475076)
Think there might be a typo in your first example.

"#element{.boxRadius(radius);}" and the box below it references ".borderRadius(radius)"; is it both?

Re:Show HN: my boilerplate CSS code for new designs, written... by mgeraci on Friday April 22, 2011 @03:12PM (#2475086)
Thank you! Fixed. (it was supposed to be borderRadius)
Re:Show HN: my boilerplate CSS code for new designs, written... by Hipchan on Friday April 22, 2011 @09:15PM (#2475985)
For all the cool kids on node.js: https://github.com/visionmedia/nib
Re:Show HN: my boilerplate CSS code for new designs, written... by mgkimsal on Friday April 22, 2011 @01:51PM (#2474810)
Very slick looking - thanks for sharing!