|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Glad to see you want to contribute to this project! |
| 4 | + |
| 5 | +> **Note** |
| 6 | +> |
| 7 | +> - We donot expect Modified CSS button of existing button. |
| 8 | +> |
| 9 | +> - Avoid duplicate contributions, please check if a button already exists before contributing. |
| 10 | +
|
| 11 | +## Contents |
| 12 | + |
| 13 | +- [Setup this project](#setup-project) |
| 14 | +- [Rules to follow when contributing](#some-rules-to-follow-when-contributing) |
| 15 | +- [Add your button to this repo](#add-your-button-to-css-buttons) |
| 16 | +- [How to ask help?](#where-can-i-go-for-help) |
| 17 | +- [Report a bug/feature request](#report-a-bugrequest-a-feature) |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Setup Project |
| 22 | + |
| 23 | +To start contributing, follow the below guidelines: |
| 24 | + |
| 25 | +1. Fork [this](https://github.com/Design-and-Code/css-buttons) repository. |
| 26 | + |
| 27 | +2. Clone your forked copy of the project. |
| 28 | + |
| 29 | + ``` |
| 30 | + git clone https://github.com/<your_username>/css-buttons.git |
| 31 | + ``` |
| 32 | + |
| 33 | +3. Navigate to the directory `css-buttons` . |
| 34 | + |
| 35 | + ``` |
| 36 | + cd css-buttons |
| 37 | + ``` |
| 38 | + |
| 39 | +4. Add a reference (remote) to the original repository. |
| 40 | + |
| 41 | + ``` |
| 42 | + git remote add upstream https://github.com/Design-and-Code/css-buttons.git |
| 43 | + ``` |
| 44 | + |
| 45 | +5. Check the remotes for this repository. |
| 46 | + |
| 47 | + ``` |
| 48 | + git remote -v |
| 49 | + ``` |
| 50 | + |
| 51 | +6. Always take a pull from the upstream repository to your main branch to keep it up to date with the main project (updated repository). |
| 52 | + |
| 53 | + ``` |
| 54 | + git pull upstream main |
| 55 | + ``` |
| 56 | + |
| 57 | +7. Create a new branch. |
| 58 | + |
| 59 | + ``` |
| 60 | + git checkout -b <your_branch_name> |
| 61 | + ``` |
| 62 | + |
| 63 | +# Some rules to follow when Contributing: |
| 64 | + |
| 65 | +- Please follow naming convention for button classes. (Eg. yourname-btn-index aka rajkumar-btn-1) |
| 66 | +- Do not change default buttons maked with the ` button-def ` class. |
| 67 | +- Do not change any code in the `index.html` file except for button section. |
| 68 | +- Do not change any code in the `assets` folder. |
| 69 | + |
| 70 | + |
| 71 | +## Add your button to css-buttons |
| 72 | + |
| 73 | +1. Add your HTML code in the [index.html](https://github.com/Design-and-Code/css-buttons/blob/main/index.html) file. |
| 74 | +2. Add your CSS code in the [buttons.css](https://github.com/Design-and-Code/css-buttons/blob/main/buttons/buttons.css) file. |
| 75 | +3. Make sure you do not change any other button's code. |
| 76 | +4. For naming css classes use the correct naming conventions - eg. yourname-btn-index or btn-yourname-index. |
| 77 | +5. When you open the PR, please include a full screenshot. |
| 78 | +6. See below demo code to know how to add your button. |
| 79 | + |
| 80 | +#### Demo code |
| 81 | +```html |
| 82 | + <!-- your-github-username-btn-1 start --> |
| 83 | + <div class="button-container"> |
| 84 | + <!-- add your buttons here, eg.--> |
| 85 | + <button class="{your-github-username-btn-index}"> |
| 86 | + <span class="{your-github-username-btn-index}"> Example Button </span> |
| 87 | + </button> |
| 88 | + <div class="createdby-section"> |
| 89 | + Created by |
| 90 | + <a href="{your-github-link}">{your-github-username}</a> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + <!-- your-github-username-btn-1 end --> |
| 94 | +``` |
| 95 | +> So it will look like this |
| 96 | +```html |
| 97 | + <!-- Rajkumar-justcoder-btn-1 start --> |
| 98 | + <div class="button-container"> |
| 99 | + <!-- add your buttons here, eg.--> |
| 100 | + <button class="rajkumar-justcoder-btn-1"> |
| 101 | + <span class="rajkumar-justcoder-btn-1-span"> Example Button </span> |
| 102 | + </button> |
| 103 | + <div class="createdby-section"> |
| 104 | + Created by |
| 105 | + <a href="link">Rajkumar-justcoder</a> |
| 106 | + </div> |
| 107 | + </div> |
| 108 | + <!-- Rajkumar-justcoder-btn-1 end --> |
| 109 | + |
| 110 | +``` |
| 111 | +7. Also if u use any tag like span or div etc then your should have class-name like this: `your_github_username-btn-index-span/text/div` (example: `rajkumar-justcoder-btn-1-span`) as u can see in above given demo code. |
| 112 | +8. If using keyframes/animation in css then keyframe name also should be like this: `your_github_username-btn-index-rotate` (example: `rajkumar-justcoder-btn-1-rotate`) |
| 113 | + |
| 114 | + |
| 115 | +## Push your changes and make a Pull Request |
| 116 | + |
| 117 | +1. Track your changes ✔. |
| 118 | + |
| 119 | + ``` |
| 120 | + git add . |
| 121 | + ``` |
| 122 | +
|
| 123 | +2. Commit your changes. |
| 124 | +
|
| 125 | + ``` |
| 126 | + git commit -m "Relevant message" |
| 127 | + ``` |
| 128 | +
|
| 129 | +3. Push the committed changes in your feature branch to your remote repo. |
| 130 | +
|
| 131 | + ``` |
| 132 | + git push -u origin <your_branch_name> |
| 133 | + ``` |
| 134 | +
|
| 135 | +4. To create a pull request, click on `Compare & pull requests`. |
| 136 | +
|
| 137 | +5. Add appropriate title and description to your pull request explaining your changes and efforts done. |
| 138 | +
|
| 139 | +6. Click on `Create pull request`. |
| 140 | +
|
| 141 | +7. Voilà! You have made a PR to css-buttons 💥. Wait for your submission to be accepted and your PR to be merged. |
| 142 | +
|
| 143 | +
|
| 144 | +## Where can I go for help? |
| 145 | +
|
| 146 | +If you need help, you can join our discord server. |
| 147 | +
|
| 148 | +<p> |
| 149 | + <a href="https://discord.gg/druweDMn3s"> |
| 150 | + <img alt="Discord" src="https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white"> |
| 151 | + </a> |
| 152 | +</p> |
| 153 | +
|
| 154 | +## Report a bug/request a feature |
| 155 | +
|
| 156 | +If you find a security vulnerability, do NOT open an issue. [Email](mailto:[email protected]) us instead. |
| 157 | +
|
| 158 | +If you find yourself wishing for a feature that doesn't exist in css-buttons, you are probably not alone. Open an issue on our issues list on GitHub which describes |
| 159 | +the feature you would like to see, why you need it, and how it should work. |
| 160 | +
|
| 161 | +#### Follow these steps to report a bug/request a feature |
| 162 | +
|
| 163 | +- Head over to [issues](https://github.com/Design-and-Code/css-buttons/issues) tab. |
| 164 | +- Click on `New issue` in top right corner. |
| 165 | +- Add appropriate title and description to your issue. |
| 166 | +
|
| 167 | +
|
| 168 | +#### Things to keep in mind while reporting a bug |
| 169 | +
|
| 170 | +A good bug report shouldn't leave others needing to chase you up for more information. |
| 171 | +Please try to be as detailed as possible in your report. |
| 172 | +
|
| 173 | +- What is your environment? |
| 174 | +- What steps will reproduce the issue? |
| 175 | +- What browser(s) and OS experience the problem? |
| 176 | +- What would you expect to be the outcome? |
| 177 | +- Provide adequate screenshots/log for the bug. |
| 178 | +
|
| 179 | +All these details will help developers to fix any potential bugs. |
| 180 | +
|
| 181 | +#### Things to keep in mind while creating a feature request |
| 182 | +
|
| 183 | +Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. |
| 184 | +It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. |
0 commit comments