TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: my boilerplate CSS code for new designs, written in Less.

108 pointsby mgeraciabout 14 years ago

10 comments

chegra84about 14 years ago
&#60;Not Related&#62;<p>Last weekend I finished reading "The Non-Designer's Design Book": <a href="http://www.amazon.co.uk/Non-Designers-Design-Book-Robin-Williams/dp/0321193857" rel="nofollow">http://www.amazon.co.uk/Non-Designers-Design-Book-Robin-Will...</a>.<p>So, I decided to test my newly formed designer skills and modify the look of the site here: <a href="http://i.imgur.com/k6y0g.png" rel="nofollow">http://i.imgur.com/k6y0g.png</a><p>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:<p>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."<p>2. Too control the eyeflow from top to bottom, I increase the size of the navigation bar.<p>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.<p>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.<p>5. To show what items that are important under "What", I bold the text that is not in the list.<p>&#60;/Not Related&#62;
评论 #2475164 未加载
评论 #2475172 未加载
defroostabout 14 years ago
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.<p>A couple of comments:<p>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.<p>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.
评论 #2477708 未加载
ihumanableabout 14 years ago
Anything like this for SASS that isn't Compass?
评论 #2475490 未加载
评论 #2476065 未加载
rgbrgbabout 14 years ago
This might also be of interest to anyone looking for less boilerplate code... <a href="http://markdotto.com/bootstrap/" rel="nofollow">http://markdotto.com/bootstrap/</a>
kaylaroseabout 14 years ago
I really like the .transition, and the attention to browser support in .gradientH and .gradientV. Very nice touch!<p>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.<p>Edit: I also like that this is more lightweight than Bootstrap - which I hadn't seen before.
评论 #2474813 未加载
bitsmabout 14 years ago
Nice work. A few things you might consider adding:<p>1. color stops on gradients are very useful, especially if you use them to denote button states, for example<p>2. drop shadows can be inset
评论 #2475128 未加载
awadabout 14 years ago
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.
tsigoabout 14 years ago
Think there might be a typo in your first example.<p>"#element{.boxRadius(radius);}" and the box below it references ".borderRadius(radius)"; is it both?
评论 #2475086 未加载
Hipchanabout 14 years ago
For all the cool kids on node.js: <a href="https://github.com/visionmedia/nib" rel="nofollow">https://github.com/visionmedia/nib</a>
mgkimsalabout 14 years ago
Very slick looking - thanks for sharing!