Compare commits

...

460 commits

Author SHA1 Message Date
Kognise
d950cbc9f8
Fix broken HTML 2021-08-23 11:51:21 -04:00
Kognise
24be4cd55e
Merge pull request #257 from HarshitJoshi9152/bookmarklet-theme-toggle
Bookmarklet theme toggle
2021-08-21 15:21:50 -04:00
Kognise
21f50a889f
Create six-owls-punch.md 2021-08-21 11:17:49 -04:00
Kognise
002df477cd
Update bookmarklet in HTML 2021-08-21 11:17:15 -04:00
Kognise
b850c3072d
Bookmarklet cleanups 2021-08-21 11:15:11 -04:00
HarshitJoshi9152
506e106b55 using dark/light stylesheets 2021-08-21 10:47:42 +05:30
HarshitJoshi9152
0859ec67e6 added icons & fix ! 2021-08-21 01:13:25 +05:30
HarshitJoshi9152
10d49f02fb added basic functionality for theme switch button 2021-08-20 19:53:23 +05:30
Kognise
6b3e33d156
v2.1.1 2021-08-11 15:01:26 -04:00
Kognise
9d11a0ad6d
2.1.0 2021-08-11 14:58:29 -04:00
Kognise
c6265a06e8
Merge pull request #229 from HimanshuPandey2002/himanshu
added contrast in buttons
2021-08-11 14:46:18 -04:00
Kognise
164d96d385
Merge branch 'master' into himanshu 2021-08-11 14:44:53 -04:00
Kognise
b0cf60692d
Tweak colors 2021-08-11 14:43:14 -04:00
Kognise
5f66486244
Align better with main branch and update changesets 2021-08-11 14:39:22 -04:00
Kognise
7daa3e2366
Merge pull request #238 from dtinth/master
Fix color of code and strong tags inside links
2021-08-11 13:17:10 -04:00
Kognise
65312829b9
Merge branch 'master' into master 2021-08-11 13:16:03 -04:00
Kognise
2c58edb7fa
Merge pull request #250 from eazulay/master
Reduce input selector specificity for input display property
2021-08-11 13:15:10 -04:00
Kognise
cf12bc7d48
Merge branch 'master' into master 2021-08-11 13:14:01 -04:00
Kognise
cc486b8d3f
Merge pull request #247 from SahAssar/master
Remove sourcemap references from built files
2021-08-11 13:12:40 -04:00
Kognise
21e1e5d95e
Create itchy-hairs-beg.md 2021-08-11 13:11:01 -04:00
Eyal Azulay
c23d65c222
Add files via upload 2021-06-19 18:02:40 +01:00
Eyal Azulay
42cc5ba32d Reduce input selector specificity for display property to prevent overriding user's css. Fixes #78 and #82 2021-06-14 12:11:53 +01:00
Svante Richter
aa70f707d9 Remove sourcemap references from built files 2021-03-28 17:13:32 +02:00
Jonas
129e255eb4
Merge pull request #243 from drwpow/drwpow/pkg-entrypoint
Update package entrypoint
2021-01-28 19:43:21 +01:00
Drew Powers
2fff00c3ee Update package entrypoint 2021-01-26 21:56:30 -07:00
Jonas
8adf0d1787
Merge pull request #240 from itsdeekay/resetButton 2021-01-08 20:57:32 +01:00
Deepak Kumar
1f1168c6b6 Adding changeset for change 2021-01-04 22:13:05 +05:30
Deepak Kumar
343594365c Button Styling for Reset Button 2021-01-04 22:01:17 +05:30
Thai Pangsakulyanont
881022a5a7
Add a changeset for #238 2020-12-20 18:57:17 +07:00
Thai Pangsakulyanont
6193a5a2f0 Fix color of code and strong tags inside links 2020-12-20 11:48:54 +00:00
Himanshu
50bdf23e69 changed hover color closer to base color 2020-10-20 12:06:12 +05:30
Himanshu
3430e4d409 changed hover color closer to base color 2020-10-20 11:53:55 +05:30
Himanshu Pandey
84b57fd8c4 added changeset 2020-10-12 12:15:57 +05:30
Himanshu Pandey
eac795d1d8 added contrast in buttons 2020-10-10 10:19:27 +05:30
Kyle Pollard
83e916f66c
Merge pull request #225 from osbulbul/master
better button color inside table
2020-10-08 21:51:48 -07:00
Oguzhan Selcuk Bulbul
f33587bfea better button color inside table 2020-10-03 23:19:41 +03:00
Kognise
b98fa2d024
Merge pull request #154 from khuongduybui/master
feat: Add <dialog> support
2020-10-02 13:38:22 -04:00
Kognise
567d2ec641 Add changeset 2020-10-02 17:35:49 +00:00
Kognise
d785c31c8b Style changes 2020-10-02 17:35:01 +00:00
Duy K. Bui
f89b85b65e
feat: Add <dialog> support 2020-10-02 13:08:57 -04:00
Kognise
e5306ff96e
Merge pull request #222 from jsmailes/issue178-color
Add styling for color input, compatible with 2.0
2020-10-02 10:08:44 -04:00
Kognise
df5beae142
Pointer cursor for color input 2020-10-02 10:00:26 -04:00
Josh
ebb4e23889 Fix indentation, add changeset 2020-10-02 10:50:39 +01:00
Josh
d6eca80c29 Add color input field style back 2020-10-02 10:45:15 +01:00
Josh
e391169ac8 Merge remote-tracking branch 'upstream/master' into issue178-color 2020-10-02 10:30:34 +01:00
Josh
6b577540df Revert "Add styling for color input, example to index.html"
This reverts commit 4315ae23fc.
2020-10-02 10:30:14 +01:00
Kognise
d45487ee96
Fix opengraph image 2020-10-01 14:09:54 -04:00
Kognise
562e242e7d
Access public 2020-10-01 14:06:01 -04:00
Kognise
8df179cecc
Merge branch 'two' 2020-10-01 14:02:15 -04:00
Kognise
69bc485c3b
Add dist to gitignore (again again) 2020-10-01 13:55:31 -04:00
Kognise
6c2d1d60e4
about-this-directory -> README.md 2020-10-01 13:55:15 -04:00
Kognise
2f64be44a8
Remove dist from gitignore 2020-10-01 13:53:37 -04:00
Kognise
6317a893d7
Add dist back to gitignore 2020-10-01 13:50:09 -04:00
Kognise
c689cc3519
Add correct dist and fix typo 2020-10-01 13:49:51 -04:00
Kognise
8571f89663
Remove dist from gitignore 2020-10-01 13:49:28 -04:00
Kognise
81fedfeede
Update changelog 2020-10-01 13:47:52 -04:00
Kognise
897cca2d50
Add dist to gitignore 2020-10-01 13:42:51 -04:00
Kognise
7341679dd5
dist/ -> out/ 2020-10-01 13:42:13 -04:00
Josh
4315ae23fc Add styling for color input, example to index.html 2020-10-01 15:53:11 +01:00
Kognise
3b94bb4bf3
Merge pull request #211 from kylejrp/two-changeset
[WIP] Added changeset
2020-10-01 10:23:33 -04:00
Kyle Pollard
bf5c73b167 Added todo for jsdelivr 2020-07-03 23:09:12 -07:00
Kyle Pollard
cd0125667e Ran yarn changeset validate and cleaned output 2020-07-03 23:03:32 -07:00
Kyle Pollard
e6362e7ab8 Added individual changesets
Includes all changes since version 1.2.1
2020-07-03 23:00:27 -07:00
Kyle Pollard
e74877b5ad
Merge pull request #210 from habeckmatt/two
Added color --text-bright to the selection in _misc
2020-07-03 18:10:40 -07:00
Matt Habeck
4ff85569f1 Added color --text-bright to the selection in _misc 2020-06-29 14:00:57 -05:00
Felix
882e01f17c Farewell, Google Analytics 2020-06-29 11:46:18 -05:00
Felix
e5cbca23d6 Fix scope of linting rules 2020-06-10 10:26:43 -05:00
Kognise
c9eb4707ed
Merge pull request #208 from kognise/kylejrp-patch-contributing-md
Update CONTRIBUTING.md
2020-06-10 10:17:36 -05:00
Kyle Pollard
c70bb99a61
Fixed merged typo 2020-06-01 22:37:25 -07:00
Kyle Pollard
136b7488d7
Update CONTRIBUTING.md 2020-06-01 22:04:29 -07:00
Felix
f19031a071 Update file size 2020-05-31 19:55:00 -05:00
Felix
d6db2e7c59 Bye bye screenshot.jpg 2020-05-31 18:11:42 -05:00
Felix
7e4e508fc1 Fix textarea height 2020-05-31 18:10:19 -05:00
Jonas
37910e7fa2
Merge pull request #207 from kognise/docs/link-linting 2020-05-31 19:43:03 +02:00
Jonas
68a9b11db0
Merge pull request #161 from justinasposiunas/patch-1
Duplication of "Contributing" section on README.md removed
2020-05-31 19:11:57 +02:00
Jonas Kuske
8e2b1d88bb docs: add link to further information on linting 2020-05-31 19:07:28 +02:00
Justinas Pošiūnas
6232b1854d duplication removed 2020-05-31 18:58:01 +02:00
Kognise
1a14ad2652
Merge pull request #157 from kcclemo/Update_theming_guide
Theming guide updated.
2020-05-31 11:51:18 -05:00
Kirk Clemons
99104fa072 Theming guide updated. 2020-05-31 18:47:44 +02:00
Kognise
ed7eda2520
Merge pull request #204 from kognise/fix/typo-contributing
fix: typo starty → start
2020-05-31 11:20:21 -05:00
Jonas
fa25f22b2a
fix: typo starty → start
close #165
2020-05-31 18:18:39 +02:00
Kognise
eeb2286771
Merge pull request #200 from kognise/docs/contributing-update
docs: update and improve contributing guidelines
2020-05-31 09:45:31 -05:00
Jonas Kuske
778ff5552e fix: update headline so link isn't broken 2020-05-31 08:27:54 +02:00
Kognise
1f99994cf1
Merge pull request #202 from kognise/feat/scrollbar-firefox
feat: scrollbar styles for firefox
2020-05-31 01:02:27 -05:00
Jonas Kuske
843da175f9 feat: add scrollbar styles for firefox 2020-05-31 07:59:00 +02:00
Kognise
863b0d688e
Merge pull request #201 from kognise/feat/textarea-row-cols
feat: respect cols/rows attribute on textarea
2020-05-31 00:49:21 -05:00
Jonas Kuske
28e538d212 feat: respect cols and rows attrs on textarea 2020-05-31 07:45:10 +02:00
Jonas Kuske
03c7eb5faa docs: mention not to use class/id 2020-05-31 07:31:23 +02:00
Jonas Kuske
79c163655e docs: update and improve contributing guidelines 2020-05-31 07:26:08 +02:00
Kognise
7b5fab9549
Merge pull request #199 from kognise/fix/accessibility-checks
Add pa11y and fix accessibility issues
2020-05-30 20:47:10 -05:00
Felix
757ffe6805 Add pa11y and fix accessibility issues 2020-05-30 19:42:16 -05:00
Kognise
f65e48dc96
Merge pull request #197 from kognise/refactor/browserslist
Use env-less browserslist, autoprefix docs/style.css
2020-05-30 19:12:02 -05:00
Jonas
00f69d68d3
Merge pull request #198 from kognise/fix/add-noopener 2020-05-31 01:55:03 +02:00
Jonas Kuske
aad0bbe4a9 refactor: remove redundant browserslist query 2020-05-31 01:51:26 +02:00
Jonas Kuske
47cb989588 fix: add rel=noopener to link 2020-05-31 01:43:28 +02:00
Jonas Kuske
ca6ef595c1 feat: autoprefix docs css 2020-05-31 01:31:13 +02:00
Jonas Kuske
a4f6da8bdc refactor: use env-less browserslist 2020-05-31 01:30:58 +02:00
Kognise
06ea6b15de
Merge pull request #196 from kognise/docs/readme-update
README updates
2020-05-30 18:27:09 -05:00
Jonas Kuske
b445291871 style: add line break 2020-05-31 01:17:54 +02:00
Jonas Kuske
aaf90b9596 fix: use correct URL for readme image 2020-05-31 01:16:59 +02:00
Jonas Kuske
4713674b3b fix: remove double "!"
oops!! :D
2020-05-31 01:16:05 +02:00
Jonas Kuske
b03e40f08c docs: remove mentions of "other options" 2020-05-31 01:14:21 +02:00
Felix
d58953136b Remove postcss import options 2020-05-30 17:58:04 -05:00
Felix
03d3815d39 Update description 2020-05-30 17:54:22 -05:00
Felix
9622806a42 Remove posthtml-include 2020-05-30 17:52:29 -05:00
Felix
ce1815038b Fix max-width of video element (closes #179) 2020-05-30 17:42:33 -05:00
Felix
1bb775b93b Make table not overflow 2020-05-30 14:03:47 -05:00
Felix
3a3d1baa6a Add min-height to <textarea> 2020-05-30 14:01:59 -05:00
Felix
1c7806c518 Add summary/details to the demo page, improve styles 2020-05-30 13:58:58 -05:00
Felix
476074e62e Make documentation clearer 2020-05-30 12:52:48 -05:00
Felix
b06097ee38 Remove unneeded styles 2020-05-30 12:47:34 -05:00
Felix
f7a0b68f08 Fix color scheme priority 2020-05-29 23:27:36 -05:00
Felix
b49b852722 Update precommit hook to not fix changes and error 2020-05-29 23:25:26 -05:00
Felix
69ba583ccd Fix a typo (oops!) 2020-05-29 23:23:50 -05:00
Felix
7a656de78e Add color emojis to the base stylesheet 2020-05-29 23:23:08 -05:00
Felix
c940d74d10 Add bookmarklet to documentation 2020-05-29 22:37:47 -05:00
Felix
5e3cc93c8b Slightly improve heading margins 2020-05-29 22:36:59 -05:00
Felix
95296ac857 Update file sizes 2020-05-29 22:26:32 -05:00
Kognise
6d66c9c05a
Merge pull request #191 from kognise/new-file-structure
[WIP] New File Structure + Version Picker
2020-05-29 22:21:31 -05:00
Jonas Kuske
827691d551 fix: allow overriding product hunt theme 2020-05-30 05:16:45 +02:00
Jonas Kuske
30cbcfa492 fix: no bouncey transition, max scale 1 2020-05-30 05:09:52 +02:00
Jonas Kuske
4af11172f1 feat: remove misleading note about browser support 2020-05-30 04:46:54 +02:00
Jonas Kuske
919e2974a2 fix: use correct h3 id, remove unnecessary scripts 2020-05-30 04:45:15 +02:00
Jonas Kuske
a838f4fcec refactor: minor cleanup 2020-05-30 04:35:33 +02:00
Jonas Kuske
c938689a7e feat: wire up copy button 2020-05-30 04:27:57 +02:00
Jonas Kuske
24ac400205 feat: add transitions for the code snippets 2020-05-30 03:58:04 +02:00
Jonas Kuske
d93d03acd5 chore: add .prettierignore 2020-05-30 03:14:24 +02:00
Jonas Kuske
f8c095827b fix: always update product hunt on theme change
If the selected (forced) theme was different from the system preference
and then switches back to auto, need to reset the product hunt theme too
2020-05-30 03:00:15 +02:00
Jonas Kuske
aff527a791 docs: correctly document default theme as "light" 2020-05-30 02:46:17 +02:00
Jonas Kuske
3a3762ff9e feat: turn "prefers-color-scheme" into link to MDN 2020-05-30 02:45:37 +02:00
Jonas Kuske
4b75b3aeb6 fix: update code to support IE & Edge Legacy 2020-05-30 02:42:08 +02:00
Jonas Kuske
68834efd73 refactor: remove old versionpicker code 2020-05-30 02:21:34 +02:00
Kyle Pollard
5268f17198
Merge pull request #192 from kognise/print-stylesheet
Add Print Stylesheet
2020-05-29 15:26:58 -07:00
Felix
dbd4d1b579 Add basic print stylesheet 2020-05-29 11:47:26 -05:00
Felix
9fb32259b9 Add bookmarklet code 2020-05-28 23:15:55 -05:00
Felix
fa7e9f5c51 Add husky 2020-05-28 23:05:22 -05:00
Felix
5c0043984f Fix a smol typo 2020-05-28 19:40:15 -05:00
Felix
16fa28bdc8 Add a clarification about prefers-color-scheme support 2020-05-28 19:38:17 -05:00
Felix
c47f0e3599 Increase border radius 2020-05-28 19:33:52 -05:00
Felix
cd08cd22a9 Improve checkboxes and radio button styles 2020-05-28 19:28:24 -05:00
Felix
9248e5fb7b Merge branch 'two' into new-file-structure 2020-05-28 18:40:48 -05:00
Felix
56be0bc0ae Update readme badges 2020-05-28 18:37:30 -05:00
Felix
af69444728 Update the readme 2020-05-28 18:32:45 -05:00
Felix
958769a93f Update demo site url 2020-05-28 17:50:33 -05:00
Felix
afe8880a0f Update product hunt badge 2020-05-28 14:54:07 -05:00
Felix
c4d6f8ae20 Merge branch 'two' into new-file-structure 2020-05-28 14:42:34 -05:00
Felix
e56f81eeca Finesse some visuals 2020-05-28 14:42:14 -05:00
Felix
7e4251f5c1 Update docs pt.1 2020-05-28 14:40:02 -05:00
Felix
2c29269710 Fix some linting issues 2020-05-27 21:10:50 -05:00
Felix
9d96ee32f9 Update file structure 2020-05-27 21:04:05 -05:00
Felix
86d40b364c Force arrow functions 2020-05-27 21:03:51 -05:00
Felix
73143be201 Update cdn urls 2020-05-27 18:29:52 -05:00
Felix
8695e925ba Oops, I deleted the button code 2020-05-27 18:29:40 -05:00
Felix
1297b75c5c Make some changes outlined in #64 2020-05-27 14:47:48 -05:00
Felix
f7f5cae817 Clarify changesets a bit more in CONTRIBUTING.md 2020-05-27 14:23:56 -05:00
Felix
f67b8da4fa Add Changesets and update documentation 2020-05-27 14:20:45 -05:00
Felix
332e8cea03 Linting, so much linting
I installed and configured stylelint and eslint, and added an editorconfig as well as a vscode recommended extensions file.

The reason the diff is so large is I ran the linters and fixed all the linting issues.
2020-05-27 13:09:20 -05:00
Felix
f2ab222da6 Remove redundant code 2020-05-26 21:36:14 -05:00
Felix
ff9bf59b8a Add changes from #140 2020-05-26 21:35:34 -05:00
Felix
44d3f6805a Finish merging (again) 2020-05-26 20:42:19 -05:00
Felix
71800d232f Revert "Merge pull request #51 from kognise/bugfix/custom-boxes"
This reverts commit 69e2d8821a.
2020-05-26 20:42:04 -05:00
Felix
d6766ceeda Finish merging 2020-05-26 20:40:01 -05:00
Felix
45dcac5f93 Merge branch 'master' into two 2020-05-26 20:36:21 -05:00
Felix
0ee55cfc7c Remove dist 2020-05-26 20:33:35 -05:00
Kognise
7799a68398
Merge pull request #150 from kognise/kylejrp-patch-filesize-goals
Fix filesize goals
2020-05-26 17:13:23 -05:00
Kognise
0508d04e65
Update filesize goals in index.html 2020-05-26 17:12:03 -05:00
Kognise
5a8a99999c
Merge branch 'master' into kylejrp-patch-filesize-goals 2020-05-26 17:07:47 -05:00
Kognise
7e86e4f67c
Merge pull request #166 from PaperMountainStudio/master
fix telephone.html being recognized as tel: etc.
2020-01-30 13:17:29 -05:00
Paper Mountain Studio
49fb387779 fix telephone.html being recognized as tel: etc. 2020-01-04 13:52:40 +01:00
Kognise
7c8261264f
Add run on Repl.it badge to README (#164)
Add run on Repl.it badge to README
2019-12-10 21:11:01 -05:00
Kognise
826327ee49 Add run on repl.it badge to README
This pull request configures this repository to be run on Repl.it.      It adds a `.replit` configuration file and a Repl.it badge to the `README`.
     You can read more about running repos on Repl.it [here](https://docs.repl.it/repls/dot-replit), or view the Repl [here](https://staging.repl.it/@Kognise/watercss-16).
2019-12-11 02:09:42 +00:00
Kognise
45d0f4e6f8
Break words when word wrapping (#162)
Break words when word wrapping
2019-11-15 00:32:48 -05:00
dotcomboom
b8ae8497b7
Break words when word wrapping
Prevents long strings of characters (say, "AAAAAAAAAAAAAAAAAAAAAAAA" for example) from going out of the content area and making you have to scroll.
2019-11-14 21:37:50 -06:00
kylejrp
bc386c2bcb
Merge pull request #92 from jonaskuske/docs/theming
[WIP] README update / Theming section
2019-11-05 10:05:32 -08:00
Jonas
4540c50966
Merge branch 'master' into docs/theming 2019-11-05 18:39:07 +01:00
kylejrp
f8bdc84277
Merge pull request #118 from yudi43/master
Update README.md
2019-11-01 21:44:02 -07:00
kylejrp
c38f959ffa
Merge branch 'master' into master 2019-11-01 21:43:00 -07:00
kylejrp
d0201a5a7e
Fix filesize goals
Supersedes #63, fixes #36.

Resubmitting the merge request without any `gulpfile.js` changes now that the old merge request is severely out of date.
2019-11-01 21:07:21 -07:00
kylejrp
3eaf87976a
Merge pull request #141 from M1seRy/master
chore: grammar in the meantime => in the mean time
2019-11-01 21:02:25 -07:00
kylejrp
e72ac1180b
Merge branch 'master' into master 2019-11-01 21:00:34 -07:00
kylejrp
ce761ba414
Merge pull request #121 from marcobiedermann/hotfix/coding-style
Hotfix: coding style
2019-11-01 18:23:01 -07:00
kylejrp
65af58f6dd
Merge branch 'master' into hotfix/coding-style 2019-11-01 18:21:54 -07:00
kylejrp
48389a8abd
Merge pull request #119 from kimulaco/fix/html-validate
Fixed HTML syntax of the demo page
2019-11-01 17:24:13 -07:00
kylejrp
effca75e0a
Merge branch 'master' into fix/html-validate 2019-11-01 17:21:49 -07:00
kylejrp
1d7476a969
Merge pull request #115 from kognise/add/style-guidelines
Add style guidelines/linter
2019-11-01 17:05:02 -07:00
kylejrp
0a87b29b6e
Merge branch 'master' into add/style-guidelines 2019-11-01 17:03:57 -07:00
kylejrp
400fcd8980
Merge pull request #120 from justinasposiunas/contributing-doc
Created Contributing Guide
2019-11-01 16:33:52 -07:00
kylejrp
aacf0a24fe
Merge branch 'master' into contributing-doc 2019-11-01 16:32:14 -07:00
kylejrp
8dbf792b0d
Merge branch 'master' into master 2019-11-01 16:26:14 -07:00
kylejrp
2ed8547fb5
Merge pull request #116 from kognise/dependabot/npm_and_yarn/mixin-deep-1.3.2
build(deps): bump mixin-deep from 1.3.1 to 1.3.2
2019-11-01 16:25:45 -07:00
dependabot[bot]
5c413838c3
build(deps): bump mixin-deep from 1.3.1 to 1.3.2
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-01 23:22:29 +00:00
kylejrp
c25908c8eb
Merge pull request #122 from olgark/master
Add footer example
2019-11-01 16:19:36 -07:00
Justinas Pošiūnas
2d9bbec3ce
Merge branch 'master' into contributing-doc 2019-10-31 20:02:00 +02:00
wuxinhua
083f8f7b27 chore: grammar in the meantime => in the mean time 2019-10-31 13:45:25 +08:00
Lee Garkusha
b42974bb25 Add footer example 2019-10-03 19:50:07 -04:00
Marco Biedermann
3ee2f57946 fix: space
Add missing space after selector
2019-10-03 23:32:25 +02:00
Marco Biedermann
92ae2e2517 fix: pseudo elements
Fix pseudo element syntax
2019-10-03 23:31:06 +02:00
Marco Biedermann
6e9b58a913 fix: space
Remove space before comma
2019-10-03 23:28:09 +02:00
Justinas Pošiūnas
1263007453 linked contributing.md in readme.md 2019-10-03 10:35:45 +03:00
Justinas Pošiūnas
2650aed270 added contributing.md first revision 2019-10-03 10:35:30 +03:00
kimulaco
7e48e0c34b Fix illegal character in path segment 2019-10-03 14:17:28 +09:00
kimulaco
a92d7ee596 Fix character entities 2019-10-03 14:06:32 +09:00
kimulaco
16345af22c Fix duplicate id attr 2019-10-03 14:00:35 +09:00
kimulaco
cf45eef0a0 No need for style attr 2019-10-03 13:59:49 +09:00
kimulaco
e3550439d1 No need for width and height units 2019-10-03 13:58:03 +09:00
Yudhishthir Singh
1a1f74f0ee
Update README.md 2019-10-03 07:16:45 +05:30
dependabot[bot]
885f26712e
build(deps): bump lodash from 4.17.11 to 4.17.15
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-02 19:12:05 +00:00
Felix Mattick
dbc9c50f34 Add style linting and fix problems 2019-10-02 12:03:14 -07:00
Felix Mattick
4eba6d54ac Add Standard linting and fix problems 2019-10-02 11:09:20 -07:00
Felix Mattick
2d029be3fc Install standard 2019-10-02 10:59:34 -07:00
Felix Mattick
89db17b227 Merge branch 'remove-dist' 2019-10-02 10:41:45 -07:00
kylejrp
9edc3c8200
Merge pull request #113 from JanSchneider1/master
#111 Seperate browserlist for modern builds
2019-10-02 10:03:07 -07:00
kylejrp
006e641189
Merge branch 'master' into master 2019-10-02 10:01:48 -07:00
kylejrp
4c3a1f1759
Merge pull request #108 from olgark/master
Update styles for multiple select elements. Add example of small and fieldset element.
2019-10-02 09:57:59 -07:00
Lee Garkusha
8dcdb635f9 Update margin and padding on fieldset to match other form elements 2019-10-02 06:15:32 -04:00
Jan Schneider
6d37bf30c3 #111 Seperate browserlist for modern builds 2019-10-02 11:34:55 +02:00
Melanie Seltzer
cf55a56b61 Remove dist folder 2019-10-01 23:25:20 -07:00
Lee Garkusha
40f0829b97 Add fieldset example. Move some existing fields into the fieldset. 2019-10-01 21:48:35 -04:00
Lee Garkusha
1b4fdf7253 Update styles for multiple select elements. Add example of small element. 2019-10-01 21:11:45 -04:00
kylejrp
f0709f5517
Merge pull request #106 from Showtim3/support-details
Fixes #30 Adding support for details and summary tag
2019-10-01 15:09:14 -07:00
kylejrp
dee29f83f8
Merge branch 'master' into support-details 2019-10-01 15:08:16 -07:00
kylejrp
d6ef36cdd5
Merge pull request #107 from SergiOca87/master
Added a multiple "select" option
2019-10-01 15:05:13 -07:00
Showtim3
6c5d691cf6 removing * selector 2019-10-02 02:39:54 +05:30
Sergi
f77f3867d7 Added multiple select option 2019-10-01 22:19:51 +02:00
Sergi
cac315d511 Added multiple select option 2019-10-01 22:15:38 +02:00
Showtim3
1088f6e2f8 Adding support for details and summary tag 2019-10-02 00:16:00 +05:30
Kognise
c9e5cc9ec0
Merge pull request #103 from mohd-akram/fix-demo
Fix demo page
2019-09-21 09:52:01 -04:00
Mohamed Akram
d38866b357 Fix demo page 2019-09-21 16:49:01 +04:00
kylejrp
3aedaf2b43
Merge pull request #94 from jonaskuske/feat/select
[supersedes #58] Add arrow for <select>
2019-09-01 15:19:48 -07:00
Kognise
dc8546b096
Fix select styling 2019-09-01 13:14:12 -04:00
Kognise
ad9dc7c780
Merge branch 'master' into feat/select 2019-09-01 12:57:33 -04:00
Kognise
c10daa5fd4
Merge pull request #53 from kimulaco/hotfix/table-color
Change selector which gives table border
2019-08-26 12:35:25 -05:00
Kognise
69705aae8b
Add code back in and build 2019-08-26 13:34:17 -04:00
Kognise
200b828321
Merge branch 'master' into hotfix/table-color 2019-08-26 13:29:26 -04:00
Kognise
69e2d8821a
Merge pull request #51 from kognise/bugfix/custom-boxes
Add radio and checkbox styles
2019-08-26 12:24:08 -05:00
Kognise
13fa999d10
Build 2019-08-26 13:23:55 -04:00
Kognise
9ba26a1546
Merge branch 'master' into bugfix/custom-boxes 2019-08-26 13:23:15 -04:00
Kognise
c3c14404c4
Merge pull request #96 from Brown1ee/more-water
Add styles for input type range
2019-08-26 12:15:30 -05:00
Kognise
251086ac31
Build 2019-08-26 13:13:35 -04:00
Kognise
af3ad9cdc0
Improve formatting 2019-08-26 13:13:31 -04:00
Kognise
115037438c
Build 2019-08-26 13:10:35 -04:00
Kognise
a2cda5159d
Improve padding 2019-08-26 13:10:27 -04:00
Kognise
52fde30a56
Changed demo layout 2019-08-26 13:09:01 -04:00
Kognise
94b44d810d
More single quotes :P 2019-08-26 12:59:10 -04:00
Kognise
7319402ea1
Single quotes 2019-08-26 12:57:52 -04:00
Kognise
b47e0de3fe
Fix merge problems 2019-08-26 12:40:08 -04:00
Kognise
eea4f7e92a
Merge branch 'master' into bugfix/custom-boxes 2019-08-26 12:26:07 -04:00
Bobo
b478f94361 yarn build 2019-06-19 13:50:47 +03:00
Bobo
5b3dac19e8 add and style input type range 2019-06-19 13:34:10 +03:00
Jonas Kuske
4db53a2790 feat: improved table markup & CSS cleanup 2019-06-10 15:22:06 +02:00
Jonas Kuske
6434c142d2 feat: add SEO stuff 2019-06-09 22:52:55 +02:00
Jonas Kuske
29afc6c80a chore: add dist/docs to gitignore 2019-06-09 22:26:35 +02:00
Jonas Kuske
cbb587aded chore: remove compiled docs from git 2019-06-09 22:25:45 +02:00
Jonas Kuske
876ce1993c chore: compile new version 2019-06-09 16:17:44 +02:00
Jonas Kuske
a1be24b96b feat: output styles to docs, so site can use them 2019-06-09 16:17:24 +02:00
Jonas Kuske
72385eb668 fix: locate webmanifest in root so start_url works 2019-06-09 15:30:02 +02:00
Jonas Kuske
78221f471c feat: use ESM version of favicon-mode-switcher 2019-06-09 15:27:36 +02:00
Jonas Kuske
e7cddd06fc chore: compile new version 2019-06-09 14:28:01 +02:00
Jonas Kuske
4cf2713004 fix: update css imports to be independent from CDN 2019-06-09 14:27:34 +02:00
Jonas Kuske
eca4067fb0 feat: show when theme is overwritten by prefers-color-scheme 2019-06-09 01:56:38 +02:00
Jonas Kuske
a8c482f5d8 fix: make <details> styling compatible with proposed changes in #87 2019-06-09 00:33:30 +02:00
Jonas Kuske
491e554784 fix: restore <details> styling in Firefox
only remove startup stylesheet on first JS style load
2019-06-09 00:06:01 +02:00
Jonas Kuske
cd15e37177 fix: update regex so only valid themes in URL params are used 2019-06-08 23:14:51 +02:00
Jonas Kuske
d0ca9554f0 fix: update icon hrefs for dark mode icons 2019-06-08 22:31:40 +02:00
Jonas Kuske
8113c5b05c chore: compile new version 2019-06-08 21:36:29 +02:00
Jonas Kuske
758cd36841 feat: update so branch base matches current master 2019-06-08 21:35:56 +02:00
Jonas Kuske
8e465363f1 chore: compile new build 2019-06-08 21:21:07 +02:00
Jonas Kuske
2bd0bdd22e feat: remove fallback once dynamic copy is loaded
+ legacy option defaults to true when opened in legacy browsers
2019-06-08 21:21:04 +02:00
Jonas Kuske
76a4ccbc7c fix: add margin between theme selection buttons 2019-06-08 21:20:36 +02:00
Jonas Kuske
afcf059863 feat: add tooltip styling, make options expandable, general fixes 2019-06-08 21:20:35 +02:00
Jonas Kuske
893b8ab4ed chore: add docs dependencies to pkg json 2019-06-08 21:20:35 +02:00
Jonas Kuske
2118518552 fix: remove currently non-existing stylesheets
& use HTML entity for space before emoji
2019-06-08 21:20:35 +02:00
Jonas Kuske
2216b32f09 feat: allow version select via URL query params 2019-06-08 21:20:32 +02:00
Jonas Kuske
ba843037d0 refactor: add proper typing 2019-06-08 21:19:33 +02:00
Jonas Kuske
6bf48e1615 refactor: add HTML processing, picker as partial 2019-06-08 21:19:33 +02:00
Jonas Kuske
75f9280dab fix: replace <br /> with padding-top
+ prevent potential error in getFileSize()
2019-06-08 21:19:33 +02:00
Jonas Kuske
3d667c928e feat: show installation headline while picker loads 2019-06-08 21:19:32 +02:00
Jonas Kuske
a77a2e9799 fix: give higher specificity to transition class 2019-06-08 21:19:32 +02:00
Jonas Kuske
264b958a84 fix: use toFixed() to prevent sizes with many decimals 2019-06-08 21:19:32 +02:00
Jonas Kuske
3ced8a8ded fix: determine correct alternate theme in getFileSnippet 2019-06-08 21:19:32 +02:00
Jonas Kuske
ba6664cb91 feat: add sourcemaps for docs build 2019-06-08 21:19:31 +02:00
Jonas Kuske
0de736c5b7 fix: don't show [title] if standalone is selected 2019-06-08 21:19:31 +02:00
Jonas Kuske
e7012d19c4 feat: add footer 2019-06-08 21:19:31 +02:00
Jonas Kuske
033390881e feat: add build step for docs, minor improvements 2019-06-08 21:19:28 +02:00
Jonas Kuske
234152f181 feat: add new installation guide, move to docs/ 2019-06-08 21:18:43 +02:00
Jonas
f083328519
Merge branch 'master' into feat/select 2019-06-07 08:57:27 +02:00
kylejrp
cecf3becfa
Merge pull request #93 from asoback/text-level-semantics
Text level semantics
2019-06-06 20:25:25 -07:00
kylejrp
92afd8bf0c
Merge branch 'master' into feat/select 2019-06-06 20:25:02 -07:00
kylejrp
d94e9117ac
Merge branch 'master' into text-level-semantics 2019-06-06 19:45:24 -07:00
kylejrp
f320ca0a51
Merge pull request #91 from jonaskuske/feat/icon-image
Icons & Favicon
2019-06-06 19:43:03 -07:00
Jonas Kuske
c98fed0200 cleanup: remove old SVG files 2019-06-07 01:48:08 +02:00
Jonas Kuske
f7c6a87ca9 feat: single SVG for arrow, change color on import 2019-06-07 01:13:36 +02:00
Jonas Kuske
436a4211eb feat: inline SVGs using postcss-inline-svg 2019-06-07 00:46:32 +02:00
Alexander Bluhm
64e7377caa Fixed select in IE11
Default browser arrow was displayed in IE11.
2019-06-06 23:00:53 +02:00
Alexander Bluhm
bb2eb0e171 Added selet arrow
Added two svg files for the arrow.
Removed old inline svg and url-encode.
Created SASS variables for the svg path.
2019-06-06 22:58:58 +02:00
Alexander Bluhm
c69ceda5e9 Fixed bug where the arrow icon on select is not displayed 2019-06-06 22:54:35 +02:00
Alexander Bluhm
8a1150d3c2 Added approach for new select
select tag is styled in a new way
added preview for select tag
2019-06-06 22:52:31 +02:00
asoback
28a84ab3f6 Updates to CSS variables
for issue #32
2019-06-05 21:33:30 -05:00
Jonas Kuske
4673919b7c feat: adjust favicon to dark mode 2019-06-02 04:46:52 +02:00
Jonas Kuske
2183c463bb fix: add line break 2019-06-01 03:39:17 +02:00
Jonas Kuske
4cc0a8ee15 fix: use different query param 2019-06-01 03:11:42 +02:00
Jonas Kuske
b5377d7673 feat: update README 2019-06-01 03:11:25 +02:00
Jonas Kuske
26aecd86db feat: use water.css colors for logo/image 2019-06-01 03:07:04 +02:00
Jonas Kuske
a5f3984352 feat: add icons 2019-06-01 03:06:37 +02:00
kylejrp
03269b4896
Merge pull request #85 from kimulaco/hotfix/switch-theme
Fix switch theme
2019-05-29 19:36:49 -07:00
kimulaco
b5e06b5768 Update themeSwitcher event 2019-05-29 22:45:30 +09:00
kimulaco
5de6636a1b Add ThemeSwitcher 2019-05-29 22:33:08 +09:00
kimulaco
1ce1c216c9 Update switch rules 2019-05-29 18:56:36 +09:00
kimulaco
7712f6aab9 Update switch theme script 2019-05-29 15:40:45 +09:00
kylejrp
a0218614e4
Merge pull request #71 from jonaskuske/feat/css-variables
Theming through CSS variables, (prefers-color-scheme)
2019-05-27 21:39:24 -07:00
Kyle Pollard
0a33813d10 Bump version to 2.0.0 2019-05-27 21:33:24 -07:00
Kyle Pollard
1a2d41b87b Fixed /docs references in gulpfile 2019-05-27 21:32:28 -07:00
Kyle Pollard
216432bf8f Moved /docs back into root 2019-05-27 21:27:14 -07:00
Jonas Kuske
5cf0f08d5e fix: reference correct versions in legacy default builds 2019-05-28 00:16:28 +02:00
Jonas Kuske
9d1382935a docs: update README to reflect out-of-date state 2019-05-28 00:07:56 +02:00
Jonas Kuske
ec69ef2d58 Merge branch 'master' into feat/css-variables 2019-05-27 23:43:10 +02:00
Jonas Kuske
ebff445fb0 chore: recompile dist files 2019-05-27 23:43:00 +02:00
Jonas Kuske
d4a00eb526 fix: reapply color changes from #39ab174 2019-05-27 23:31:34 +02:00
Jonas Kuske
f248fce30f fix: reapply code padding fix from #7378a36 2019-05-27 23:31:34 +02:00
Jonas Kuske
143373130d docs: update README to include new builds 2019-05-27 23:31:34 +02:00
Jonas Kuske
79ad695531 feat: add build files, add docs/ and .github/ 2019-05-27 23:31:34 +02:00
kylejrp
11095491c4
Merge pull request #72 from kimulaco/hotfix/color-overlap
Fix color overlap
2019-05-25 11:02:41 -07:00
Kognise
caed4a41a2
Merge branch 'master' into hotfix/table-color 2019-05-25 08:44:55 -04:00
kimulaco
39ab1744b6 Change color variables 2019-05-08 20:46:38 +09:00
Jonas
21869afbd7
Merge pull request #1 from jonaskuske/feat/replace-gulp
Replace Sass with PostCSS
2019-05-07 18:36:16 +02:00
kimulaco
7378a36250 Fix inline code padding 2019-05-08 00:53:25 +09:00
Jonas Kuske
47e8e43008 chore: compile new builds based on PostCSS build step 2019-05-07 02:01:18 +02:00
Jonas Kuske
11b0a7d3a5 feat: update gulp to compile using PostCSS 2019-05-07 01:43:58 +02:00
Jonas Kuske
1efce0e559 feat: rename .scss -> .css and use color-mod() 2019-05-07 01:37:36 +02:00
Jonas Kuske
da5e8fd653 fix: typo - variable -> variables 2019-05-06 01:56:07 +02:00
Jonas Kuske
0de724ade2 feat: compile all new build versions 2019-05-06 00:32:19 +02:00
Jonas Kuske
be233afd74 feat: add new build configurations 2019-05-06 00:27:17 +02:00
Jonas Kuske
550e4a72fc feat: rewrite partials to use CSS variables 2019-05-06 00:26:54 +02:00
Jonas Kuske
bc0daa5de6 feat: extract & rewrite variables with CSS syntax 2019-05-06 00:26:30 +02:00
Jonas Kuske
413e189821 feat: update gulpfile to compile CSS variables 2019-05-06 00:24:42 +02:00
kylejrp
2f4c5fba5e
Merge pull request #68 from jonaskuske/bugfix/responsive-images
Bugfix/responsive images
2019-05-04 20:24:25 -07:00
Jonas Kuske
615c423814 chore: build for deploy 2019-05-04 23:13:59 +02:00
Jonas Kuske
f75f577674 fix(img): add height: auto to keep aspect ratio 2019-05-04 23:11:13 +02:00
kylejrp
fced5e61ad
Merge pull request #67 from co16353sidak/master
Creation and Implementation of selection variable
2019-05-04 09:59:56 -07:00
Sidak Singh Aulakh
22ef746db1
Merge branch 'master' into master 2019-05-04 22:11:42 +05:30
kylejrp
5733c6f96b
Merge pull request #66 from pawptart/bugfix/switch-button
Fixed bug with switch button on first click
2019-05-02 19:01:21 -07:00
Tyler Porter
c80427fd8d Fixed bug with switch button on first click 2019-05-03 01:21:48 +00:00
Sidak Singh Aulakh
dd684c50e6 creation and implementation of selection variable 2019-04-30 01:57:20 +05:30
Kognise
770040da41
Merge pull request #60 from kylejrp/css-cleanup-v2
CSS Cleanup V2
2019-04-27 14:52:40 -04:00
Kognise
5bf4ff7429
Merge branch 'master' into css-cleanup-v2 2019-04-27 14:47:30 -04:00
Kognise
863fe51d46
Update theme variables 2019-04-22 18:27:42 -04:00
Kognise
d9c7d4a828
Add unminified info to readme 2019-04-22 18:26:36 -04:00
Kognise
fa99185faf
Use unminified stylesheet in demo 2019-04-22 18:24:51 -04:00
Kognise
a70df99d59
Build 2019-04-22 18:24:25 -04:00
Kognise
93f29bb507
Merge pull request #62 from pawptart/fix/ie-switch-button
Changed switch button function for IE11 compatibility
2019-04-22 00:00:37 -04:00
Tyler Porter
89bccb61fd Changed switch button function for IE11 compatibility 2019-04-22 03:34:15 +00:00
Kognise
651f73a3ff
Update _forms.scss 2019-04-20 17:44:41 -04:00
kylejrp
623430a367
Update src/parts/_forms.scss
Co-Authored-By: kognise <felix.mattick@gmail.com>
2019-04-20 17:40:19 -04:00
Kyle Pollard
1d48b7757d Run build before merging 2019-04-20 12:32:57 -07:00
Kyle Pollard
aebf27c289 Updated README.md with .min files 2019-04-20 12:30:08 -07:00
Kyle Pollard
d3851506f3 Added .gitattributes to ignore built files 2019-04-20 12:29:44 -07:00
Kyle Pollard
0d72b0675d Made demo page use .min.css files 2019-04-20 12:29:32 -07:00
Kyle Pollard
cd35275bbc Added .min.css files to dist
Made .css contain human readable styles
2019-04-20 12:29:10 -07:00
Kognise
a19ae73ed8
Merge branch 'master' into hotfix/table-color 2019-04-19 21:00:02 -04:00
kimulaco
7c7d355489 Change background color to tr other than tbody 2019-04-20 08:53:02 +09:00
kimulaco
ce39701d14 Change border to thead and tfoot 2019-04-19 22:56:28 +09:00
Kognise
bf2ff503e3
Account for proper table markup 2019-04-19 09:04:37 -04:00
Kognise
f7ae16ada3
Merge pull request #54 from kimulaco/feature/update-package-config
Change chalk into devDependencies
2019-04-19 09:02:16 -04:00
kimulaco
eb34c7d518 Change chalk into devDependencies 2019-04-19 19:04:21 +09:00
kimulaco
f08748c68c Fix selector which specifies table border 2019-04-19 18:27:52 +09:00
Kognise
444d0cc7c8
Pointer cursor for radio buttons 2019-04-18 13:35:32 -04:00
Kognise
26ca283dca
Add radio and checkbox styles 2019-04-18 13:25:23 -04:00
Kognise
c25ba7b427
Build 2019-04-18 13:01:52 -04:00
Kognise
4a4d62401c
Merge pull request #39 from kognise/bugfix/radio-buttons
Fix radio buttons
2019-04-18 13:01:32 -04:00
Kognise
73897206f6
Merge branch 'master' into bugfix/radio-buttons 2019-04-18 13:01:00 -04:00
Kognise
09628dadac
Build 2019-04-18 12:59:23 -04:00
Kognise
c3d17853dc
Merge pull request #46 from kognise/feature/addresses
Add address styles
2019-04-18 12:58:33 -04:00
Kognise
6bd9407dbe
Merge branch 'master' into feature/addresses 2019-04-18 10:42:31 -04:00
Kognise
d71e9f4a51
Merge pull request #49 from FedeAPerez/fix/blockquotes-margin
[Fix] - Blockquotes margin
2019-04-15 18:23:45 -04:00
Federico Pérez
926801d449 builded version of fix 2019-04-15 14:10:18 -03:00
Federico
2177dd67ab
Merge pull request #2 from kognise/master
Merge from origin
2019-04-15 14:08:13 -03:00
Kognise
a5dbcbbeb9
Merge branch 'master' into bugfix/radio-buttons 2019-04-15 10:59:44 -04:00
Kognise
4ce783f9bb
Add sms styles 2019-04-15 09:33:51 -04:00
Kognise
9f25b89c13
Add initial address styles 2019-04-14 09:40:40 -04:00
Kognise
1acfd6b553
Merge pull request #43 from kognise/test
Update links
2019-04-12 10:28:30 -04:00
Kognise
cef4e71631
Merge branch 'master' into bugfix/radio-buttons 2019-04-12 10:21:54 -04:00
Kognise
9054c40a90
Update links 2019-04-12 09:46:36 -04:00
Kognise
65e081df7f
Update README.md 2019-04-11 18:15:13 -04:00
Kognise
a28c2a0399
Add radio files 2019-04-11 14:22:01 -04:00
Kognise
59396156f9
Add radios to demo 2019-04-11 14:21:57 -04:00
Kognise
d40c41decc
Build blockquotes 2019-04-11 13:22:56 -04:00
Kognise
038bb63ab5
Merge pull request #28 from FedeAPerez/blockquotes
[Blockquotes] Added background and new file for blockquote
2019-04-11 13:22:16 -04:00
Kognise
a02252640f
Merge branch 'master' into blockquotes 2019-04-11 13:22:01 -04:00
Kognise
4d97516419
Remove variables file 2019-04-11 13:20:29 -04:00
Kognise
3417388cc1
Build 2019-04-11 12:41:39 -04:00
Kognise
943f3d00c9
Merge pull request #35 from kyokawasaki/feature/disabled-form-elements
Add missing disabled style to form elements
2019-04-11 12:41:02 -04:00
Kognise
4616444708
Merge branch 'master' into feature/disabled-form-elements 2019-04-11 12:40:52 -04:00
Kognise
215ae632e1
Build 2019-04-11 12:15:03 -04:00
Kognise
be1fa2a38a
Delete dist 2019-04-11 12:14:02 -04:00
Kognise
b2d7a13909
Merge pull request #14 from DanielBiegler/feature/style-code-scrollbars
add scrollbar stylings to code segments
2019-04-11 12:07:03 -04:00
Kognise
4834b8700e
Merge pull request #38 from kognise/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2019-04-11 12:05:30 -04:00
Kognise
dc292aea11
Create CODE_OF_CONDUCT.md 2019-04-11 12:05:20 -04:00
Kognise
2de67217c8
Tweak some styles 2019-04-11 11:55:32 -04:00
Kognise
0ac1cdb24a
Change position in demo 2019-04-11 11:55:27 -04:00
Kognise
773ca9e5eb
Move to typography 2019-04-11 11:11:18 -04:00
Kognise
c3996ae3fb
Removed firefox scrollbar 2019-04-11 10:46:08 -04:00
Kognise
839f643f6a
Custom scrollbars everywhere 2019-04-11 10:33:22 -04:00
Kognise
bdc8a566f8
Merge branch 'master' into feature/style-code-scrollbars 2019-04-11 10:26:54 -04:00
Kognise
c77aa206d1
Merge pull request #37 from erjanmx/fix-readme-typo
Fix readme typo
2019-04-11 09:43:40 -04:00
Erjan Kalybek
682faf6fcd Fix typo 2019-04-11 10:44:54 +02:00
川崎キヨシ
436492986d Add missing disabled style to form elements 2019-04-10 14:50:35 +09:00
Federico Pérez
c59e9cf60a merge and gulped 2019-04-09 11:11:35 -03:00
Federico
848ba95521
Merge pull request #1 from kognise/master
merge
2019-04-09 11:08:31 -03:00
Federico Pérez
f4c80d4b44 Merge branch 'master' into blockquotes 2019-04-09 11:00:50 -03:00
Federico Pérez
800a4467f1 Merge branch 'master' into blockquotes 2019-04-09 10:50:38 -03:00
Federico Pérez
51a8651600 new dist 2019-04-09 10:46:54 -03:00
Federico Pérez
0560f98763 more declarative stytles 2019-04-09 10:42:54 -03:00
Kognise
dff974d180
Merge pull request #29 from sorin-davidoi/patch-1
fix(parts/base): Use system-ui when available
2019-04-09 09:33:09 -04:00
Kognise
c577d01437
Change badge :P 2019-04-08 19:24:33 -04:00
Sorin Davidoi
93166998b3
fix(parts/base): Use system-ui when available
https://caniuse.com/#search=system-ui
2019-04-08 17:16:08 +00:00
Kognise
cfe782ad0c
Merge pull request #21 from bhaak/table_redesign
Table redesign
2019-04-08 10:19:04 -04:00
Kognise
05d314e2b9 Change to background alt 2019-04-08 00:31:17 -04:00
Kognise
6fafad9fb3 Update table styles 2019-04-08 00:25:07 -04:00
Kognise
3e91354f00 Merge branch 'master' into pr/21 2019-04-08 00:21:56 -04:00
Kognise
e60706894b
Merge pull request #23 from kylejrp/gulp
Gulp build tools
2019-04-07 23:57:47 -04:00
Kognise
d31f31680c More silly style updates 2019-04-07 23:57:25 -04:00
Kyle Pollard
45b1b26b7e More logging of file sizes, saner browserlist 2019-04-07 20:52:18 -07:00
Federico Pérez
0673df7c27 no contrast var 2019-04-08 00:35:24 -03:00
Federico Pérez
f5ee2353a6 use of variables 2019-04-08 00:33:26 -03:00
Federico Pérez
a9a13c9d74 back 2019-04-08 00:30:13 -03:00
Federico Pérez
029cc1cb3f changes to _file and styles 2019-04-08 00:23:35 -03:00
Kognise
5e06e92b2e Update browserlist and fix repl.it 2019-04-07 22:27:01 -04:00
Kognise
ffafcc1f3a Merge branch 'gulp' of https://github.com/kylejrp/water.css into pr/23 2019-04-07 22:18:36 -04:00
Kognise
b8b95d4f49 Add byte size printer 2019-04-07 22:18:31 -04:00
Kognise
58e705dcda
Merge branch 'master' into gulp 2019-04-07 22:01:59 -04:00
Kognise
bab6e27152 Tiny stylistic changes 2019-04-07 22:00:52 -04:00
Kognise
822bb54899
Merge pull request #24 from amasad/master
Change the repl.it badge to always clone from GitHub
2019-04-07 21:43:01 -04:00
Amjad Masad
1af050e86a Update script 2019-04-07 18:42:20 -07:00
Amjad Masad
0ebaba926c update badge 2019-04-07 18:37:11 -07:00
Amjad Masad
e69ba16b69 Move dev.js to index.js 2019-04-07 18:35:22 -07:00
Kyle Pollard
dd3d306692 Added recommended browserslist 2019-04-07 18:18:27 -07:00
Kognise
e9c5d58512
Update todos 2019-04-07 21:09:31 -04:00
Kyle Pollard
c302231819 Moved sourcemaps to external file to keep size low 2019-04-07 17:53:32 -07:00
Kyle Pollard
b500878f5a Removed old dev server and updated build/dev tasks 2019-04-07 17:50:33 -07:00
Kyle Pollard
a4f4eb370a Added browser-sync 2019-04-07 17:47:23 -07:00
Kyle Pollard
b19121261e Added sourcemaps, autoprefixing, css minification 2019-04-07 17:41:13 -07:00
Patric Mueller
73d291e677 Table redesign
Removed table borders, used color striping and left aligned table
headers.
2019-04-07 23:47:00 +02:00
Kognise
a8f5eec5c3 Add styling for blockquotes 2019-04-07 17:27:21 +01:00
Kognise
2b4962fc13
Fix typorino 2019-04-07 10:04:59 -04:00
Kognise
7c29de1036
Merge pull request #15 from amasad/patch-1
Add try on repl.it
2019-04-07 09:42:14 -04:00
Kognise
81520e1b4e
Repl.it badge now points to build system demo repl 2019-04-07 09:33:17 -04:00
Kognise
13fd1efdaa
Merge pull request #17 from jehna/fix-mixed-content-http-warning
Fix "mixed content" warning on Github Page
2019-04-07 08:54:37 -04:00
Jesse Luoto
ae99d5cf3a Fix "mixed content" warning on Github Page 2019-04-07 15:37:13 +03:00
Amjad Masad
3b69f402b9
Add try on repl.it 2019-04-07 05:04:48 -07:00
Daniel Biegler
4aac7ed620 add scrollbar stylings to code segments 2019-04-07 06:06:33 +02:00
Kognise
be7c578056
Update todos 2019-04-06 20:05:54 -04:00
Kognise
2691918e0a
Merge pull request #11 from gavinhenderson/patch-1
Added table styles
2019-04-06 19:50:11 -04:00
Kognise
d32ee2db26
Merge pull request #12 from 0xflotus/patch-1
fixed contribute
2019-04-06 19:18:52 -04:00
0xflotus
a197e097d1
fixed contribute 2019-04-07 01:14:01 +02:00
Kognise
d2f8e02391
Update todos 2019-04-06 19:13:12 -04:00
Kognise
1a9cd3ee41
Make tables bigger 2019-04-06 19:11:48 -04:00
Kognise
98aa9f3579
Misc. formatting update 2019-04-06 19:10:19 -04:00
Kognise
a5523307cd
Add table to demo 2019-04-06 19:09:47 -04:00
Gavin Henderson
1031ba1762 Added build and fixed missing bracket 2019-04-07 00:06:20 +01:00
Gavin Henderson
6d0444fe00
Added table styles
Table styles added as #5
2019-04-07 00:02:47 +01:00
81 changed files with 10298 additions and 1255 deletions

8
.changeset/README.md Normal file
View file

@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

9
.changeset/config.json Normal file
View file

@ -0,0 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.1.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch"
}

View file

@ -0,0 +1,5 @@
---
"water.css": patch
---
Added a theme toggle button to the bookmarklet

13
.editorconfig Normal file
View file

@ -0,0 +1,13 @@
root = true
[*]
quote_type = single
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
[*.md]
indent_size = 4

37
.eslintrc.json Normal file
View file

@ -0,0 +1,37 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"standard"
],
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"html",
"markdown",
"prefer-arrow"
],
"overrides": [
{
"files": [ "**/*.md" ],
"processor": "markdown/markdown"
}
],
"rules": {
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"func-style": ["error", "expression"],
"arrow-parens": ["error", "always"]
}
}

76
.github/CODE_OF_CONDUCT.md vendored Normal file
View file

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at hi@kognise.dev. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

169
.github/CONTRIBUTING.md vendored Executable file
View file

@ -0,0 +1,169 @@
# Contributing to Water.css
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.
Before contributing, please read the [code of conduct](CODE_OF_CONDUCT.md). Also, you agree that your contributions will be licensed under this project's [MIT License](../LICENSE.md).
## Overview
Please take a moment to read through the following guidelines:
- [Get started](#get-started)
- [Find issues to work on](#find-issues-to-work-on)
- [Add or change styles](#add-or-change-styles)
- [Create your pull request](#create-your-pull-request)
- [Project structure](#project-structure)
<br>
> **Quickstart**:
> 1. `yarn install` install dependencies
> 2. `yarn dev` start the dev server, make your changes
> 3. `yarn validate` make sure your changes pass all tests
> 4. `yarn changeset` describe your changes for the changelog
<br>
## Get started
1. Get a copy of the repository. It is recommended to [fork](https://github.com/kognise/water.css/fork) it first and clone to your machine using `git`.
2. Make sure that you have [yarn installed](https://classic.yarnpkg.com/en/docs/install/), then install dependencies by running:
```
yarn install
```
3. Start the development server with live reload:
```
yarn dev
```
4. Now you can visit [localhost:3000](http://localhost:3000) and start playing around with the framework when you make changes to Water.css, the site will reload automatically so you can see what changed.
*Note:* A script that builds distribution ready files is also available but it is not the part of development workflow. It is designed to be triggered automatically while publishing a new version of Water.css, but if you want to inspect the minified assets meant for production, you can run it manually: `yarn build`
> Alternatively, you can develop in Repl.it, a supercool in-browser IDE! Just click this button: [![Run on Repl.it](https://repl.it/badge/github/kognise/water.css)](https://repl.it/github/kognise/water.css)
## Find issues to work on
If you are new to contributing open-source software, you can start by picking any relevant issue that is [tagged with **`good first issue`**](
https://github.com/kognise/water.css/contribute).
Also, everyone is welcome to contribute on issues [tagged with **`help wanted`**, you can find it filtered here](https://github.com/kognise/water.css/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
## Add or change styles
There are a few rules for working in the Water.css source code:
1. The styles must not use any classes or IDs. Water.css is made entirely of basic style rules that only target HTML elements.
2. Don't specify colors directly in the source files (`src/parts/*`). Only use named variables there, which are declared in `src/variables-*.css`.
❌ Bad:
```css
color: #fff;
```
✔ Good:
```css
color: var(--text-bright);
```
3. Reuse existing colors where possible. Before introducing a new color to our palette, check if one of the existing colors fits your needs.
4. If you introduce a new variable, make sure to declare it both in `variables-dark.css` and `variables-light.css` so it's available in both themes. Also, add the new variable to the list of variables available for theming in the [README](../README.md#theming).
## Create your pull request
Once you're happy with your changes, you need to **commit** them, create a **changelog** and **submit a pull request**.
A few general rules of thumb about what makes a good pull request:
- Make sure that your pull request covers a small and well defined scope
- Make small commits with clear and explainful messages
- Provide a clear description about your contribution on GitHub
### Commit
When you commit code, Water.css will run some checks to make sure that your changes have no errors and match the project's coding style a process called [**Linting**](https://www.freecodecamp.org/news/what-is-linting-and-how-can-it-save-you-time). It will also verify that all **colors are accessible**, which means they need to have enough contrast to be easily readable.
If the code you introduced has errors or some of the colors aren't accessible, you'll see an error and the commit will abort.
You can check whether your changes pass all tests before committing them by running:
```
yarn validate
```
If there are errors, you can try to fix them automatically by running:
```
yarn lint
```
<details>
<summary> A note about puppeteer and WSL</summary>
<br>
<blockquote>
The accessibility checks use puppeteer, a tool that uses Chrome to render websites "headlessly", without a visible interface. In some environments like the <a href="https://aka.ms/wsl">Windows Subsystem for Linux</a>, you'll need to manually configure and run an X-Server in order for puppeteer to work.
</blockquote>
</details>
<br>
### Changelog
Now that your changes are commited, you'll need to **generate a changelog**:
We use a tool called [Changesets](https://github.com/atlassian/changesets) to keep track of what changes have been made between versions. Make sure to create a changelog before creating your pull request!
Just run this command for each change you made, and then answer a few questions:
```
yarn changeset
```
If you're not sure what kind of change you're making, pick "patch".
### Submit a Pull Request
Once your changes have been committed and you've created a changelog, you'll want to [submit a pull request](https://github.com/kognise/water.css/compare).
Be sure to provide a clear description of what your pull request includes. If your pull request will close an existing issue, make sure to write `Closes #[id]` in the pull request description, where `[id]` is replaced by the issue your pull request will close.
After submitting a pull request, it will need to be reviewed by a maintainer of the project before being merged. You may be asked to make some changes to your pull request.
After your change has been reviewed and merged, you can celebrate as the newest contributor to the Water.css project! 🎉
## Project structure
```
.
├── out
├── dist
└── docs
└── icons
└── src
├── assets
├── builds
└── parts
```
- **`out`** is ignored by git it contains built assets for distribution
- **`dist`** contains old assets, for backwards compatibility - ignore this
- **`docs`** contains the documentation and demo page
- **`docs/icons`** contains water.css favicons used in the documentation
- **`src`** contains all the source stylesheets grouped into folders and variables
- **`src/assets`** contains images/icons used for UI element styling
- **`src/builds`** contains entry files for the different versions water.css comes in: auto, dark and light
- **`src/parts`** contains the water.css source code organized in separate files by its kind, like "forms" or "typography"

9
.gitignore vendored
View file

@ -81,4 +81,11 @@ typings/
.fusebox/ .fusebox/
# DynamoDB Local files # DynamoDB Local files
.dynamodb/ .dynamodb/
# IntelliJ IDE
.idea/
# Output of yarn build
out/
dist/

5
.huskyrc.json Normal file
View file

@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "yarn validate"
}
}

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
*

6
.stylelintrc.json Normal file
View file

@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"no-descending-specificity": null
}
}

6
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint"
]
}

65
CHANGELOG.md Normal file
View file

@ -0,0 +1,65 @@
# Water.css
## 2.1.0
### Minor Changes
- 567d2ec: Add styles for <dialog> element
### Patch Changes
- ebb4e23: Add style for color input field
- 21e1e5d: Remove sourcemap references from built files
- c23d65c: Reduce input selector specificity for display property to prevent overriding user's css. Fixes #78 and #82
- 1f1168c: Added styling for Input type Reset
- 84b57fd: Update button colors for better contrast, especially in tables
- 2fff00c: Update main package entrypoint
- 881022a: Fix color of `<code>` and `<strong>` tags inside links
## 2.0.0
### Major Changes
- Published to npm
If you're using an old version of Water.css, you **must** see the README or you won't get new changes
- Added sourcemaps, autoprefixing, and minification
- Cleaned up the structure of sourcemap files
- Compatible with all major browsers including IE
- Added support for `prefers-color-scheme` to automatically set light and dark theme
- The default theme color is light mode
- Internet Explorer does not support this so the automatic version will always show up as light mode in IE
- If you want to force a color scheme, use `light.css`, or `dark.css`
* Added CSS variables to allow for changing theme colors at runtime instead of build time
IE does not support this either, but nothing should break because we provide fixed fallback colors. It is possible to compile your own theme if you must have custom colors in IE.
* Added [Code of Conduct](.github/CODE_OF_CONDUCT.md) and [Contribution Guide](.github/CONTRIBUTING.md)
* Restructured `.scss` file locations and variable names
* Added `height: auto` to `img` elements to keep aspect ratio
### Minor Changes
- Added radio and checkbox styles
- Added styles for prepending emojis to `href='mailto'`, `href='tel'`, and `href='sms'`
- `table` no longer has outer borders and `tr` elements use color striping for alternating backgorund colors
- Added `min-height` and respect `cols`/`rows` attributes on `textarea`
- Use `system-ui` font when available
- Added styles for `samp`, `time`, `var`, and `kbd` elements
- Added styling for `blockquote`, `q`, and `mark` elements
- Added print styles
- Custom scrollbar styles
- Added `cursor: not-allowed` to `select:disabled`, `button:disabled`, `textarea:disabled`
- Added styles for `::selection`
### Patch Changes
- Fixed padding, alignment, and colors on several elements
- Modified some colors to fix accessibility issues
- `table` elements no longer overflow
- Added linter and linted entire codebase
- Fixed `max-width` of `video` element to prevent overflowing

218
README.md
View file

@ -1,126 +1,152 @@
# Water.css <p align="center">
<a href="https://www.npmjs.com/package/water.css"><img align="center" src="https://img.shields.io/npm/v/water.css.svg" alt="NPM page"></a>
<a href="https://www.producthunt.com/posts/water-css"><img align="center" src="https://img.shields.io/badge/on-product%20hunt-blue.svg" alt="On Product Hunt"></a>
<a href="https://github.com/kognise/water.css/pulls"><img align="center" src="https://img.shields.io/github/contributors-anon/kognise/water.css" alt="Contributors"></a>
<a href="https://github.com/kognise/water.css/blob/master/LICENSE.md"><img align="center" src="https://img.shields.io/github/license/kognise/water.css.svg" alt="MIT license"></a>
</p>
[![Water.css](logo.svg)](https://kognise.github.io/water.css/) <br>
*A just-add-css collection of styles to make simple websites just a little nicer* <h1 align="center">Water.css</h1>
<p align="center">🌊 A drop-in collection of CSS styles to make simple websites just a little nicer</p>
[![On reddit](https://img.shields.io/badge/on-reddit-orange.svg)](https://www.reddit.com/r/webdev/comments/b9m6mv/watercss_a_collection_of_neat_styles_for_simple/) [![Water.css](assets/logo.svg)](https://watercss.kognise.dev/)
[![On product hunt](https://img.shields.io/badge/on-product%20hunt-red.svg)](https://www.producthunt.com/posts/water-css)
[![MIT license](https://img.shields.io/github/license/kognise/water.css.svg)](https://github.com/kognise/water.css/blob/master/LICENSE.md) <br>
## Goals ## Goals
- Responsive - Responsive
- Good code quality - Themeable
- Good browser support (works on my old kindle's browser :P) - Good browser support (works on my old kindle's browser :P)
- Small size (&lt; 2kb) - Tiny size
- Beautiful - Beautiful
- No classes - No classes
## Why? ## 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. 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. 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? ## 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 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.
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. 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? ## How?
Just stick this in your head: 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">`
<br>
A **preview** of the different themes is available [on the **demo page**](https://watercss.kognise.dev/#installation)! ⚡
#### 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`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/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](#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](#compiling-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](#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:
```html ```html
<link rel='stylesheet' href='https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.css'> <link rel="stylesheet" href="https://cdn.jsdelivr.net/water.css@2/out/water.min.css" />
<style>
:root {
--links: red;
}
</style>
``` ```
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](#theming) to make your own theme! If you want to change a value for dark or light mode only, use a media query like this:
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](https://github.com/kognise/water.css/releases). ```html
<style>
:root {
--links: blue; /* Always applied */
}
Oh, you want a demo you say? Cheeky fellah! @media (prefers-color-scheme: dark) {
:root {
--links: yellow; /* Only applied in dark mode (overrides blue) */
}
}
</style>
```
[Well, here's your demo.](https://kognise.github.io/water.css/) ### Compiling your own theme
Don't like how it looks? Feel free to submit an issue or PR with suggestions. 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](https://github.com/kognise/water.css/tree/master/.github/CONTRIBUTING.md) as it contains further information about the build setup.
## Contributing ## Contributing
Water.css becomes better for everyone when people like you help make it better! 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. Check out our [Contributing Guide](.github/CONTRIBUTING.md) to learn how to get started.
And thanks for taking the time to contribute! :)
If you decide to cotnribute, 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`
### 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.
```scss
$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!**
```scss
$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
- [Tables](https://github.com/kognise/water.css/issues/5)
- Blockquotes
- Add a screenshot
- Jekyll theme

55
accessibility.js Normal file
View file

@ -0,0 +1,55 @@
const pa11y = require('pa11y')
const chalk = require('chalk')
const puppeteer = require('puppeteer')
const check = async (browser, theme) => {
console.log(chalk`{bold Checking {blue ${theme}} theme...}`)
const page = await browser.newPage()
page.emulateMediaFeatures([
{ name: 'prefers-color-scheme', value: theme }
])
const results = await pa11y('./out/docs/index.html', {
ignore: [
'WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2' // Ignore "this form does not contain a submit button"
],
browser,
page
})
if (results.issues.length === 0) {
await page.close()
console.log(chalk`{green No issues found!}`)
return false
}
for (const issue of results.issues) {
console.log()
console.log(chalk`{red Error:} ${issue.message}`)
console.log(chalk`{gray -> ${issue.code}}`)
console.log(chalk`{gray -> ${issue.selector}}`)
console.log(chalk`{gray -> ${issue.context}}`)
}
await page.close()
return true
}
const go = async () => {
try {
const browser = await puppeteer.launch()
const lightResult = await check(browser, 'light')
console.log()
const darkResult = await check(browser, 'dark')
await browser.close()
if (lightResult || darkResult) process.exit(1)
} catch (error) {
console.log()
console.log(chalk`{red An unexpected error occured!} ${error.message}`)
}
}
go()

1
assets/icon-dark.svg Executable file
View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 445 445" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><rect id="Icon-Dark" serif:id="Icon Dark" x="0" y="0" width="444.1" height="444.1" style="fill:none;"/><path d="M444.1,222.05c0,-122.553 -99.497,-222.05 -222.05,-222.05c-122.553,0 -222.05,99.497 -222.05,222.05c0,122.553 99.497,222.05 222.05,222.05c122.553,0 222.05,-99.497 222.05,-222.05Z" style="fill:#202b38;"/><clipPath id="_clip1"><path d="M444.1,222.05c0,-122.553 -99.497,-222.05 -222.05,-222.05c-122.553,0 -222.05,99.497 -222.05,222.05c0,122.553 99.497,222.05 222.05,222.05c122.553,0 222.05,-99.497 222.05,-222.05Z"/></clipPath><g clip-path="url(#_clip1)"><path d="M911.401,444.1l-952.033,0l-1013.41,0c-60.994,-158.567 -78.355,-238.341 -52.081,-239.322c55.598,8.234 81.973,34.191 139.482,112.049c29.194,35.605 69.345,20.109 94.465,-2.512c17.584,-16.734 27.073,-50.366 48.844,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.675,26.667 78.568,27.352c28.888,-4.186 35.586,-8.373 46.89,-15.909c20.235,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.036,-6.54 92.613,58.359c27.593,50.861 80.763,49.186 123.466,44.999c42.704,-7.117 48.121,-21.878 79.52,-56.417c21.98,-33.912 66.612,-40.42 88.173,-36.792c0.085,0.016 0.171,0.031 0.257,0.046c0.23,-0.021 0.464,-0.037 0.702,-0.046c6.914,1.024 13.376,2.322 19.492,3.971c14.176,3.459 31.042,9.841 47.556,24.318c21.383,17.24 42.766,43.593 72.434,83.76c29.194,35.605 69.345,20.109 94.465,-2.512c17.584,-16.734 27.073,-50.366 48.844,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.676,26.667 78.568,27.352c28.888,-4.186 35.586,-8.373 46.89,-15.909c20.235,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.036,-6.54 92.613,58.359c27.593,50.861 80.763,49.186 123.466,44.999c42.704,-7.117 48.121,-21.878 79.521,-56.417c21.979,-33.912 66.611,-40.42 88.172,-36.792c0.031,0.006 0.062,0.012 0.094,0.017c0.11,-0.007 0.22,-0.012 0.332,-0.017c4.97,0.737 9.708,1.614 14.244,2.667c16.717,3.443 38.298,10.313 58.806,30.72c19.45,17.188 39.536,42.249 66.432,78.662c29.194,35.605 69.346,20.109 94.466,-2.512c17.583,-16.734 27.073,-50.366 48.843,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.676,26.667 78.568,27.352c28.888,-4.186 35.587,-8.373 46.89,-15.909c20.236,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.037,-6.54 92.613,58.359c27.594,50.861 80.763,49.186 123.467,44.999c42.703,-7.117 48.12,-21.878 79.52,-56.417c21.979,-33.912 66.611,-40.42 88.172,-36.792c21.617,3.861 62.105,8.005 93.951,59.562c7.404,11.987 14.341,26.536 20.465,44.241l0,135.519l-951.5,0Z" style="fill:#41adff;fill-rule:nonzero;"/></g></svg>

After

Width:  |  Height:  |  Size: 3 KiB

1
assets/icon-light.svg Executable file
View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 445 445" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><rect id="Icon-Light" serif:id="Icon Light" x="0" y="0" width="444.1" height="444.1" style="fill:none;"/><path d="M444.1,222.05c0,-122.553 -99.497,-222.05 -222.05,-222.05c-122.553,0 -222.05,99.497 -222.05,222.05c0,122.553 99.497,222.05 222.05,222.05c122.553,0 222.05,-99.497 222.05,-222.05Z" style="fill:#efefef;"/><clipPath id="_clip1"><path d="M444.1,222.05c0,-122.553 -99.497,-222.05 -222.05,-222.05c-122.553,0 -222.05,99.497 -222.05,222.05c0,122.553 99.497,222.05 222.05,222.05c122.553,0 222.05,-99.497 222.05,-222.05Z"/></clipPath><g clip-path="url(#_clip1)"><path d="M911.401,444.1l-952.033,0l-1013.41,0c-60.994,-158.567 -78.355,-238.341 -52.081,-239.322c55.598,8.234 81.973,34.191 139.482,112.049c29.194,35.605 69.345,20.109 94.465,-2.512c17.584,-16.734 27.073,-50.366 48.844,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.675,26.667 78.568,27.352c28.888,-4.186 35.586,-8.373 46.89,-15.909c20.235,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.036,-6.54 92.613,58.359c27.593,50.861 80.763,49.186 123.466,44.999c42.704,-7.117 48.121,-21.878 79.52,-56.417c21.98,-33.912 66.612,-40.42 88.173,-36.792c0.085,0.016 0.171,0.031 0.257,0.046c0.23,-0.021 0.464,-0.037 0.702,-0.046c6.914,1.024 13.376,2.322 19.492,3.971c14.176,3.459 31.042,9.841 47.556,24.318c21.383,17.24 42.766,43.593 72.434,83.76c29.194,35.605 69.345,20.109 94.465,-2.512c17.584,-16.734 27.073,-50.366 48.844,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.676,26.667 78.568,27.352c28.888,-4.186 35.586,-8.373 46.89,-15.909c20.235,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.036,-6.54 92.613,58.359c27.593,50.861 80.763,49.186 123.466,44.999c42.704,-7.117 48.121,-21.878 79.521,-56.417c21.979,-33.912 66.611,-40.42 88.172,-36.792c0.031,0.006 0.062,0.012 0.094,0.017c0.11,-0.007 0.22,-0.012 0.332,-0.017c4.97,0.737 9.708,1.614 14.244,2.667c16.717,3.443 38.298,10.313 58.806,30.72c19.45,17.188 39.536,42.249 66.432,78.662c29.194,35.605 69.346,20.109 94.466,-2.512c17.583,-16.734 27.073,-50.366 48.843,-49.975c24.561,-0.391 43.233,18.645 54.02,38.532c21.212,25.119 58.676,26.667 78.568,27.352c28.888,-4.186 35.587,-8.373 46.89,-15.909c20.236,-18.142 25.957,-28.887 36.525,-62.596c19.03,-45.672 40.059,-54.509 68.508,-57.09c17.52,-0.234 67.037,-6.54 92.613,58.359c27.594,50.861 80.763,49.186 123.467,44.999c42.703,-7.117 48.12,-21.878 79.52,-56.417c21.979,-33.912 66.611,-40.42 88.172,-36.792c21.617,3.861 62.105,8.005 93.951,59.562c7.404,11.987 14.341,26.536 20.465,44.241l0,135.519l-951.5,0Z" style="fill:#41adff;fill-rule:nonzero;"/></g></svg>

After

Width:  |  Height:  |  Size: 3 KiB

BIN
assets/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

1
assets/logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

59
bookmarklet/original.js Normal file
View file

@ -0,0 +1,59 @@
// Water.css Bookmarklet
// ---------------------
const $$ = (selector) => document.querySelectorAll(selector)
const createElement = (tagName, properties) => Object.assign(document.createElement(tagName), properties)
// Remove all CSS stylesheets, external and internal
$$('link[rel="stylesheet"],style').forEach((el) => el.remove())
// Remove all inline styles
$$('*').forEach((el) => (el.style = ''))
const linkElm = createElement('link', {
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/npm/water.css@2/out/light.css'
})
// Add water.css and responsive viewport (if necessary)
document.head.append(
linkElm,
!$$('meta[name="viewport"]').length && createElement('meta', {
name: 'viewport',
content: 'width=device-width,initial-scale=1.0'
})
)
// Theme switching icons
const moonSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>'
const sunSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>'
// Theme toggling logic
const toggleBtn = createElement('button', {
innerHTML: sunSVG,
ariaLabel: 'Switch theme',
style: `
position: fixed;
top: 50px;
right: 50px;
margin: 0;
padding: 10px;
line-height: 1;
`
})
let theme = 'light'
const toggleTheme = () => {
if (theme === 'light') {
theme = 'dark'
toggleBtn.innerHTML = moonSVG
linkElm.href = 'https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css'
} else {
theme = 'light'
linkElm.href = 'https://cdn.jsdelivr.net/npm/water.css@2/out/light.css'
toggleBtn.innerHTML = sunSVG
}
}
toggleBtn.addEventListener('click', toggleTheme)
document.body.append(toggleBtn)

75
dev.js
View file

@ -1,75 +0,0 @@
const express = require('express')
const app = express()
const http = require('http').Server(app)
const io = require('socket.io')(http)
const fs = require('fs-extra')
const chokidar = require('chokidar')
const sass = require('node-sass')
const script = `
const socket = io()
socket.on('reload', () => location.reload())
`
app.get('/', async (req, res) => {
console.log('> Serving index')
const html = await fs.readFile('index.html')
const injected = html.toString().replace('</body>', `<script src='/socket.io/socket.io.js'></script><script>${script}</script></body>`)
res.send(injected)
})
app.get('/script.js', async (req, res) => {
console.log('> Serving script')
const script = await fs.readFile('script.js')
res.contentType('javascript')
res.send(script)
})
app.use('/dist', (req, res, next) => {
console.log('> Serving a stylesheet')
next()
}, express.static('dist'))
function reload() {
console.log('> Reloading')
io.emit('reload')
}
chokidar.watch('index.html', { ignoreInitial: true }).on('all', () => {
console.log('> Index changed')
reload()
})
chokidar.watch('script.js', { ignoreInitial: true }).on('all', () => {
console.log('> Script changed')
reload()
})
function buildSass(file) {
sass.render({ file, outputStyle: 'compressed' }, async (errors, result) => {
if (errors) {
console.log('> Sass errors!')
console.log(errors)
return
}
const outFile = file.replace('src', 'dist').replace('.scss', '.css')
await fs.outputFile(outFile, result.css)
reload()
})
}
chokidar.watch('src/*.scss', { ignoreInitial: true }).on('all', (event, file) => {
console.log('> Stylesheet changed')
buildSass(file)
})
chokidar.watch('src/parts/*.scss', { ignoreInitial: true }).on('all', async () => {
console.log('> Stylesheet part changed')
const src = await fs.readdir('src')
const files = src.filter(file => file !== 'parts').map(file => `src/${file}`)
for (let file of files) {
buildSass(file)
}
})
http.listen(3000, () => console.log('> Ready at http://localhost:3000/'))

7
dist/README.md vendored Normal file
View file

@ -0,0 +1,7 @@
# About This Directory
This `dist/` directory is here to maintain backwards compatibility with sites that use the pre-2.0 version of Water.css.
We used to encourage linking to this directory instead of the version on NPM (since it didn't exist) so this exists to avoid breaking anything.
If you're still using a version from this directory please see the README to update. If you're a contributor, ignore this - **you're probably looking for `out/`**.

242
dist/dark.css vendored
View file

@ -1 +1,241 @@
body{font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#dbdbdb;background:#202b38;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#fff}h1,h2,h3,h4,h5,h6,b,strong,th{font-weight:600}button,input[type='submit'],input[type='button'],input[type='checkbox']{cursor:pointer}input:not([type='checkbox']),select{display:block}input,select,button,textarea{color:#fff;background-color:#161f27;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}input:not([type='checkbox']),select,button,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type='submit'],input[type='button']{padding-right:30px;padding-left:30px}button:hover,input[type='submit']:hover,input[type='button']:hover{background:#324759}input:focus,select:focus,button:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,0.670588)}input[type='checkbox']:active,input[type='submit']:active,input[type='button']:active,button:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::placeholder{color:#a9a9a9}a{text-decoration:none;color:#41adff}a:hover{text-decoration:underline}code,kbd{background:#161f27;color:#ffbe85;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb} @charset "UTF-8";
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
color: #dbdbdb;
background: #202b38;
text-rendering: optimizeLegibility;
}
button, input, textarea {
transition: background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, box-shadow 0.1s linear, transform 0.1s ease;
}
h1 {
font-size: 2.2em;
margin-top: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 12px;
}
h1,
h2,
h3,
h4,
h5,
h6,
strong {
color: #ffffff;
}
h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th {
font-weight: 600;
}
blockquote {
border-left: 4px solid #0096bfab;
margin: 1.5em 0em;
padding: 0.5em 1em;
font-style: italic;
}
blockquote > footer {
margin-top: 10px;
font-style: normal;
}
blockquote cite {
font-style: normal;
}
address {
font-style: normal;
}
a[href^='mailto']::before {
content: '📧 ';
}
a[href^='tel']::before {
content: '📞 ';
}
a[href^='sms']::before {
content: '💬 ';
}
button,
input[type='submit'],
input[type='button'],
input[type='checkbox'] {
cursor: pointer;
}
input:not([type='checkbox']):not([type='radio']),
select {
display: block;
}
input, select, button, textarea {
color: #ffffff;
background-color: #161f27;
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
}
input:not([type='checkbox']):not([type='radio']),
select, button, textarea {
-webkit-appearance: none;
}
textarea {
margin-right: 0;
width: 100%;
box-sizing: border-box;
resize: vertical;
}
button, input[type='submit'], input[type='button'] {
padding-right: 30px;
padding-left: 30px;
}
button:hover,
input[type='submit']:hover,
input[type='button']:hover {
background: #324759;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
box-shadow: 0 0 0 2px #0096bfab;
}
input[type='checkbox']:active,
input[type='radio']:active,
input[type='submit']:active,
input[type='button']:active,
button:active {
transform: translateY(2px);
}
input:disabled,
select:disabled,
button:disabled,
textarea:disabled {
cursor: not-allowed;
opacity: .5;
}
::-webkit-input-placeholder {
color: #a9a9a9;
}
:-ms-input-placeholder {
color: #a9a9a9;
}
::-ms-input-placeholder {
color: #a9a9a9;
}
::placeholder {
color: #a9a9a9;
}
a {
text-decoration: none;
color: #41adff;
}
a:hover {
text-decoration: underline;
}
code, kbd {
background: #161f27;
color: #ffbe85;
padding: 5px;
border-radius: 6px;
}
pre > code {
padding: 10px;
display: block;
overflow-x: auto;
}
img {
max-width: 100%;
}
hr {
border: none;
border-top: 1px solid #dbdbdb;
}
table {
border-collapse: collapse;
margin-bottom: 10px;
width: 100%;
}
td, th {
padding: 6px;
text-align: left;
}
th {
border-bottom: 1px solid #dbdbdb;
}
tbody tr:nth-child(even) {
background-color: #161f27;
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
}
::-webkit-scrollbar-track {
background: #161f27;
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background: #324759;
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: #415c73;
}
/*# sourceMappingURL=dark.css.map */

1
dist/dark.css.map vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/dark.min.css vendored Normal file
View file

@ -0,0 +1,2 @@
@charset "UTF-8";body{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#dbdbdb;background:#202b38;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#fff}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}blockquote{border-left:4px solid rgba(0,150,191,.67);margin:1.5em 0;padding:.5em 1em;font-style:italic}blockquote>footer{margin-top:10px;font-style:normal}address,blockquote cite{font-style:normal}a[href^=mailto]:before{content:"📧 "}a[href^=tel]:before{content:"📞 "}a[href^=sms]:before{content:"💬 "}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]):not([type=radio]),select{display:block}button,input,select,textarea{color:#fff;background-color:#161f27;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]):not([type=radio]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#324759}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=radio]:active,input[type=submit]:active{transform:translateY(2px)}button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.5}::-webkit-input-placeholder{color:#a9a9a9}:-ms-input-placeholder{color:#a9a9a9}::-ms-input-placeholder{color:#a9a9a9}::placeholder{color:#a9a9a9}a{text-decoration:none;color:#41adff}a:hover{text-decoration:underline}code,kbd{background:#161f27;color:#ffbe85;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px;text-align:left}th{border-bottom:1px solid #dbdbdb}tbody tr:nth-child(2n){background-color:#161f27}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:#161f27;border-radius:6px}::-webkit-scrollbar-thumb{background:#324759;border-radius:6px}::-webkit-scrollbar-thumb:hover{background:#415c73}
/*# sourceMappingURL=dark.min.css.map */

1
dist/dark.min.css.map vendored Normal file

File diff suppressed because one or more lines are too long

242
dist/light.css vendored
View file

@ -1 +1,241 @@
body{font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#363636;background:#fff;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#000}h1,h2,h3,h4,h5,h6,b,strong,th{font-weight:600}button,input[type='submit'],input[type='button'],input[type='checkbox']{cursor:pointer}input:not([type='checkbox']),select{display:block}input,select,button,textarea{color:#000;background-color:#efefef;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}input:not([type='checkbox']),select,button,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type='submit'],input[type='button']{padding-right:30px;padding-left:30px}button:hover,input[type='submit']:hover,input[type='button']:hover{background:#ddd}input:focus,select:focus,button:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,0.670588)}input[type='checkbox']:active,input[type='submit']:active,input[type='button']:active,button:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::placeholder{color:#949494}a{text-decoration:none;color:#0076d1}a:hover{text-decoration:underline}code,kbd{background:#efefef;color:#000;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb} @charset "UTF-8";
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
color: #363636;
background: #ffffff;
text-rendering: optimizeLegibility;
}
button, input, textarea {
transition: background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, box-shadow 0.1s linear, transform 0.1s ease;
}
h1 {
font-size: 2.2em;
margin-top: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 12px;
}
h1,
h2,
h3,
h4,
h5,
h6,
strong {
color: #000000;
}
h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th {
font-weight: 600;
}
blockquote {
border-left: 4px solid #0096bfab;
margin: 1.5em 0em;
padding: 0.5em 1em;
font-style: italic;
}
blockquote > footer {
margin-top: 10px;
font-style: normal;
}
blockquote cite {
font-style: normal;
}
address {
font-style: normal;
}
a[href^='mailto']::before {
content: '📧 ';
}
a[href^='tel']::before {
content: '📞 ';
}
a[href^='sms']::before {
content: '💬 ';
}
button,
input[type='submit'],
input[type='button'],
input[type='checkbox'] {
cursor: pointer;
}
input:not([type='checkbox']):not([type='radio']),
select {
display: block;
}
input, select, button, textarea {
color: #000000;
background-color: #efefef;
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
}
input:not([type='checkbox']):not([type='radio']),
select, button, textarea {
-webkit-appearance: none;
}
textarea {
margin-right: 0;
width: 100%;
box-sizing: border-box;
resize: vertical;
}
button, input[type='submit'], input[type='button'] {
padding-right: 30px;
padding-left: 30px;
}
button:hover,
input[type='submit']:hover,
input[type='button']:hover {
background: #dddddd;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
box-shadow: 0 0 0 2px #0096bfab;
}
input[type='checkbox']:active,
input[type='radio']:active,
input[type='submit']:active,
input[type='button']:active,
button:active {
transform: translateY(2px);
}
input:disabled,
select:disabled,
button:disabled,
textarea:disabled {
cursor: not-allowed;
opacity: .5;
}
::-webkit-input-placeholder {
color: #949494;
}
:-ms-input-placeholder {
color: #949494;
}
::-ms-input-placeholder {
color: #949494;
}
::placeholder {
color: #949494;
}
a {
text-decoration: none;
color: #0076d1;
}
a:hover {
text-decoration: underline;
}
code, kbd {
background: #efefef;
color: #000000;
padding: 5px;
border-radius: 6px;
}
pre > code {
padding: 10px;
display: block;
overflow-x: auto;
}
img {
max-width: 100%;
}
hr {
border: none;
border-top: 1px solid #dbdbdb;
}
table {
border-collapse: collapse;
margin-bottom: 10px;
width: 100%;
}
td, th {
padding: 6px;
text-align: left;
}
th {
border-bottom: 1px solid #dbdbdb;
}
tbody tr:nth-child(even) {
background-color: #efefef;
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
}
::-webkit-scrollbar-track {
background: #efefef;
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background: #d5d5d5;
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: #c4c4c4;
}
/*# sourceMappingURL=light.css.map */

1
dist/light.css.map vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/light.min.css vendored Normal file
View file

@ -0,0 +1,2 @@
@charset "UTF-8";body{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#363636;background:#fff;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#000}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}blockquote{border-left:4px solid rgba(0,150,191,.67);margin:1.5em 0;padding:.5em 1em;font-style:italic}blockquote>footer{margin-top:10px;font-style:normal}address,blockquote cite{font-style:normal}a[href^=mailto]:before{content:"📧 "}a[href^=tel]:before{content:"📞 "}a[href^=sms]:before{content:"💬 "}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]):not([type=radio]),select{display:block}button,input,select,textarea{color:#000;background-color:#efefef;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]):not([type=radio]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#ddd}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=radio]:active,input[type=submit]:active{transform:translateY(2px)}button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.5}::-webkit-input-placeholder{color:#949494}:-ms-input-placeholder{color:#949494}::-ms-input-placeholder{color:#949494}::placeholder{color:#949494}a{text-decoration:none;color:#0076d1}a:hover{text-decoration:underline}code,kbd{background:#efefef;color:#000;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px;text-align:left}th{border-bottom:1px solid #dbdbdb}tbody tr:nth-child(2n){background-color:#efefef}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:#efefef;border-radius:6px}::-webkit-scrollbar-thumb{background:#d5d5d5;border-radius:6px}::-webkit-scrollbar-thumb:hover{background:#c4c4c4}
/*# sourceMappingURL=light.min.css.map */

1
dist/light.min.css.map vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/icons/apple-touch-icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

12
docs/icons/browserconfig.xml Executable file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="./mstile-70x70.png"/>
<square150x150logo src="./mstile-150x150.png"/>
<square310x310logo src="./mstile-310x310.png"/>
<wide310x150logo src="./mstile-310x150.png"/>
<TileColor>#00aba9</TileColor>
</tile>
</msapplication>
</browserconfig>

BIN
docs/icons/favicon-16x16.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
docs/icons/favicon-32x32.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
docs/icons/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
docs/icons/light-favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/icons/mstile-150x150.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
docs/icons/mstile-310x150.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
docs/icons/mstile-310x310.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/icons/mstile-70x70.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -0,0 +1,22 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M2378 5115 c-2 -1 -30 -5 -63 -9 -33 -3 -71 -8 -85 -10 -14 -3 -61
-10 -105 -16 -239 -35 -599 -163 -835 -297 -479 -273 -886 -735 -1095 -1243
-52 -128 -115 -324 -129 -400 -2 -14 -7 -36 -10 -50 -44 -190 -65 -557 -44
-780 39 -410 195 -841 429 -1185 303 -446 735 -784 1239 -968 111 -41 310 -97
395 -111 226 -38 248 -40 480 -41 275 0 380 12 635 76 233 59 453 147 643 258
43 25 85 51 95 56 46 27 151 103 239 174 523 418 866 1043 940 1716 13 116 9
511 -6 600 -49 295 -96 465 -194 693 -194 456 -557 879 -982 1146 -152 96
-423 226 -520 250 -5 2 -18 6 -27 9 -37 14 -54 20 -83 27 -16 5 -73 20 -125
33 -174 47 -356 69 -582 72 -113 2 -208 2 -210 0z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

363
docs/index.html Normal file
View file

@ -0,0 +1,363 @@
<!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Water.css</title>
<link rel="canonical" href="https://watercss.kognise.dev/" />
<meta
name="description"
content="A drop-in collection of CSS styles to make simple websites like this just a little bit nicer."
/>
<link rel="apple-touch-icon" sizes="180x180" href="./icons/apple-touch-icon.png" />
<link rel="icon" id="icon-16" type="image/png" sizes="16x16" href="./icons/favicon-16x16.png" />
<link rel="icon" id="icon-32" type="image/png" sizes="32x32" href="./icons/favicon-32x32.png" />
<link rel="manifest" href="./site.webmanifest" />
<link rel="mask-icon" href="./icons/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="shortcut icon" id="icon-ico" href="./icons/favicon.ico" />
<meta name="apple-mobile-web-app-title" content="Water.css" />
<meta name="application-name" content="Water.css" />
<meta name="msapplication-TileColor" content="#00aba9" />
<meta name="msapplication-config" content="./icons/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
<!-- Startup styles of water.css, so styles don't have to wait until JS is loaded -->
<link rel="preload" as="style" href="./water.css/dark.min.css" />
<link rel="preload" as="style" href="./water.css/light.min.css" />
<link rel="stylesheet" id="js-startup-stylesheet" href="./water.css/water.min.css" />
<!-- Dynamic version of water.css, overwrites startup styles. JavaScript sets & updates href -->
<link rel="stylesheet" id="js-stylesheet" />
<!-- Custom styles for the documentation / version picker -->
<link rel="stylesheet" href="style.css" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://watercss.kognise.dev/" />
<meta property="og:title" content="Water.css" />
<meta
property="og:description"
content="A drop-in collection of CSS styles to make simple websites like this just a little bit nicer."
/>
<meta
property="og:image"
content="https://raw.githubusercontent.com/kognise/water.css/master/assets/logo.png"
/>
<meta property="og:image:width" content="1154" />
<meta property="og:image:height" content="444" />
<script type="application/ld+json">
{
"@context": "http://www.schema.org",
"@type": "WebSite",
"name": "Water.css",
"alternateName": "Water.css",
"url": "https://watercss.kognise.dev/"
}
</script>
<script>
// eslint-disable-next-line no-useless-escape
window.navigator.clipboard || document.write('<script src="https://unpkg.com/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.promise.js"><\/script>')
</script>
<!-- Use bright favicons when the browser is in dark mode. -->
<script type="module">
import faviconSwitcher from 'https://unpkg.com/favicon-mode-switcher@1.0.4/dist/index.min.mjs'
faviconSwitcher([
{ element: '#icon-ico', href: { dark: './icons/light-favicon.ico' } },
{ element: '#icon-16', href: { dark: './icons/light-favicon-16x16.png' } },
{ element: '#icon-32', href: { dark: './icons/light-favicon-32x32.png' } }
])
</script>
</head>
<body>
<h1>Water.css</h1>
<p>
Water.css is a drop-in collection of CSS styles to make simple websites like this just a
little bit nicer.
</p>
<p>
Now you can write your simple static site with nice semantic html, and Water.css will manage
the styling for you.
</p>
<div class="row">
<div>
<a href="#installation"><b>Get it already!</b></a>
<br />
<a href="https://github.com/kognise/water.css"><b>GitHub</b></a>
</div>
<a
href="https://www.producthunt.com/posts/water-css?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-water-css"
target="_blank"
rel="noopener"
>
<img
id="product-hunt"
src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=150490&theme=dark&period=daily"
alt="Water.css - Make your tiny website just a little nicer | Product Hunt Embed"
style="width: 250px; height: 54px;"
width="250px"
height="54px"
/>
</a>
</div>
<h2>Installation</h2>
<div id="installation">
<header class="row">
<h3 id="link-snippet-headline">
Paste this into the <code>&lt;head&gt;</code> of your HTML:
</h3>
<button type="button" id="copy-button">
<span id="copy-button-feedback"></span>
Copy to clipboard
</button>
</header>
<div id="link-snippet-container">
<pre id="link-snippet-auto"><code>&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"></code></pre>
<pre hidden id="link-snippet-dark"><code>&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css"></code></pre>
<pre hidden id="link-snippet-light"><code>&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/light.css"></code></pre>
</div>
<h3>Options</h3>
<form id="theme-form">
<input type="radio" value="auto" checked name="theme" id="theme-auto" />
<label for="theme-auto">Automatic 🌙 / ☀</label>
<input type="radio" value="dark" name="theme" id="theme-dark" />
<label for="theme-dark">Dark theme 🌙</label>
<input type="radio" value="light" name="theme" id="theme-light" />
<label for="theme-light">Light theme ☀</label>
</form>
<table id="version-info">
<caption>
<h3>Version info</h3>
</caption>
<tbody>
<tr>
<th scope="row">File</th>
<td id="table-file-name"></td>
</tr>
<tr>
<th scope="row">Size (min + gzip)</th>
<td id="table-file-size"></td>
</tr>
<tr>
<th scope="row">Theme</th>
<td id="table-theme"></td>
</tr>
</tbody>
</table>
</div>
<h2 id="goals">Goals</h2>
<ul>
<li>Responsive</li>
<li>Good code quality</li>
<li>Good browser support</li>
<li>Small size (&lt; 2kb)</li>
<li>Beautiful</li>
<li>No classes</li>
</ul>
<h2 id="responsive">Is it responsive?</h2>
<p>
<strong>Heck yeah!</strong> It doesn't include any fancy styles so it's easily mobile
responsive. Just add the famous
<a href="https://www.w3schools.com/css/css_rwd_viewport.asp">responsive viewport tag</a> and
you'll be good to go!
</p>
<p>In fact, try resizing this page. Everything flows super nicely as you'll see.</p>
<h2 id="bookmarklet">Bookmarklet</h2>
<p>
A bookmarklet is a snippet of JavaScript that sits in your bookmarks bar.
</p>
<p>
The Waterize bookmarklet can be used to make ugly websites more readable by replacing the styles with Water.css. Just drag this link to your bookmarks bar:
</p>
<strong>
<a href="javascript:(function()%7B%2F%2F%20Water.css%20Bookmarklet%0A%2F%2F%20---------------------%0A%0Aconst%20%24%24%20%3D%20(selector)%20%3D%3E%20document.querySelectorAll(selector)%0Aconst%20createElement%20%3D%20(tagName%2C%20properties)%20%3D%3E%20Object.assign(document.createElement(tagName)%2C%20properties)%0A%0A%2F%2F%20Remove%20all%20CSS%20stylesheets%2C%20external%20and%20internal%0A%24%24('link%5Brel%3D%22stylesheet%22%5D%2Cstyle').forEach((el)%20%3D%3E%20el.remove())%0A%0A%2F%2F%20Remove%20all%20inline%20styles%0A%24%24('*').forEach((el)%20%3D%3E%20(el.style%20%3D%20''))%0A%0Aconst%20linkElm%20%3D%20createElement('link'%2C%20%7B%0A%20%20rel%3A%20'stylesheet'%2C%0A%20%20href%3A%20'https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fwater.css%402%2Fout%2Flight.css'%0A%7D)%0A%0A%2F%2F%20Add%20water.css%20and%20responsive%20viewport%20(if%20necessary)%0Adocument.head.append(%0A%20%20linkElm%2C%0A%20%20!%24%24('meta%5Bname%3D%22viewport%22%5D').length%20%26%26%20createElement('meta'%2C%20%7B%0A%20%20%20%20name%3A%20'viewport'%2C%0A%20%20%20%20content%3A%20'width%3Ddevice-width%2Cinitial-scale%3D1.0'%0A%20%20%7D)%0A)%0A%0A%2F%2F%20Theme%20switching%20icons%0Aconst%20moonSVG%20%3D%20'%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-moon%22%3E%3Cpath%20d%3D%22M21%2012.79A9%209%200%201%201%2011.21%203%207%207%200%200%200%2021%2012.79z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E'%0Aconst%20sunSVG%20%3D%20'%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-sun%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%225%22%3E%3C%2Fcircle%3E%3Cline%20x1%3D%2212%22%20y1%3D%221%22%20x2%3D%2212%22%20y2%3D%223%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2212%22%20y1%3D%2221%22%20x2%3D%2212%22%20y2%3D%2223%22%3E%3C%2Fline%3E%3Cline%20x1%3D%224.22%22%20y1%3D%224.22%22%20x2%3D%225.64%22%20y2%3D%225.64%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2218.36%22%20y1%3D%2218.36%22%20x2%3D%2219.78%22%20y2%3D%2219.78%22%3E%3C%2Fline%3E%3Cline%20x1%3D%221%22%20y1%3D%2212%22%20x2%3D%223%22%20y2%3D%2212%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2221%22%20y1%3D%2212%22%20x2%3D%2223%22%20y2%3D%2212%22%3E%3C%2Fline%3E%3Cline%20x1%3D%224.22%22%20y1%3D%2219.78%22%20x2%3D%225.64%22%20y2%3D%2218.36%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2218.36%22%20y1%3D%225.64%22%20x2%3D%2219.78%22%20y2%3D%224.22%22%3E%3C%2Fline%3E%3C%2Fsvg%3E'%0A%0A%2F%2F%20Theme%20toggling%20logic%0Aconst%20toggleBtn%20%3D%20createElement('button'%2C%20%7B%0A%20%20innerHTML%3A%20sunSVG%2C%0A%20%20ariaLabel%3A%20'Switch%20theme'%2C%0A%20%20style%3A%20%60%0A%20%20%20%20position%3A%20fixed%3B%0A%20%20%20%20top%3A%2050px%3B%0A%20%20%20%20right%3A%2050px%3B%0A%20%20%20%20margin%3A%200%3B%0A%20%20%20%20padding%3A%2010px%3B%0A%20%20%20%20line-height%3A%201%3B%0A%20%20%60%0A%7D)%0A%0Alet%20theme%20%3D%20'light'%0Aconst%20toggleTheme%20%3D%20()%20%3D%3E%20%7B%0A%20%20if%20(theme%20%3D%3D%3D%20'light')%20%7B%0A%20%20%20%20theme%20%3D%20'dark'%0A%20%20%20%20toggleBtn.innerHTML%20%3D%20moonSVG%0A%20%20%20%20linkElm.href%20%3D%20'https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fwater.css%402%2Fout%2Fdark.css'%0A%20%20%7D%20else%20%7B%0A%20%20%20%20theme%20%3D%20'light'%0A%20%20%20%20linkElm.href%20%3D%20'https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fwater.css%402%2Fout%2Flight.css'%0A%20%20%20%20toggleBtn.innerHTML%20%3D%20sunSVG%0A%20%20%7D%0A%7D%0A%0AtoggleBtn.addEventListener('click'%2C%20toggleTheme)%0Adocument.body.append(toggleBtn)%7D)()%3B">
Waterize
</a>
</strong>
<h2 id="demo">Element demos</h2>
<p>This is supposed to be a demo page so we need more elements!</p>
<h3 id="form-elements">Form elements</h3>
<form>
<label for="email">Email</label>
<input type="email" name="email" id="email" placeholder="john.doe@gmail.com" />
<label for="id">User id (read only)</label>
<input readonly name="id" id="id" value="04D6H89Z" />
<label for="disabled">Random disabled input</label>
<input disabled name="disabled" id="disabled" placeholder="Because why not?" />
<label for="about">About me</label>
<textarea name="about" id="about" placeholder="I am a textarea..."></textarea>
<label>Choose a Doe:</label>
<div>
<input type="radio" id="john" name="drone" value="john" checked />
<label for="john">John Doe</label>
</div>
<div>
<input type="radio" id="jane" name="drone" value="jane" checked />
<label for="jane">Jane Doe</label>
</div>
<div>
<input type="radio" id="johnny" name="drone" value="johnny" checked />
<label for="johnny">Johnny Doe</label>
</div>
<br />
<input type="checkbox" name="remember" id="remember" checked />
<label for="remember">Remember me</label>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</form>
<h3 id="code">Code</h3>
<p>
Below is some code, you can copy it with <kbd>Ctrl-C</kbd>. Did you know,
<code>alert(1)</code> can show an alert in JavaScript!
</p>
<pre><code>// This logs a message to the console and check out the scrollbar.<br>console.log('Hello, world!')</code></pre>
<h3 id="other">Other</h3>
<p>Here's a horizontal rule and image because I don't know where else to put them.</p>
<img src="https://placekitten.com/408/287" alt="Example kitten" />
<hr />
<p>And here's a nicely marked up table!</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Quantity</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Godzilla</td>
<td>2</td>
<td>$299.99</td>
</tr>
<tr>
<td>Mozilla</td>
<td>10</td>
<td>$100,000.00</td>
</tr>
<tr>
<td>Quesadilla</td>
<td>1</td>
<td>$2.22</td>
</tr>
</tbody>
</table>
<details>
<summary>Some summary/details can't hurt!</summary>
<p>Lorem ipsum dolor sit blah blah.</p>
</details>
<p>The dialog (form, and menu) tag</p>
<div>
<button type="button" id="dialog-trigger">
Show me the dialog!
</button>
<span id="dialog-result"></span>
</div>
<dialog id="dialog">
<header>This is a sample dialog</header>
<form method="dialog">
<p>What is your favorite pet animal?</p>
<menu>
<button value="feline">Cats</button>
<button value="canine">Dogs</button>
<button value="other">Others</button>
</menu>
</form>
</dialog>
<h3 id="typography">Typography</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dictum hendrerit velit, quis
ullamcorper sem congue ac. Quisque id magna rhoncus, sodales massa vel, vestibulum elit. Duis
ornare accumsan egestas. Proin maximus lacus interdum leo molestie convallis. Orci varius
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut iaculis risus eu
felis feugiat, eu mollis neque elementum. Donec interdum, nisl id dignissim iaculis, felis dui
aliquet dui, non fermentum velit lectus ac quam. Class aptent taciti sociosqu ad litora
torquent per conubia nostra, per inceptos himenaeos.
<strong>This is strong,</strong> this is normal, <b>this is just bold,</b>
<em>and this is emphasized!</em> And heck, <a href="/">here</a>'s a link.
</p>
<blockquote cite="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote">
"The HTML blockquote Element (or HTML Block Quotation Element) indicates that the enclosed
text is an extended quotation. Usually, this is rendered visually by indentation (see
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote#Usage_notes"
>Notes</a
>
for how to change it). A URL for the source of the quotation may be given using the
<code>cite</code> attribute, while a text representation of the source can be given using the
<code>&lt;cite&gt;</code> cite element."
<footer>
<cite>MDN, "The Block Quotation element"</cite>
</footer>
</blockquote>
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
<li>Unordered list item 3</li>
</ul>
<ol>
<li>Ordered list item 1</li>
<li>Ordered list item 2</li>
<li>Ordered list item 3</li>
</ol>
<p>Addresses are also styled to be <strong>awesome</strong>!</p>
<address>
<a href="mailto:john.doe@example.com">john.doe@example.com</a><br />
<a href="tel:778-330-2389">778-330-2389</a><br />
<a href="sms:666-666-6666">666-666-6666</a><br />
</address>
<br />
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<footer>
<a href="#">Back to top ⬆</a>
</footer>
<script src="script.js" defer></script>
</body>
</html>

88
docs/script.js Normal file
View file

@ -0,0 +1,88 @@
'use strict'
const localBase = './water.css/'
const fileSizes = {
dark: 2.57,
light: 2.55,
auto: 3.27
}
const themeForm = document.getElementById('theme-form')
const stylesheet = document.getElementById('js-stylesheet')
const startupStylesheet = document.getElementById('js-startup-stylesheet')
const productHunt = document.getElementById('product-hunt')
const copyButton = document.getElementById('copy-button')
const copyButtonFeedback = document.getElementById('copy-button-feedback')
const linkSnippets = [].slice.call(document.querySelectorAll('#link-snippet-container > pre'))
const table = {
fileName: document.getElementById('table-file-name'),
fileSize: document.getElementById('table-file-size'),
theme: document.getElementById('table-theme')
}
const prefersColorScheme = window.matchMedia('(prefers-color-scheme: light)')
const updateProductHunt = (theme) => {
theme = theme || (prefersColorScheme.matches ? 'light' : 'dark')
productHunt.src = `https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=150490&theme=${theme}&period=daily`
}
const updateTheme = () => {
const theme = themeForm.querySelector('input[name="theme"]:checked').value
const fileName = `${theme === 'auto' ? 'water' : theme}.min.css`
const localUrl = `${localBase}${fileName}`
stylesheet.href = localUrl
for (const snippet of linkSnippets) {
snippet.hidden = snippet.id.indexOf(theme) === -1
}
table.fileName.innerText = fileName
table.fileSize.innerText = `${fileSizes[theme].toFixed(2)} kb`
if (theme === 'auto') {
updateProductHunt()
table.theme.innerHTML = `
Respects user-defined theme settings using <a style="--links: var(--code)" href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme" target="_blank" rel="noopener"><code>prefers-color-scheme</code></a>.<br>
Light in browsers where the theme settings can't be detected.
`
} else {
updateProductHunt(theme)
table.theme.innerText = `Theme is forced to ${theme}.`
}
}
themeForm.addEventListener('change', updateTheme)
updateProductHunt()
prefersColorScheme.addListener(() => {
if (themeForm.theme.value !== 'auto') return
updateProductHunt()
})
updateTheme()
startupStylesheet.parentElement.removeChild(startupStylesheet)
copyButton.addEventListener('click', () => {
const clipboard = navigator.clipboard || window.clipboard
const theme = themeForm.querySelector('input[name="theme"]:checked').value
const snippetText = document.querySelector(`#link-snippet-${theme} code`).textContent
clipboard.writeText(snippetText)
.then(() => { copyButtonFeedback.textContent = '✔' })
.catch(() => { copyButtonFeedback.textContent = '❌' })
.then(() => setTimeout(() => { copyButtonFeedback.textContent = '' }, 1000))
})
document.getElementById('dialog-trigger').addEventListener('click', () => {
document.getElementById('dialog-result').innerText = ''
document.getElementById('dialog').showModal()
})
document.getElementById('dialog').addEventListener('close', (event) => {
document.getElementById('dialog-result').innerText = `Your answer: ${event.target.returnValue}`
})

20
docs/site.webmanifest Executable file
View file

@ -0,0 +1,20 @@
{
"name": "Water.css",
"short_name": "Water.css",
"start_url": "./",
"icons": [
{
"src": "./icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "./icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

65
docs/style.css Executable file
View file

@ -0,0 +1,65 @@
html {
scroll-behavior: smooth;
}
#product-hunt {
margin-top: 1rem;
}
#link-snippet-headline {
margin: 1rem 2.5rem 1rem 0;
}
/* Make the feedback Emoji appear next to the button */
#copy-button {
position: relative;
margin-right: 2px;
overflow: visible;
}
#copy-button-feedback {
position: absolute;
left: -2rem;
display: inline-block;
transform: scale(1.3);
}
#link-snippet-container {
overflow: hidden;
display: grid;
display: -ms-grid;
-ms-grid-columns: 1fr;
}
#link-snippet-container > pre {
overflow: auto;
grid-column: 1;
grid-row: 1;
transition: transform 220ms cubic-bezier(0.175, 0.885, 0.32, 1) 220ms;
}
#link-snippet-container > pre[hidden] {
display: block;
visibility: hidden;
transform: scale(0);
transition: transform 220ms cubic-bezier(0.175, 0.885, 0.32, 1), visibility 0ms 220ms;
}
#theme-form > label:not(:last-of-type) {
margin-right: 1rem;
}
#version-info th {
width: 35%;
}
body > footer {
text-align: right;
}
.row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}

139
gulpfile.js Normal file
View file

@ -0,0 +1,139 @@
const gulp = require('gulp')
const postcss = require('gulp-postcss')
const autoprefixer = require('autoprefixer')
const cssnano = require('cssnano')
const sourcemaps = require('gulp-sourcemaps')
const bytediff = require('gulp-bytediff')
const browserSync = require('browser-sync').create()
const chalk = require('chalk')
const rename = require('gulp-rename')
const filter = require('gulp-filter')
const flatten = require('gulp-flatten')
const babel = require('gulp-babel')
const terser = require('gulp-terser')
const posthtml = require('gulp-posthtml')
const htmlnano = require('htmlnano')
const sizereport = require('gulp-sizereport')
const postcssCssVariables = require('postcss-css-variables')
const postcssImport = require('postcss-import')
const postcssInlineSvg = require('postcss-inline-svg')
const postcssColorModFunction = require('postcss-color-mod-function').bind(null, {
/* Use `.toRGBLegacy()` as other methods can result in lots of decimals */
stringifier: (color) => color.toRGBLegacy()
})
const paths = {
docs: { src: 'docs/**', dest: 'out/docs' },
styles: { src: 'src/builds/*.css', dest: 'out', watch: 'src/**/*.css' }
}
// https://stackoverflow.com/a/20732091
const humanFileSize = (size) => {
const i = Math.floor(Math.log(size) / Math.log(1024))
return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]
}
const formatByteMessage = (source, data) => {
const prettyStartSize = humanFileSize(data.startSize)
let message = ''
if (data.startSize !== data.endSize) {
const change = data.savings > 0 ? 'saved' : 'gained'
const prettySavings = humanFileSize(Math.abs(data.savings))
let prettyEndSize = humanFileSize(data.endSize)
if (data.endSize > data.startSize) prettyEndSize = chalk.yellow(prettyEndSize)
if (data.endSize < data.startSize) prettyEndSize = chalk.green(prettyEndSize)
message = chalk`${change} ${prettySavings} (${prettyStartSize} -> {bold ${prettyEndSize}})`
} else message = chalk`kept original filesize. ({bold ${prettyStartSize}})`
return chalk`{cyan ${source.padStart(12, ' ')}}: {bold ${data.fileName}} ${message}`
}
const style = () => {
const startDiff = () => bytediff.start()
const endDiff = (source) => bytediff.stop((data) => formatByteMessage(source, data))
return (
gulp
.src(paths.styles.src)
.pipe(postcss([postcssImport(), postcssColorModFunction(), postcssInlineSvg()]))
.pipe(startDiff())
.pipe(postcss([postcssCssVariables({ preserve: true })]))
.pipe(endDiff('css variables'))
.pipe(startDiff())
.pipe(postcss([autoprefixer()]))
.pipe(endDiff('autoprefixer'))
.pipe(flatten()) // Put files in out/*, not out/builds/*
.pipe(gulp.dest(paths.styles.dest))
// <minifying>
.pipe(startDiff())
.pipe(postcss([cssnano({ preset: ['default', { svgo: { floatPrecision: 0 } }] })]))
.pipe(endDiff('minification'))
.pipe(rename({ suffix: '.min' }))
// </minifying>
.pipe(gulp.dest(paths.styles.dest))
.pipe(gulp.dest(paths.docs.dest + '/water.css'))
.pipe(sizereport({ gzip: true, total: false, title: 'SIZE REPORT' }))
.pipe(browserSync.stream())
)
}
const docs = () => {
const htmlOnly = filter('**/*.html', { restore: true })
const jsOnly = filter('**/*.js', { restore: true })
const cssOnly = filter('**/*.css', { restore: true })
return (
gulp
// Exclude all HTML files but index.html
.src(paths.docs.src, { ignore: '**/!(index).html' })
// * Process HTML *
.pipe(htmlOnly)
.pipe(posthtml([htmlnano()]))
.pipe(htmlOnly.restore)
// * Process JS *
.pipe(jsOnly)
.pipe(sourcemaps.init())
.pipe(babel({ presets: ['@babel/preset-env'] }))
.pipe(terser({ toplevel: true }))
.pipe(sourcemaps.write('.'))
.pipe(jsOnly.restore)
// * Process CSS *
.pipe(cssOnly)
.pipe(sourcemaps.init())
.pipe(postcss([autoprefixer(), cssnano()]))
.pipe(sourcemaps.write('.'))
.pipe(cssOnly.restore)
.pipe(gulp.dest(paths.docs.dest))
)
}
const browserReload = (done) => {
browserSync.reload()
return done()
}
const startDevServer = () => {
browserSync.init({ server: { baseDir: './out/docs' } })
gulp.watch(paths.styles.watch, gulp.series(style, browserReload))
gulp.watch(paths.docs.src, gulp.series(docs, browserReload))
}
const build = gulp.parallel(style, docs)
const watch = gulp.series(build, startDevServer)
module.exports.build = build
module.exports.watch = watch

View file

@ -1,108 +0,0 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Water.css</title>
<link id='stylesheet' rel='stylesheet' href='dist/dark.css'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-116663597-6'></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag(){dataLayer.push(arguments)}
gtag('js', new Date())
gtag('config', 'UA-116663597-6')
</script>
</head>
<body>
<h1>Water.css</h1>
<p>
Water.css is a just-add-css collection of styles to make simple websites like this just a little bit nicer.
<a href='https://github.com/kognise/water.css'>Get it already!</a>
</p>
<p>
Now you can write your simple static site with nice semantic html, and Water.css will manage the styling for you.
</p>
<a href='https://www.producthunt.com/posts/water-css?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-water-css' target='_blank'><img id='ph' src='https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=150490&theme=dark' alt='Water.css - Make your tiny website just a little nicer | Product Hunt Embed' style='width: 250px; height: 54px;' width='250px' height='54px' /></a>
<h2>Goals</h2>
<ul>
<li>Responsive</li>
<li>Good code quality</li>
<li>Good browser support</li>
<li>Small size (&lt; 2kb)</li>
<li>Beautiful</li>
<li>No classes</li>
</ul>
<h2>Is it responsive?</h2>
<p>
<strong>Heck yeah!</strong> It doesn't include any fancy styles so it's easily mobile responsive.
Just add the famous <a href='https://www.w3schools.com/css/css_rwd_viewport.asp'>responsive viewport tag</a> and you'll be good to go!
</p>
<p>
In fact, try resizing this page. Everything flows super nicely as you'll see.
</p>
<button id='switch'>Switch theme</button>
<h2>Element demos</h2>
<p>
This is supposed to be a demo page so we need more elements!
</p>
<h3>Form elements</h3>
<form>
<label for='email'>Email</label>
<input type='email' name='email' id='email' placeholder='john.doe@gmail.com'>
<label for='id'>User id (read only)</label>
<input readonly name='id' id='id' value='04D6H89Z'>
<label for='disabled'>Random disabled input</label>
<input disabled name='disabled' id='disabled' placeholder='Because why not?'>
<label for='about'>About me</label>
<textarea name='about' id='about' placeholder='I am a textarea...'></textarea>
<input type='checkbox' name='remember' id='remember' checked>
<label for='remember'>Remember me</label>
<input type='submit'>
</form>
<h3>Code</h3>
<p>
Below is some code, you can copy it with <kbd>Ctrl-C</kbd>.
Did you know, <code>alert(1)</code> can show an alert in JavaScript!
</p>
<pre><code>// This logs a message to the console<br>console.log('Hello, world!')</code></pre>
<h3>Other</h3>
<p>Here's a horizontal rule and image because I don't know where else to put them.</p>
<img src='http://placekitten.com/408/287' alt='Example kitten'>
<hr>
<h3>Typography</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dictum hendrerit velit, quis ullamcorper sem congue ac. Quisque id magna rhoncus, sodales massa vel, vestibulum elit. Duis ornare accumsan egestas. Proin maximus lacus interdum leo molestie convallis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut iaculis risus eu felis feugiat, eu mollis neque elementum. Donec interdum, nisl id dignissim iaculis, felis dui aliquet dui, non fermentum velit lectus ac quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
<strong>This is strong,</strong> this is normal, <b>this is just bold,</b> <em>and this is emphasized!</em> And heck, <a href='/'>here</a>'s a link.
</p>
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
<li>Unordered list item 3</li>
</ul>
<ol>
<li>Ordered list item 1</li>
<li>Ordered list item 2</li>
<li>Ordered list item 3</li>
</ol>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<script src='script.js'></script>
</body>
</html>

2
index.js Normal file
View file

@ -0,0 +1,2 @@
const gulpfile = require('./gulpfile')
gulpfile.watch()

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

View file

@ -1,16 +1,24 @@
{ {
"name": "water.css", "name": "water.css",
"version": "1.0.0", "version": "2.1.1",
"description": "A just-add-css collection of styles to make simple websites just a little nicer.", "description": "A drop-in collection of CSS styles to make simple websites just a little nicer",
"main": "index.js", "main": "out/water.css",
"scripts": { "scripts": {
"build": "node-sass src/ --output dist/ --output-style compressed", "build": "gulp build",
"dev": "node dev.js" "dev": "gulp watch",
"lint:js": "eslint bookmarklet/original.js docs/script.js docs/index.html gulpfile.js",
"lint:css": "stylelint src/**/*.css docs/style.css",
"lint": "yarn lint:js --fix && yarn lint:css --fix",
"accessibility": "yarn build && node accessibility.js",
"validate": "yarn lint:js && yarn lint:css && yarn accessibility"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/kognise/water.css.git" "url": "git+https://github.com/kognise/water.css.git"
}, },
"publishConfig": {
"access": "public"
},
"keywords": [ "keywords": [
"css", "css",
"css-framework", "css-framework",
@ -24,10 +32,49 @@
}, },
"homepage": "https://github.com/kognise/water.css", "homepage": "https://github.com/kognise/water.css",
"devDependencies": { "devDependencies": {
"express": "^4.16.4", "@babel/core": "^7.4.5",
"fs-extra": "^7.0.1", "@babel/preset-env": "^7.4.5",
"node-sass": "^4.11.0", "@changesets/cli": "^2.7.2",
"socket.io": "^2.2.0", "autoprefixer": "^9.5.1",
"chokidar": "^2.1.5" "browser-sync": "^2.26.3",
} "chalk": "^2.4.2",
"cssnano": "^4.1.10",
"eslint": "^7.1.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-html": "^6.0.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-markdown": "^2.0.0-alpha.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-arrow": "^1.2.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
"gulp-bytediff": "^1.0.0",
"gulp-filter": "^5.1.0",
"gulp-flatten": "^0.4.0",
"gulp-postcss": "^8.0.0",
"gulp-posthtml": "^3.0.4",
"gulp-rename": "^1.4.0",
"gulp-sizereport": "^1.2.1",
"gulp-sourcemaps": "^2.6.5",
"gulp-terser": "^1.2.0",
"htmlnano": "^0.2.3",
"husky": "^4.2.5",
"pa11y": "^5.3.0",
"postcss-color-mod-function": "^3.0.3",
"postcss-css-variables": "^0.12.0",
"postcss-import": "^12.0.1",
"postcss-inline-svg": "^4.1.0",
"puppeteer": "^3.2.0",
"stylelint": "^13.5.0",
"stylelint-config-standard": "^20.0.0"
},
"browserslist": [
"defaults"
],
"files": [
"out/*.css",
"LICENSE.md"
]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View file

@ -1,11 +0,0 @@
document.getElementById('switch').addEventListener('click', () => {
const stylesheet = document.getElementById('stylesheet')
const ph = document.getElementById('ph')
if (stylesheet.getAttribute('href') === 'dist/dark.css') {
stylesheet.setAttribute('href', 'dist/light.css')
ph.src = ph.src.replace('theme=dark', 'theme=light')
} else {
stylesheet.setAttribute('href', 'dist/dark.css')
ph.src = ph.src.replace('theme=light', 'theme=dark')
}
})

4
src/assets/select-arrow.svg Executable file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="62.5" width="116.9">
<path d="M115.3,1.6 C113.7,0 111.1,0 109.5,1.6 L58.5,52.7 L7.4,1.6 C5.8,0 3.2,0 1.6,1.6 C0,3.2 0,5.8 1.6,7.4 L55.5,61.3 C56.3,62.1 57.3,62.5 58.4,62.5 C59.4,62.5 60.5,62.1 61.3,61.3 L115.2,7.4 C116.9,5.8 116.9,3.2 115.3,1.6Z"/>
</svg>

After

Width:  |  Height:  |  Size: 403 B

6
src/builds/dark.css Executable file
View file

@ -0,0 +1,6 @@
/**
* Forced dark theme version
*/
@import '../variables-dark.css';
@import '../parts/_core.css';

6
src/builds/light.css Executable file
View file

@ -0,0 +1,6 @@
/**
* Forced light theme version
*/
@import '../variables-light.css';
@import '../parts/_core.css';

9
src/builds/water.css Normal file
View file

@ -0,0 +1,9 @@
/**
* Automatic version:
* Uses light theme by default but switches to dark theme
* if a system-wide theme preference is set on the user's device.
*/
@import '../variables-light.css';
@import '../variables-dark.css' (prefers-color-scheme: dark);
@import '../parts/_core.css';

View file

@ -1,18 +0,0 @@
$background: #202b38 !default;
$background-alt: #161f27 !default;
$text-main: #dbdbdb !default;
$text-bright: #ffffff !default;
$links: #41adff !default;
$focus: #0096bfab !default;
$border: #dbdbdb !default;
$code: #ffbe85 !default;
$button-hover: #324759 !default;
$animation-duration: 0.1s !default;
$form-placeholder: #a9a9a9 !default;
$form-text: #ffffff !default;
@import 'parts/core';

View file

@ -1,18 +0,0 @@
$background: #ffffff !default;
$background-alt: #efefef !default;
$text-main: #363636 !default;
$text-bright: #000000 !default;
$links: #0076d1 !default;
$focus: #0096bfab !default;
$border: #dbdbdb !default;
$code: #000000 !default;
$button-hover: #dddddd !default;
$animation-duration: 0.1s !default;
$form-placeholder: #949494 !default;
$form-text: #000000 !default;
@import 'parts/core';

27
src/parts/_base.css Normal file
View file

@ -0,0 +1,27 @@
html {
scrollbar-color: var(--scrollbar-thumb) var(--background-body);
scrollbar-width: thin;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
word-wrap: break-word;
color: var(--text-main);
background: var(--background-body);
text-rendering: optimizeLegibility;
}
button,
input,
textarea {
transition:
background-color var(--animation-duration) linear,
border-color var(--animation-duration) linear,
color var(--animation-duration) linear,
box-shadow var(--animation-duration) linear,
transform var(--animation-duration) ease;
}

View file

@ -1,21 +0,0 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
color: $text-main;
background: $background;
text-rendering: optimizeLegibility;
}
button, input, textarea {
transition: background-color $animation-duration linear,
border-color $animation-duration linear,
color $animation-duration linear,
box-shadow $animation-duration linear,
transform $animation-duration ease;
}

29
src/parts/_code.css Normal file
View file

@ -0,0 +1,29 @@
code,
samp,
time {
background: var(--background);
color: var(--code);
padding: 2.5px 5px;
border-radius: 6px;
font-size: 1em;
}
pre > code {
padding: 10px;
display: block;
overflow-x: auto;
}
var {
color: var(--variable);
font-style: normal;
font-family: monospace;
}
kbd {
background: var(--background);
border: 1px solid var(--border);
border-radius: 2px;
color: var(--text-main);
padding: 2px 4px 2px 4px;
}

View file

@ -1,12 +0,0 @@
code, kbd {
background: $background-alt;
color: $code;
padding: 5px;
border-radius: 6px;
}
pre > code {
padding: 10px;
display: block;
overflow-x: auto;
}

8
src/parts/_core.css Normal file
View file

@ -0,0 +1,8 @@
@import '_base.css';
@import '_typography.css';
@import '_forms.css';
@import '_range.css';
@import '_links.css';
@import '_code.css';
@import '_misc.css';
@import '_print.css';

View file

@ -1,6 +0,0 @@
@import 'base';
@import 'typography';
@import 'forms';
@import 'links';
@import 'code';
@import 'misc';

159
src/parts/_forms.css Normal file
View file

@ -0,0 +1,159 @@
button,
select,
input[type='submit'],
input[type='reset'],
input[type='button'],
input[type='checkbox'],
input[type='range'],
input[type='radio'] {
cursor: pointer;
}
input,
select {
display: block;
}
[type='checkbox'],
[type='radio'] {
display: initial;
}
input,
button,
textarea,
select {
color: var(--form-text);
background-color: var(--background);
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
}
button,
input[type='submit'],
input[type='reset'],
input[type='button'] {
background-color: var(--button-base);
padding-right: 30px;
padding-left: 30px;
}
button:hover,
input[type='submit']:hover,
input[type='reset']:hover,
input[type='button']:hover {
background: var(--button-hover);
}
input[type='color'] {
min-height: 2rem;
padding: 8px;
cursor: pointer;
}
input[type='checkbox'],
input[type='radio'] {
height: 1em;
width: 1em;
}
input[type='radio'] {
border-radius: 100%;
}
input {
vertical-align: top;
}
label {
vertical-align: middle;
margin-bottom: 4px;
display: inline-block;
}
input:not([type='checkbox']):not([type='radio']),
input[type='range'],
select,
button,
textarea {
-webkit-appearance: none;
}
textarea {
display: block;
margin-right: 0;
box-sizing: border-box;
resize: vertical;
}
textarea:not([cols]) {
width: 100%;
}
textarea:not([rows]) {
min-height: 40px;
height: 140px;
}
select {
background: var(--background) var(--select-arrow) calc(100% - 12px) 50% / 12px no-repeat;
padding-right: 35px;
}
select::-ms-expand {
display: none;
}
select[multiple] {
padding-right: 10px;
background-image: none;
overflow-y: auto;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
box-shadow: 0 0 0 2px var(--focus);
}
input[type='checkbox']:active,
input[type='radio']:active,
input[type='submit']:active,
input[type='reset']:active,
input[type='button']:active,
input[type='range']:active,
button:active {
transform: translateY(2px);
}
input:disabled,
select:disabled,
button:disabled,
textarea:disabled {
cursor: not-allowed;
opacity: 0.5;
}
::placeholder {
color: var(--form-placeholder);
}
fieldset {
border: 1px var(--focus) solid;
border-radius: 6px;
margin: 0;
margin-bottom: 12px;
padding: 10px;
}
legend {
font-size: 0.9em;
font-weight: 600;
}

View file

@ -1,71 +0,0 @@
button,
input[type='submit'],
input[type='button'],
input[type='checkbox'] {
cursor: pointer;
}
input:not([type='checkbox']), select {
display: block;
}
input, select, button, textarea {
color: $form-text;
background-color: $background-alt;
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
}
input:not([type='checkbox']), select, button, textarea {
-webkit-appearance: none;
}
textarea {
margin-right: 0;
width: 100%;
box-sizing: border-box;
resize: vertical;
}
button, input[type='submit'], input[type='button'] {
padding-right: 30px;
padding-left: 30px;
}
button:hover,
input[type='submit']:hover,
input[type='button']:hover {
background: $button-hover;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
box-shadow: 0 0 0 2px $focus;
}
input[type='checkbox']:active,
input[type='submit']:active,
input[type='button']:active,
button:active {
transform: translateY(2px);
}
input:disabled {
cursor: not-allowed;
opacity: .5;
}
::placeholder {
color: $form-placeholder;
}

View file

@ -1,8 +1,8 @@
a { a {
text-decoration: none; text-decoration: none;
color: $links; color: var(--links);
} }
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;
} }

150
src/parts/_misc.css Normal file
View file

@ -0,0 +1,150 @@
img,
video {
max-width: 100%;
height: auto;
}
hr {
border: none;
border-top: 1px solid var(--border);
}
table {
border-collapse: collapse;
margin-bottom: 10px;
width: 100%;
table-layout: fixed;
}
table caption {
text-align: left;
}
td,
th {
padding: 6px;
text-align: left;
vertical-align: top;
word-wrap: break-word;
}
thead {
border-bottom: 1px solid var(--border);
}
tfoot {
border-top: 1px solid var(--border);
}
tbody tr:nth-child(even) {
background-color: var(--background);
}
tbody tr:nth-child(even) button {
background-color: var(--background-alt);
}
tbody tr:nth-child(even) button:hover {
background-color: var(--background-body);
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--background);
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover);
}
::selection {
background-color: var(--selection);
color: var(--text-bright);
}
details {
display: flex;
flex-direction: column;
align-items: flex-start;
background-color: var(--background-alt);
padding: 10px 10px 0;
margin: 1em 0;
border-radius: 6px;
overflow: hidden;
}
details[open] {
padding: 10px;
}
details > :last-child {
margin-bottom: 0;
}
details[open] summary {
margin-bottom: 10px;
}
summary {
display: list-item;
background-color: var(--background);
padding: 10px;
margin: -10px -10px 0;
cursor: pointer;
outline: none;
}
summary:hover,
summary:focus {
text-decoration: underline;
}
details > :not(summary) {
margin-top: 0;
}
summary::-webkit-details-marker {
color: var(--text-main);
}
dialog {
background-color: var(--background-alt);
color: var(--text-main);
border: none;
border-radius: 6px;
border-color: var(--border);
padding: 10px 30px;
}
dialog > header:first-child {
background-color: var(--background);
border-radius: 6px 6px 0 0;
margin: -10px -30px 10px;
padding: 10px;
text-align: center;
}
dialog::backdrop {
background: #0000009c;
backdrop-filter: blur(4px);
}
footer {
border-top: 1px solid var(--border);
padding-top: 10px;
color: var(--text-muted);
}
body > footer {
margin-top: 40px;
}

View file

@ -1,8 +0,0 @@
img {
max-width: 100%;
}
hr {
border: none;
border-top: 1px solid $border;
}

53
src/parts/_print.css Normal file
View file

@ -0,0 +1,53 @@
@media print {
body,
pre,
code,
summary,
details,
button,
input,
textarea {
background-color: #fff;
}
button,
input,
textarea {
border: 1px solid #000;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
button,
input,
textarea,
footer,
summary,
strong {
color: #000;
}
summary::marker {
color: #000;
}
summary::-webkit-details-marker {
color: #000;
}
tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
a {
color: #00f;
text-decoration: underline;
}
}

87
src/parts/_range.css Normal file
View file

@ -0,0 +1,87 @@
input[type='range'] {
margin: 10px 0;
padding: 10px 0;
background: transparent;
}
input[type='range']:focus {
outline: none;
}
input[type='range']::-webkit-slider-runnable-track {
width: 100%;
height: 9.5px;
transition: 0.2s;
background: var(--background);
border-radius: 3px;
}
input[type='range']::-webkit-slider-thumb {
box-shadow: 0 1px 1px #000, 0 0 1px #0d0d0d;
height: 20px;
width: 20px;
border-radius: 50%;
background: var(--border);
-webkit-appearance: none;
margin-top: -7px;
}
input[type='range']:focus::-webkit-slider-runnable-track {
background: var(--background);
}
input[type='range']::-moz-range-track {
width: 100%;
height: 9.5px;
transition: 0.2s;
background: var(--background);
border-radius: 3px;
}
input[type='range']::-moz-range-thumb {
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
height: 20px;
width: 20px;
border-radius: 50%;
background: var(--border);
}
input[type='range']::-ms-track {
width: 100%;
height: 9.5px;
background: transparent;
border-color: transparent;
border-width: 16px 0;
color: transparent;
}
input[type='range']::-ms-fill-lower {
background: var(--background);
border: 0.2px solid #010101;
border-radius: 3px;
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
}
input[type='range']::-ms-fill-upper {
background: var(--background);
border: 0.2px solid #010101;
border-radius: 3px;
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
}
input[type='range']::-ms-thumb {
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
border: 1px solid #000;
height: 20px;
width: 20px;
border-radius: 50%;
background: var(--border);
}
input[type='range']:focus::-ms-fill-lower {
background: var(--background);
}
input[type='range']:focus::-ms-fill-upper {
background: var(--background);
}

89
src/parts/_typography.css Normal file
View file

@ -0,0 +1,89 @@
h1 {
font-size: 2.2em;
margin-top: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 12px;
margin-top: 24px;
}
h1,
h2,
h3,
h4,
h5,
h6,
strong {
color: var(--text-bright);
}
h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th {
font-weight: 600;
}
q::before {
content: none;
}
q::after {
content: none;
}
blockquote,
q {
border-left: 4px solid var(--focus);
margin: 1.5em 0;
padding: 0.5em 1em;
font-style: italic;
}
blockquote > footer {
font-style: normal;
border: 0;
}
blockquote cite {
font-style: normal;
}
address {
font-style: normal;
}
a[href^='mailto\:']::before {
content: '📧 ';
}
a[href^='tel\:']::before {
content: '📞 ';
}
a[href^='sms\:']::before {
content: '💬 ';
}
mark {
background-color: var(--highlight);
border-radius: 2px;
padding: 0 2px 0 2px;
color: #000;
}
a > code,
a > strong {
color: inherit;
}

View file

@ -1,16 +0,0 @@
h1 {
font-size: 2.2em;
margin-top: 0;
}
h1, h2, h3, h4, h5, h6 {
margin-bottom: 12px;
}
h1, h2, h3, h4, h5, h6, strong {
color: $text-bright;
}
h1, h2, h3, h4, h5, h6, b, strong, th {
font-weight: 600;
}

23
src/variables-dark.css Executable file
View file

@ -0,0 +1,23 @@
:root {
--background-body: #202b38;
--background: #161f27;
--background-alt: #1a242f;
--selection: #1c76c5;
--text-main: #dbdbdb;
--text-bright: #fff;
--text-muted: #a9b1ba;
--links: #41adff;
--focus: #0096bfab;
--border: #526980;
--code: #ffbe85;
--animation-duration: 0.1s;
--button-base: #0c151c;
--button-hover: #040a0f;
--scrollbar-thumb: var(--button-hover);
--scrollbar-thumb-hover: color-mod(var(--scrollbar-thumb) lightness(-30%));
--form-placeholder: #a9a9a9;
--form-text: #fff;
--variable: #d941e2;
--highlight: #efdb43;
--select-arrow: svg-load('./assets/select-arrow.svg', fill: #efefef);
}

23
src/variables-light.css Executable file
View file

@ -0,0 +1,23 @@
:root {
--background-body: #fff;
--background: #efefef;
--background-alt: #f7f7f7;
--selection: #9e9e9e;
--text-main: #363636;
--text-bright: #000;
--text-muted: #70777f;
--links: #0076d1;
--focus: #0096bfab;
--border: #dbdbdb;
--code: #000;
--animation-duration: 0.1s;
--button-base: #d0cfcf;
--button-hover: #9b9b9b;
--scrollbar-thumb: color-mod(var(--button-hover) lightness(+6%));
--scrollbar-thumb-hover: var(--button-hover);
--form-placeholder: #949494;
--form-text: #1d1d1d;
--variable: #39a33c;
--highlight: #ff0;
--select-arrow: svg-load('./assets/select-arrow.svg', fill: #161f27);
}

8488
yarn.lock

File diff suppressed because it is too large Load diff