All Projects → kognise → Water.css

kognise / Water.css

Licence: mit
A drop-in collection of CSS styles to make simple websites just a little nicer

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Water.css

ByteCopy
Simple C99 program and API for copying files.
Stars: ✭ 16 (-99.76%)
Mutual labels:  minimal, simple
SSTMCSPGAAS
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service
Stars: ✭ 23 (-99.65%)
Mutual labels:  minimal, simple
classy
Super simple text classifier using Naive Bayes. Plug-and-play, no dependencies
Stars: ✭ 12 (-99.82%)
Mutual labels:  minimal, simple
Gulp Front
Frontend boilerplate and framework based on gulp, pug, stylus and babel
Stars: ✭ 237 (-96.44%)
Mutual labels:  hacktoberfest, css-framework
Front End Web Development Resources
This repository contains content which will be helpful in your journey as a front-end Web Developer
Stars: ✭ 3,452 (-48.21%)
Mutual labels:  hacktoberfest, css-framework
koochak
A minimal & lightweight CSS framework
Stars: ✭ 15 (-99.77%)
Mutual labels:  minimal, css-framework
siimple
The minimal and themeable CSS toolkit for flat and clean designs
Stars: ✭ 525 (-92.12%)
Mutual labels:  minimal, css-framework
Beginners C Program Examples
Simple, Short and Sweet beginners friendly C language programs
Stars: ✭ 138 (-97.93%)
Mutual labels:  hacktoberfest, simple
Redaxo
REDAXO, a PHP-based CMS since 2004. Both simple and flexible.
Stars: ✭ 268 (-95.98%)
Mutual labels:  hacktoberfest, simple
notion.css
A minimal CSS framework that resembles the aesthetic of the note taking app Notion
Stars: ✭ 28 (-99.58%)
Mutual labels:  minimal, css-framework
Archie
A minimal Hugo Theme
Stars: ✭ 226 (-96.61%)
Mutual labels:  hacktoberfest, minimal
Isometricsass
Sass library to make isometric 2D without javascript
Stars: ✭ 331 (-95.03%)
Mutual labels:  css-framework, simple
Fomantic Ui
Fomantic-UI is a community fork of Semantic-UI
Stars: ✭ 2,755 (-58.67%)
Mutual labels:  hacktoberfest, css-framework
minstyle.io
👌 A simple CSS Framework, including dark mode.
Stars: ✭ 58 (-99.13%)
Mutual labels:  simple, css-framework
Smoke
💨 Simple yet powerful file-based mock server with recording abilities
Stars: ✭ 142 (-97.87%)
Mutual labels:  hacktoberfest, simple
DevFolio
A Modern Portfolio Template for Developers with easy setup process documented(with hosting).
Stars: ✭ 96 (-98.56%)
Mutual labels:  minimal, simple
Fossurl
Your Own Url Shortner Without any fancy server side processing and support for custom url , which can even be hosted on GitHub Pages
Stars: ✭ 131 (-98.03%)
Mutual labels:  hacktoberfest, simple
Simplebluetoothlibrary
Android library for simplifying bluetooth usage.
Stars: ✭ 131 (-98.03%)
Mutual labels:  hacktoberfest, simple
unitscss
UNITS is a simple and beautiful CSS component set.
Stars: ✭ 13 (-99.8%)
Mutual labels:  simple, css-framework
Discord bot.py
🍺 A simple discord bot that helps you getting started within discord.py
Stars: ✭ 313 (-95.3%)
Mutual labels:  hacktoberfest, simple

NPM page On Product Hunt Contributors MIT license


Water.css

🌊 A drop-in collection of CSS styles to make simple websites just a little nicer

Water.css


Goals

  • Responsive
  • Themeable
  • Good browser support (works on my old kindle's browser :P)
  • Tiny size
  • 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 ugliness 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 page or demo website that you don't want to spend time styling.

Although it originally wasn't built for more complex websites, many developers have used Water.css as a base stylesheet and creatively applied custom styles to build out an entire app. Nothing is stopping you from doing the same!

How?

Just stick this in your <head>:

🌙/ Automatic Theme:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css">

🌙 Dark Theme:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.min.css">

Light Theme:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/light.min.css">


A preview of the different themes is available on the demo page!

How the "Automatic Theme" works

The main water.css file automatically switches between light and dark mode depending on the system preferences of a user's device. This detection is made possible through a CSS media query called prefers-color-scheme. In browsers where the preference can't be detected, water.css will stick to the light theme.

If you want to avoid this behavior, use either dark.css or light.css.

Supporting Internet Explorer

All three distributions of Water.css support Internet Explorer 11, but the main water.css file doesn't respect the user's color scheme and will be locked to light mode due to lack of prefers-color-scheme support.

Be aware that IE also doesn't support runtime theming, and fixed fallback values will be used. If you want to override the Water.css theme in a way that's compatible with IE, we recommend that you compile your own theme.

Unminified builds

All versions are also available as unminified stylesheets, which can be handy during development.
Simply remove the .min from the file name.

Theming

Do you want to make some adjustments or build your own theme completely different from the official dark or light themes? Since Water.css is built with CSS variables this is super easy to do! Here's a list list of all the variables you can change to your liking:

  • --background-body
  • --background
  • --background-alt
  • --selection
  • --text-main
  • --text-bright
  • --text-muted
  • --links
  • --focus
  • --border
  • --code
  • --animation-duration
  • --button-hover
  • --scrollbar-thumb
  • --scrollbar-thumb-hover
  • --form-placeholder
  • --form-text
  • --variable
  • --highlight
  • --select-arrow

Runtime theming

If you use a version with support for legacy browsers like Internet Explorer, skip to Compiling your own theme!

Water.css uses Custom Properties ("CSS variables") to define its base styles such as colors. These can be changed and overwritten right in the browser.

Because of this, you can simply add your own stylesheet to the page and set your own CSS variables there. As long as your stylesheet comes after Water.css in the HTML, your values will override the default ones and your theme is applied!

This short example will use Water.css, but color all links red:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/water.css@2/out/water.min.css" />
<style>
  :root {
    --links: red;
  }
</style>

If you want to change a value for dark or light mode only, use a media query like this:

<style>
  :root {
    --links: blue; /* Always applied */
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --links: yellow; /* Only applied in dark mode (overrides blue) */
    }
  }
</style>

Compiling your own theme

If you are targeting browsers without support for CSS Custom Properties such as Internet Explorer, runtime theming is not an option. To apply your own theming, you'll need to make your changes in the source files themselves, then re-compile the CSS files. This works like the following:

  • Clone the repository to your machine
  • Run yarn to install dependencies
  • Make the theming changes you want in src/variables-*.css
  • Run yarn build to compile the CSS files
  • Use the compiled files in the out/ directory on your site

You also might want to check out the Contributing Guide as it contains further information about the build setup.

Contributing

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

Check out our Contributing Guide to learn how to get started.
And thanks for taking the time to contribute! :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].