diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7f003bd..e451fa8 100755 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1 +1,75 @@ -> 💡 TODO: Add contributing guide +# 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 its [MIT License](./LICENSE.md). + +## How to get started + +1. Get a copy of repository. It is recommended to fork it first and clone to your machine using `git`. + +2. Make sure that you have [yarn](https://yarnpkg.com) and install dependencies listed in `package.json` using it. + +``` +yarn +``` + +3. Then you can run development server with live reloading out of the box and play around with the framework. + +``` +yarn dev +``` + +So you can access the `index.html` in browser by visiting http://localhost:3000/index.html + +More details will be provided in command line interface. + +*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 a package. The script itself could be run manually: + +``` +yarn build +``` + +## How to find issues to work on + +If you are new to contributing open-source software, you can starty by picking any relevant issue that is tagged with `good first issue` [there]( +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). + + +## How to make a pull request + +It is a few general rules of thumb about making pull requests: + +* Make sure that your pull request covers a small and well defined scope + +* Make small commits with clear and explainful messages + +* You need to provide a clear description about your contribution on GitHub + +## Directory structure + +``` +. +├── dist +├── icons +└── src + ├── assets + ├── builds + └── parts +``` + +`dist` directory is ignored by git and it contains built assets for distribution + +`icons` directory contains water.css favicons used in `index.html` demo/docs file + +`src` directory contains all the source stylesheets groupped into folders and variables + +`src/assets` directory contains images used for UI elements styling + +`src/builds` directory contains base style files prepared for different kind of builds (i.e. light and dark themes, supporting legacy browsers, etc) + +`src/parts` directory contains the whole source organized in separate files by its kind like forms, links, typography \ No newline at end of file diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 0000000..425b4df --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-standard" +} \ No newline at end of file diff --git a/README.md b/README.md index 4d2e2d5..64d8859 100644 --- a/README.md +++ b/README.md @@ -65,23 +65,9 @@ Simply remove the `.min` from the file name. Don't like how it looks? Feel free to submit an issue or PR with suggestions. -## Contributing - -Water.css becomes better for everyone when people like you help make it better! - -Have any questions or concerns? Did I forget an element or selector? Does something look ugly? Feel free to submit an issue or pull request. - -If you decide to contribute, after downloading a copy of the repository make sure to run `yarn` to install dependencies useful for development. Then, you can just run the following to start a server of the demo with live reloading on change. - -``` -$ yarn dev -``` - -And make sure to run `yarn build` before pushing any changes! Thanks for taking the time to contribute :) - ## Theming -> ⚠ The theming guide is out of date and will be updated shortly! In the mean time, check src/variables-\*.css to see your customization options. +> ⚠ The theming guide is out of date and will be updated shortly! In the meantime, check src/variables-\*.css to see your customization options. 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: @@ -144,6 +130,10 @@ $form-text: #ffffff !default; You can also only import parts you want, but this is not recommended. See the `src/parts/` folder for a list of parts. +## Contributing + +Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. + ## Todos - Add screenshots diff --git a/gulpfile.js b/gulpfile.js index a4193a4..a76a79f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,22 +15,22 @@ 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(), + stringifier: color => color.toRGBLegacy() }) const paths = { srcDir: 'src/*', docsDir: '*', - styles: { src: 'src/builds/*.css', dest: 'dist' }, + styles: { src: 'src/builds/*.css', dest: 'dist' } } // https://stackoverflow.com/a/20732091 -function humanFileSize(size) { +function humanFileSize (size) { var i = Math.floor(Math.log(size) / Math.log(1024)) return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i] } -function formatByteMessage(source, data) { +function formatByteMessage (source, data) { const prettyStartSize = humanFileSize(data.startSize) let message = '' @@ -48,7 +48,7 @@ function formatByteMessage(source, data) { return chalk`{cyan ${source.padStart(12, ' ')}}: {bold ${data.fileName}} ${message}` } -function style() { +function style () { const isLegacy = path => /legacy/.test(path) const excludeModern = filter(file => isLegacy(file.path), { restore: true }) @@ -70,7 +70,7 @@ function style() { .pipe(bytediff.start()) // autoprefix .pipe(postcss([autoprefixer({ - env: "legacy" + env: 'legacy' })])) // Write the amount gained by autoprefixing .pipe(bytediff.stop(data => formatByteMessage('autoprefixer', data))) @@ -82,7 +82,7 @@ function style() { .pipe(bytediff.start()) // autoprefix modern builds .pipe(postcss([autoprefixer({ - env: "modern" + env: 'modern' })])) // Write the amount gained by autoprefixing .pipe(bytediff.stop(data => formatByteMessage('autoprefixer', data))) @@ -114,14 +114,14 @@ function style() { ) } -function watch() { +function watch () { style() browserSync.init({ server: { - baseDir: './', + baseDir: './' }, - startPath: 'index.html', + startPath: 'index.html' }) gulp.watch(paths.srcDir, style) diff --git a/index.html b/index.html index 7b6623b..1a627ed 100644 --- a/index.html +++ b/index.html @@ -64,9 +64,8 @@ id='ph' 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' + width='250' + height='54' />

Goals

@@ -184,7 +183,7 @@
- +
@@ -267,16 +266,16 @@ for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can - be given using the <cite> cite element.' + be given using the <cite> cite element.' - Quotes (<q>) share the same style as blockquotes. + Quotes (<q>) share the same style as blockquotes. -

Use <mark> to highlight the important stuff.

+

Use <mark> to highlight the important stuff.