11# Contributing to normalize.css
22
3- Please take a moment to review this document in order to make the contribution
4- process easy and effective for everyone involved.
3+ Please review this document in order to make the contribution process easy and
4+ effective for everyone involved.
55
66Following these guidelines helps to communicate that you respect the time of
7- the developers managing and developing this open source project. In return,
8- they should reciprocate that respect in addressing your issue or assessing
9- patches and features.
10-
7+ the developers managing and developing this project. In return, we will
8+ reciprocate that respect in addressing your issues, patches, and features.
119
1210## Using the issue tracker
1311
14- The issue tracker is the preferred channel for [ bug reports] ( #bugs ) ,
15- [ features requests] ( #features ) and [ submitting pull
12+ The issue tracker is the preferred channel for [ bug reports] ( #bug-reports ) ,
13+ [ feature requests] ( #feature-requests ) and [ pull
1614requests] ( #pull-requests ) , but please respect the following restrictions:
1715
1816* Please ** do not** use the issue tracker for personal support requests.
19-
2017* Please ** do not** derail or troll issues. Keep the discussion on topic and
2118 respect the opinions of others.
2219
23-
2420## Bug reports
2521
26- A bug is a _ demonstrable problem_ that is caused by the code in the repository.
27- Good bug reports are extremely helpful - thank you!
28-
29- Guidelines for bug reports:
22+ A bug is a _ demonstrable problem_ caused by the code in this repository.
3023
31- 1 . ** Use the GitHub issue search** – check if the issue has already been
32- reported.
24+ 1 . ** Use the GitHub issue search** to see if the issue has
25+ [ already been reported] .
3326
34- 2 . ** Check if the issue has been fixed** – try to reproduce it using the
27+ 2 . ** Check if the issue has been fixed** by trying to reproduce it using the
3528 latest ` master ` branch in the repository.
3629
37- 3 . ** Isolate the problem** – create a live example (e.g., on
38- [ Codepen] ( http://codepen.io ) ) of a [ reduced test
39- case] ( http://css-tricks.com/6263-reduced-test-cases/ ) .
30+ 3 . ** Isolate the problem** to create a [ live example] of a [ reduced test case] .
4031
4132A good bug report shouldn't leave others needing to chase you up for more
42- information. Please try to be as detailed as possible in your report. What is
43- your environment? What steps will reproduce the issue? What browser(s) and OS
33+ information. Please be as detailed as possible in your report. What is your
34+ environment? What steps will reproduce the issue? What browser(s) and OS
4435experience the problem? What would you expect to be the outcome? All these
4536details will help people to fix any potential bugs.
4637
@@ -62,15 +53,13 @@ Example:
6253> causing the bug, and potential solutions (and your opinions on their
6354> merits).
6455
65-
6656## Feature requests
6757
68- Feature requests are welcome. But take a moment to find out whether your idea
69- fits with the scope and aims of the project. It's up to * you* to make a strong
70- case to convince the project's developers of the merits of this feature. Please
58+ Feature requests are welcome. Take a moment to find out whether your idea fits
59+ with the scope and aims of the project. It's up to * you* to make a strong case
60+ to convince the project's developers of the merits of this feature. Please
7161provide as much detail and context as possible.
7262
73-
7463## Pull requests
7564
7665Good pull requests - patches, improvements, new features - are a fantastic
@@ -87,64 +76,52 @@ accurate comments, etc.) and any other requirements (such as test coverage).
8776Follow this process if you'd like your work considered for inclusion in the
8877project:
8978
90- 1 . [ Fork] ( https://help.github.com/articles/fork-a-repo/ ) the project, clone your
91- fork, and configure the remotes:
92-
79+ 1 . To begin: [ fork this project] , clone your fork, and add our upstream.
9380 ``` bash
9481 # Clone your fork of the repo into the current directory
95- git clone https://github.com/< your-username> /normalize.css
82+ git clone
[email protected] :YOUR_USER/normalize.css.git
83+
9684 # Navigate to the newly cloned directory
9785 cd normalize.css
86+
9887 # Assign the original repo to a remote called "upstream"
99- git remote add upstream https://github.com/necolas/normalize.css
100- ```
88+ git remote add upstream
[email protected] :csstools/normalize.css.git
10189
102- 2 . If you cloned a while ago, get the latest changes from upstream:
90+ # Install the tools necessary for testing
91+ npm install
92+ ```
10393
94+ 2 . Create a branch for your feature or fix:
10495 ``` bash
105- git checkout master
106- git pull upstream master
96+ # Move into a new branch for your feature
97+ git checkout -b feature/thing
10798 ```
108-
109- 3 . Never work directly on ` master ` . Create a new topic branch (off the latest
110- version of ` master ` ) to contain your feature, change, or fix:
111-
11299 ``` bash
113- git checkout -b < topic-branch-name>
100+ # Move into a new branch for your fix
101+ git checkout -b fix/something
114102 ```
115103
116- 4 . Commit your changes in logical chunks. Please adhere to these [ git commit
117- message conventions] ( http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html )
118- or your code is unlikely be merged into the main project. Use Git's
119- [ interactive rebase] ( https://help.github.com/articles/interactive-rebase )
120- feature to tidy up your commits before making them public.
121-
122- Be sure to test the ` normalize.css ` file for style conformance.
123-
104+ 3 . If your code follows our practices, then push your feature branch:
124105 ``` bash
106+ # Test current code
125107 npm test
126108 ```
127-
128- Be sure to add a test to the ` test.html ` file if appropriate, and test
129- your change in all supported browsers.
130-
131- 5 . Locally rebase the upstream development branch into your topic branch:
132-
133109 ``` bash
134- git pull --rebase upstream master
110+ # Push the branch for your new feature
111+ git push origin feature/thing
135112 ```
136-
137- 6 . Push your topic branch up to your fork:
138-
139113 ``` bash
140- git push origin < topic-branch-name>
114+ # Or, push the branch for your update
115+ git push origin update/something
141116 ```
142117
143- 10 . [ Open a Pull Request ] ( https://help.github.com/articles/using-pull-requests/ )
144- with a clear title and description .
118+ Be sure to add a test to the ` test.html ` file if appropriate, and test
119+ your change in all supported browsers .
145120
146- ** IMPORTANT** : By submitting a patch, you agree to allow the project owner to
147- license your work under the same license as that used by the project.
121+
122+ Now [ open a pull request] with a clear title and description. Remember,
123+ by submitting a patch, you agree to allow the project owner to license your
124+ work under the same license as that used by the project.
148125
149126### CSS Conventions
150127
@@ -156,14 +133,13 @@ Keep the CSS file as readable as possible by following these guidelines:
156133 normalization obvious.
157134- Comments begin with “Correct the...” when they deal with less obvious side
158135 effects.
159- - Rules are sorted by cascade, specificity, and then alphabetic order.
160- - Selectors are sorted by specificity and then alphabetic order.
136+ - Rules are sorted by section, cascade, specificity, and then alphabetic order.
137+ - Selectors are sorted by low-to-high specificity and then alphabetic order.
161138- ` in browser ` applies to all versions.
162- - ` in browser v- ` applies to all versions up to and including the version.
163139- ` in browser v+ ` applies to all versions after and including the version.
140+ - ` in browser v- ` applies to all versions up to and including the version.
164141- ` in browser v-v ` applies to all versions including and between the versions.
165142
166-
167143## Maintainers
168144
169145If you have commit access, please follow this process for merging patches and
@@ -175,20 +151,19 @@ cutting new releases.
1751512 . Check that a patch has any necessary tests and a proper, descriptive commit
176152 message.
1771533 . Test the patch locally.
178- 4 . Do not use GitHub's merge button. Apply the patch to ` master ` locally
179- (either via ` git am ` or by checking the whole branch out). Amend minor
180- problems with the author's original commit if necessary. Then push to GitHub.
154+ 4 . Use GitHub’s merge button with caution or apply the patch locally, squashing
155+ any commits.
181156
182157### Releasing a new version
183158
184- 1 . Include all new functional changes in the CHANGELOG.
185- 2 . Use a dedicated commit to increment the version. The version needs to be
186- added to the CHANGELOG (inc. date), the ` package.json ` , and ` normalize.css `
187- files.
188- 3 . The commit message must be of ` v0.0.0 ` format.
189- 4 . Create an annotated tag for the version: ` git tag -m "v0.0.0" 0.0.0 ` .
190- 5 . Push the changes and tags to GitHub: ` git push --tags origin master `
191- 6 . Checkout the ` gh-pages ` branch and follow the instructions in the README .
159+ 1 . Include all new functional changes in CHANGELOG.md .
160+ 2 . Create an annotated tag for the version: ` git tag -m "0.0.0" 0.0.0 ` .
161+ 3 . Push the changes and tags to GitHub: ` git push --tags origin master `
162+ 4 . Update the ` gh-pages ` branch,
163+ 1 . Copy the latest normalize.css and test.html from the master branch into
164+ the root directory, the ` latest ` directory, and a new directory named
165+ after the new version: ` 0.0.0 ` .
166+ 2 . Update the normalize.css version and supported browsers in ` index.html ` .
192167
193168### Semver strategy
194169
@@ -202,6 +177,12 @@ are considered backwards-compatible and will result in a new **patch** release.
202177
203178No changes to CSS rules can add functionality in a backwards-compatible manner,
204179therefore no changes are considered ** minor** . For instance, a normalization on
205- an element selector may override a user style on a universal selector, a
180+ an element selector may override a user style on a universal selector, or a
206181change to ` opacity ` might cause [ inputs to disappear] ( https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/ ) ,
207182or a change to ` background-color ` might cause [ backgrounds to shrink] ( https://github.com/jonathantneal/sanitize.css/issues/42 ) .
183+
184+ [ already been reported ] : https://github.com/csstools/normalize.css/issues
185+ [ fork this project ] : https://github.com/csstools/normalize.css/fork
186+ [ live example ] : https://codepen.io/pen
187+ [ open a pull request ] : https://help.github.com/articles/using-pull-requests/
188+ [ reduced test case ] : https://css-tricks.com/reduced-test-cases/
0 commit comments