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: Water.css – A just-add-css collection of styles to make websites nicer

501 pointsby archmasterabout 6 years ago

24 comments

archmasterabout 6 years ago
<i></i>Why?<i></i><p>I make a bunch of tiny static websites for API demos and such, and always run against the same problem: I hate the browser&#x27;s default styles but don&#x27;t want to spend time writing my own stylesheet for such a tiny app.<p>Now I can just include Water.css in my `&lt;head&gt;` and forget about it. The demo app will still work, it&#x27;ll look good, and I won&#x27;t have spent any time making a stylesheet.<p><i></i>Who?<i></i><p>Let me quote the GitHub repository:<p>&gt; You might want to use Water.css if you&#x27;re making a simple static or demo website that you don&#x27;t want to spend time styling.<p>&gt; You probably don&#x27;t want to use it for a production app or something that has more than a simple document. Rule of thumb: if your site has a navbar, don&#x27;t use Water.css. It&#x27;s just not meant for that kind of content.<p>Water.css has a dark theme by default, but some users wanted a light theme so I added one. Think it&#x27;s ugly? Feel free to create a pull request :D
评论 #19595113 未加载
评论 #19594963 未加载
评论 #19593976 未加载
评论 #19607779 未加载
helloworldabout 6 years ago
I just noticed this biographical detail about the author:<p><i>I&#x27;m a 13yo developer, wannabe designer, and cellist.</i><p>How awesome! Makes me feel hopeful about the future.
评论 #19596291 未加载
评论 #19595813 未加载
评论 #19595190 未加载
评论 #19596086 未加载
mekokaabout 6 years ago
Thank you for this. There&#x27;s a bunch of us who, once in a while, think of finally putting up that simple website or blog, with a minimalist touch. But then we have to think of how it&#x27;ll actually look and we go into analysis paralysis. That&#x27;s where the weekend project usually goes back to snooze. This kind of initiatives helps to at least get to the next hurdle.
评论 #19595796 未加载
评论 #19595525 未加载
评论 #19595505 未加载
评论 #19595250 未加载
networkedabout 6 years ago
This is nice and useful. You have inspired me to start a list of classless themes: <a href="https:&#x2F;&#x2F;github.com&#x2F;dbohdan&#x2F;classless-css" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbohdan&#x2F;classless-css</a>. I used part of your demo page as the basis for the comparison screenshots.
bhaakabout 6 years ago
That looks pretty neat.<p>The table layout is ugly, though. As this is a pretty basic HTML table, you can&#x27;t do much but you can certainly do better than a table with all borders.<p>I thought I learned about web table design in a very concise article but I couldn&#x27;t find it. The best my google-fu provided is this article: <a href="https:&#x2F;&#x2F;alistapart.com&#x2F;article&#x2F;web-typography-tables" rel="nofollow">https:&#x2F;&#x2F;alistapart.com&#x2F;article&#x2F;web-typography-tables</a><p>Some quotes:<p>&quot;As a starting point, avoid any border or frame surrounding the table. This is a Victorian embellishment which is entirely unnecessary as text alignment will shape the table just fine.&quot;<p>&quot;Tables should not be set to look like nets with every number enclosed. Try to do without rules altogether. They should be used only when they are absolutely necessary. Vertical rules are needed only when the space between columns is so narrow that mistakes will occur in reading without rules. Tables without vertical rules look better. Thin rules are better than thick ones.&quot;<p>Edit: Here is a quick design I tried: <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;xgKsNvy.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;xgKsNvy.png</a><p>I didn&#x27;t do any color striping, this would also be an improvement to distinguish the table head from the table rows but I didn&#x27;t find quickly any coloring I liked.
评论 #19597088 未加载
bArrayabout 6 years ago
I happen to end up creating a lot of static web pages when building simple websites or documentation (for internal and external use) - is there a collection of lightweight CSS resources like this?<p>For example, some things I would want to be able to select&#x2F;tweak:<p>* Colour scheme&#x2F;theme<p>* Responsiveness to mobile devices (i.e. changing fonts&#x2F;layout, etc)<p>* Navigation bar<p>* Transition effects<p>* Support for older browsers (but still look okay (yes this is still a requirement in 2019))<p>* Support for IE (which seems to be hilariously harder than it should be)<p>* Toggle&#x2F;select use of fonts<p>If not then it might be useful to build out a tool to dynamically create such a thing.
评论 #19595708 未加载
评论 #19595947 未加载
评论 #19595778 未加载
pradnabout 6 years ago
If your aim is to help people snazz up quick HTML pages, it would be helpful to have as simple URL to include the CSS. Something like watercss.com&#x2F;light.css. This way, we don&#x27;t even have to visit your GitHub to get the CDN URL. It&#x27;d save some time and make water.css the go-to for quick styling.
评论 #19595163 未加载
评论 #19595541 未加载
评论 #19595194 未加载
评论 #19601040 未加载
another-daveabout 6 years ago
Looks really good! Definitely would use something like this for some quick pages alright.<p>Two minor pieces of feedback — when I click &quot;Switch theme&quot;, it seems to take you to non-styled rather than the light theme, not sure if that&#x27;s what was intended or not? Could be good to have buttons for both.<p>Also, you seem to be getting an SSL mixed content warning, purely because of the Kitten pic. Know that it&#x27;s not a big deal for a demo page, but if you wanted to get rid of it, you could use something like LoremPixel.com — they support switching URLs to HTTPS and have a &#x27;cat&#x27; category!
评论 #19601045 未加载
arosierabout 6 years ago
He has a product hunt scheduled for tomorrow. Didn’t know you could schedule product hunt posts.<p><a href="https:&#x2F;&#x2F;www.producthunt.com&#x2F;posts&#x2F;water-css" rel="nofollow">https:&#x2F;&#x2F;www.producthunt.com&#x2F;posts&#x2F;water-css</a>
fockabout 6 years ago
What&#x27;s so bad about black-on-white text, sans-serif headers, serif texts and monotype blockquotes? Just because this theme set&#x27;s specific colors and fonts&#x2F;sizes, I&#x27;m not quite sure, how this automatically makes it any more beautiful than the standard (which generally is really responsive too)?
评论 #19595480 未加载
评论 #19596785 未加载
dlbucciabout 6 years ago
I like this! More and more, I think about making my CSS sheets element only and moving more complex &quot;component&quot; styles into JavaScript. This makes me attempt to find semantic HTML representations of components before coming up with new styles and entering append-only CSS prison. So something like this would work great for me (even for more dynamic sites, really!).
评论 #19595191 未加载
gingerlimeabout 6 years ago
Is it similar to milligram[0] ?<p>I&#x27;m genuinely asking, because my CSS &quot;awareness&quot; is so terrible, despite years of web development experience. I just can&#x27;t figure CSS out.<p>[0] <a href="https:&#x2F;&#x2F;milligram.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;milligram.io&#x2F;</a>
评论 #19608173 未加载
bachmeierabout 6 years ago
The need for something like this - basic styling because the default display is so bad for raw html - suggests that there&#x27;s something missing from our browsers. Of course everyone has their own preferences, but being able to add &lt;theme &quot;foo&quot;&gt; at the top of an html page would be very helpful. In many instances the exact styling isn&#x27;t important as long as there&#x27;s <i>some</i> styling. It would, among other things, minimize on bandwidth while providing a comfortable experience.
评论 #19596732 未加载
kejabout 6 years ago
This reminds me of picnic.css [0], which uses the same technique of styling everything nicely by default, but adds some options for changing things when you want.<p>[0] <a href="https:&#x2F;&#x2F;picnicss.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;picnicss.com&#x2F;</a>
whouwelingabout 6 years ago
This looks really nice, clean &amp; functional. I&#x27;m integrating this into my personal website at this moment. Thanks!
beefhashabout 6 years ago
I&#x27;ve been wondering where this trend to use the system font came from. I understand that web applications want to use a system font for common operating systems so that they look a bit more native. But that doesn&#x27;t necessarily make it a good choice for body text.
评论 #19597480 未加载
评论 #19595594 未加载
xrdabout 6 years ago
Can you start another thread on how you got to this point in your life as a 13 yr old? I want my three kids (oldest 6) to be doing what you are doing in another seven or so years.<p>Kudos on a great project and thanks for sharing it with the world!
评论 #19600073 未加载
评论 #19601059 未加载
ujujabout 6 years ago
Reminds me of <a href="https:&#x2F;&#x2F;oxal.org&#x2F;projects&#x2F;sakura&#x2F;" rel="nofollow">https:&#x2F;&#x2F;oxal.org&#x2F;projects&#x2F;sakura&#x2F;</a> in a nice way.
ngoldabout 6 years ago
This looks really fun. Thanks for showing. Look forward to trying it.
bastawhizabout 6 years ago
It seems to support check boxes but not radio buttons.
marmshallowabout 6 years ago
Anyone have a screenshot or before&#x2F;after?
crushcrashcrushabout 6 years ago
This is wonderful! Thank you.
andreareinaabout 6 years ago
Mixed content warning due to the cat picture.
Theodoresabout 6 years ago
I would like to see a version for those of us that structure our documents.<p>What is this structure you speak of?<p>Most people assume HTML has a &#x27;head&#x27; and a &#x27;body&#x27;. The head has script and tag things in it, the body is just free-form open-fire zone of content.<p>But there is more to it than this.<p>The body should have some structure to it. That means a &#x27;header&#x27;, a &#x27;main&#x27; and a &#x27;footer&#x27;. In the &#x27;header&#x27; you are going to want a &#x27;nav&#x27; and the same for the &#x27;footer&#x27;, you are going to want a &#x27;nav&#x27;. Even if the links are to your social media sites there is still something to go in the respective areas.<p>Then when it comes to your &#x27;main&#x27; content, if you believe in structure, you are wanting to have &#x27;article&#x27; or &#x27;section&#x27; with a possible &#x27;aside&#x27; or two.<p>Then there are images. Images don&#x27;t have to be in random &#x27;div&#x27; elements. They should be in &#x27;figure&#x27; or &#x27;picture&#x27; elements.<p>Anyone who is not writing HTML this way, using the structural elements and structuring their document might as well just be writing in .txt format or posting jpgs of their pages to the internet. You have got to be organised. Ignorance of the HTML elements is not helpful, knowing them is. They shape how you think and how you organise your code.<p>A default stylesheet for people that write this way - structured - could have many useful touches. So CSS grid for the &#x27;header&#x27;&#x2F;&#x27;main&#x27;&#x2F;&#x27;footer&#x27; could include the best way to ensure a sticky footer with the row definitions and align-self: end for the footer bit.<p>Images in picture&#x2F;figure elements could be set to be done properly, if in a containing &#x27;figure&#x27; then set to 100% width. If the main has a &#x27;grid&#x27; setup then you could easily have well structured HTML show neatly with anything &#x27;not structured&#x27; evident because it wouldn&#x27;t be fitting in the boxes.<p>Document outline is important and a basic stylesheet needs to do badly at styling things that are not going to outline well. So the headings styles should only apply to headings that are in &#x27;article&#x27;, &#x27;section&#x27; or &#x27;aside&#x27; blocks.<p>There is also a small matter of pixels. When was the last time a pixel meant anything? 2007? Nowadays pixels are virtual. So it really has to be em&#x2F;rems and viewer units all the way. The pixel is outmoded.<p>For your forms you want to think differently and more structured. So &#x27;form&#x27; needs to be &#x27;display: grid&#x27; and then your labels be column 1 with inputs on column 2. Then have a css variable in the responsive media query to set the inputs to column 1 if on mobile. Done this way you can get rid of the hacky margins and paddings on the buttons and just use &#x27;grid gap&#x27;.<p>This means forms can then be a straight list of label&#x2F;input pairs in well organised structured code that looks fantastic and is fully mobile out the box.<p>As it is the stylesheet is a good idea but it does not really bring any benefits to structured documents in the post-pixel world where CSS grid does all the heavy lifting of simple layout tasks.
评论 #19595295 未加载
评论 #19597428 未加载
评论 #19595120 未加载
评论 #19595760 未加载