Giter Site home page Giter Site logo

yuttasakcom / water.css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kognise/water.css

0.0 2.0 0.0 441 KB

A just-add-css collection of styles to make simple websites just a little nicer

Home Page: https://kognise.github.io/water.css/

License: MIT License

JavaScript 24.05% HTML 45.08% CSS 30.87%

water.css's Introduction

Water.css

Water.css

A just-add-css collection of styles to make simple websites just a little nicer

On reddit On product hunt MIT license

Goals

  • Responsive
  • Good code quality
  • Good browser support (works on my old kindle's browser :P)
  • Small size (< 2kb)
  • Beautiful
  • No classes

Why?

I commonly make quick demo pages or websites with simple content. For these, I don't want to spend time styling them but don't like the uglyness of the default styles.

Water.css is a css framework that doesn't require any classes. You just include it in your <head> and forget about it, while it silently makes everything nicer.

Who?

You might want to use Water.css if you're making a simple static or demo website that you don't want to spend time styling.

You probably don'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't use Water.css. It's just not meant for that kind of content.

How?

Just stick this in your head:

<link rel='stylesheet' href='https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.css'>

Well, there's a dark theme and a light theme. If you want the light theme, use light.css instead of dark.css. See Theming to make your own theme!

No other classes or code is required to make Water.css work. If you want a specific version, you can replace @latest with @version. See all the versions.

Oh, you want a demo you say? Cheeky fellah! Well, here's your demo.

Don't like how it looks? Feel free to submit an issue or PR with suggestions.

Contributing

Water.css becomes better for everyone when people like you help make it better!

Have any questions or concerns? Did I forget an element or selector? Does something look ugly? Feel free to submit an issue or pull request.

If you decide to contribute, after downloading a copy of the repository make sure to run yarn to install dependencies useful for development. Then, you can just run the following to start a server of the demo with live reloading and automatic Sass compiling.

$ yarn dev

And make sure to run yarn build before pushing any changes! Thanks for taking the time to contribute :)

Theming

Do you want to make your own theme different from the light or dark themes? Since Water.css is built with Sass this is super easy to do. There are two methods. Also, here's a list of variables to set:

  • $background
  • $background-alt
  • $text-main
  • $text-bright
  • $links
  • $focus
  • $border
  • $code
  • $button-hover
  • $animation-duration
  • $form-placeholder
  • $form-text

Wanna quickly try out theming without installing anything or just explore our build environment?

Try on repl.it

Based on an existing theme

You can base your theme off of the existing light or dark themes, which already have some variables predefined to make it easier for you.

Here's some simple Sass that'll just use the dark theme but color all links red. Of course, you can change any variables you want.

$links: #ff0000;
@import 'dark.scss';

From scratch

You can also make your theme from scratch. This is less recommended, but feel free to! You just have to define all of the variables.

For example, here's an example of a really ugly theme, made from scratch. Ouch!

$background: #ff48c2 !default;
$background-alt: #00ff00 !default;

$text-main: #dbdbdb !default;
$text-bright: #ffffff !default;

$links: #ff0022 !default;
$focus: #ffc400 !default;
$border: #00ffff !default;
$code: #001aff !default;

$button-hover: #324759 !default;
$animation-duration: 0.1s !default;

$form-placeholder: #a9a9a9 !default;
$form-text: #ffffff !default;

@import 'parts/core';

You can also only import parts you want, but this is not recommended. See the src/parts/ folder for a list of parts.

Todos

water.css's People

Contributors

kognise avatar kylejrp avatar amasad avatar dannymcgee avatar gavinhenderson avatar 0xflotus avatar aloisdg avatar jehna avatar bhaak avatar

Watchers

James Cloos avatar Yo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.