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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: My 24-hour project, instacss.com

90 点作者 rgarcia超过 13 年前
http://instacss.com (in case DNS update hasn't propagated: http://morning-warrior-3377.herokuapp.com/)<p>Last night I was annoyed at how slow (and web 1.0-ish) most CSS reference sites seem to be, so I created this. It's basically a scrape of the CSS reference on w3schools, but with client side searching. Feedback is most welcome!<p>some of the tech involved: node, requirejs, backbone, mongodb<p>the code: http://github.com/rgarcia/instacss

26 条评论

JoshTriplett超过 13 年前
Very awesome.<p>You could use Levenshtein distance (<a href="https://en.wikipedia.org/wiki/Levenshtein_distance" rel="nofollow">https://en.wikipedia.org/wiki/Levenshtein_distance</a>) as your search metric. That would provide two advantages: it would handle slight misspellings, and it would find the closest match first ("radius" would prefer "border-radius" to "border-top-left-radius", and "border" would prefer "border" as requested in another comment).<p>You might consider providing a quick list of the property names (perhaps over on the right) in addition to the fully expanded list, to make it easier to tell if you have the right results, and jump to them in the list.<p>Please put the "[source]" links closer to the content; right now they seem more closely associated with the following entry. How about putting the link near the top right of each entry instead?<p>Please don't fade the "default" and "inherited" text so close to white; I found it uncomfortable to read with that little contrast.
2arrs2ells超过 13 年前
Any chance you could use the MozDev CSS reference instead? <a href="https://developer.mozilla.org/en/CSS/CSS_Reference" rel="nofollow">https://developer.mozilla.org/en/CSS/CSS_Reference</a>
评论 #3222491 未加载
评论 #3222350 未加载
评论 #3222605 未加载
rgarcia超过 13 年前
clickable: <a href="http://instacss.com" rel="nofollow">http://instacss.com</a> (or <a href="http://morning-warrior-3377.herokuapp.com/" rel="nofollow">http://morning-warrior-3377.herokuapp.com/</a>)
hackernews超过 13 年前
definitively useful, but some feedback:<p>+ Need a way to do an explicit search. There are a lot of shorthand properties and searching for "border" requires me to scroll way down to find the border reference doc. If I typed border: it should only show me one result.<p>+ The possible values need to be presented in a list. It is difficult to scan that paragraph to determine what are my options.<p>+ Make the search box position fixed. Maybe in the header? If no input is present in the search input, show the howto below. Make sure to add a background color to the howto to distinguish from results.
评论 #3222878 未加载
minikomi超过 13 年前
Minor nitpick - iOS defaults to first letter capitalized, thus getting no search results. You could either force downcase on the text area or ignore case in the search.
评论 #3222898 未加载
artursapek超过 13 年前
W3schools isn't the greatest source. I agree, MozDev would be a better target for your scraping.<p>Also, many examples appear twice. (Try text-shadow, border-spacing)
评论 #3225298 未加载
kittxkat超过 13 年前
cool, super useful.<p>+++ superfast, the search-as-you-type is especially useful (not having to wait for something you just wanna "quickly lookup if you got it right in your head" is a MASSIVE plus!)<p>- you should really implement a "goto top" button, especially when there are more results<p>- placebo button. why is it there if it doesn't do anything? seems like you search after i type anyway, so why is there a button after all?<p>- wasn't clear what queries the search can handle, i.e. i wasn't sure what exactly could i look up. maybe you could give some examples on the start page, and also i would set the background of the search input field to say something like "search as you type", so it gets more clearer.<p>really, it's a fine site. but as there are only the site title "instaCSS", the tagline "gimme teh css" and a search field, it could have <i>really</i> profit for a bit more information about the service. not much, but subtle. it really wasn't clear what your service can do without the HN subtext.
stoodder超过 13 年前
Love the idea, would be great to have a 'quick' link at the top that could jump me down the page to the correct section. For example. When I search for border, I get all of the possible permutations of that style. It'd be nice to have 'border, border-left, border-right' etc. listed at the top. When I click on one, I get taken to it's section on the page.
julian37超过 13 年前
This looks really useful, thanks!<p>One suggestion: if you put "color" in the search box, you currently get "border-bottom-color", "column-rule-color", "border-top-color", and "color", in that order. It would make more sense to put "color", the exact match, at the very top. (And probably also to sort the remaining matches alphabetically.)
评论 #3222997 未加载
joliss超过 13 年前
What's the license for your code? You should put one in <i>before</i> you accept patches. ;-)<p>And the UI is totally awesome.
mrpollo超过 13 年前
My suggestion would be to add a brief description of what i should be using as an input on your form, I first tried the url of a CSS file, then a selector, then when i started typing the selector i started seeing the actual properties display thats when i knew i had to input a css property, maybe It's just me.
drewsmith超过 13 年前
After a quick glance, the examples seem to be duplicating for me. Also, is it really an example? It's more akin to an example usage I suppose, but it shouldn't be that hard to provide a true example right? Just slap a div with the inline css or store an example div column along with the example usage column.
waf超过 13 年前
My test case was typing in 'background', since I can never remember the order of all the values. It showed a lot of the border-* properties (but not all of them, background-position, for example), and didn't show plain old 'background'
epenn超过 13 年前
How are you sorting these? I did a search for "border" just to try it out. It returned 18 entries with pretty much every variation of border-*, but border itself was the 16th entry almost at the end of the results page.
评论 #3222853 未加载
Trezoid超过 13 年前
Placebo search button? Based on effect it doesn't seem to do anything, and visually it looks like it "sticks" and doesn't ever get "pressed" when you click on it.<p>also, it can't handle "gradient" at all.
评论 #3222471 未加载
Rumnha超过 13 年前
This is fast. period. But when I searched for 'width' (without quotes) it showed all results (*width) but not for 'width' (exact). Same with 'background' css property. Otherwise it's awesome.
gregsadetsky超过 13 年前
This is great, congrats! I would love to have access to Python docs this way (builtins, the standard library, etc.). And Django's methods &#38; template tags too...
JoshTriplett超过 13 年前
Please consider using the HTML5 history API to change the page location to a URL that will work as a permalink to the search results.
sheppy超过 13 年前
fwiw, we at Mozilla Developer Network think this is awesome. :)
noformnocontent超过 13 年前
needs support for hashtags: <a href="http://instacss.com/#background" rel="nofollow">http://instacss.com/#background</a>
评论 #3222874 未加载
评论 #3222868 未加载
grantjgordon超过 13 年前
Very nice. Way to use Bootstrap!
greattypo超过 13 年前
Cool - I will totally use this.
ykamakazi超过 13 年前
Love the license btw ;)
kenok超过 13 年前
w3schools?<p>I'd recommend MozDev.
thegorgon超过 13 年前
this is awesome. well done.
binarydreams超过 13 年前
amazing, love it!