TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

108 点作者 mgeraci大约 14 年前

10 条评论

chegra84大约 14 年前
&#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 未加载
defroost大约 14 年前
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 未加载
ihumanable大约 14 年前
Anything like this for SASS that isn't Compass?
评论 #2475490 未加载
评论 #2476065 未加载
rgbrgb大约 14 年前
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>
kaylarose大约 14 年前
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 未加载
bitsm大约 14 年前
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 未加载
awad大约 14 年前
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.
tsigo大约 14 年前
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 未加载
Hipchan大约 14 年前
For all the cool kids on node.js: <a href="https://github.com/visionmedia/nib" rel="nofollow">https://github.com/visionmedia/nib</a>
mgkimsal大约 14 年前
Very slick looking - thanks for sharing!