You're awesome! Here at Allied, we love contributers. 😍
Since we're operating on a WordPress platform, their coding standards will always take precedence. See style guide below.
Use EditorConfig in your editor of choice, whitespace flipping is naughty! 😷
- Open a new or already existing issue
- Fork the repo, create a branch, commit your fix
- Push the branch, open a pull request
- The core team reviews changes, provides feedback if necessary
- If fix is approved core team merges the PR
- 🎉 🎉 🎉
For small issues like updating a README or other Markdown files, quick pull request or even commit into master
is acceptable. However, for most new code, we use the GitHub flow:
Use WordPress JavaScript Coding Standards as your baseline.
There's too much to list here, but in general we mostly agree with the Airbnb ES6 style guide] and Khan Academy React style guide where applicable.
Simple words separated by hyphens as a preference to camelCasing or underscores.
Use WordPress CSS Coding Standards as your baseline.
Some suggestions and guidelines that will make the styling codebase simple, readable, consistent and relatively transferable to other CSS processor languages. Approach writing the code with a 'vanilla CSS' ethos, only adding non-standard syntax (SASS or perhaps PostCSS) when absolutely necessary.
Try to avoid anything more than a selector nested within an already nested selector (three selectors deep).
.component-name {
padding: 20px;
.element {
font-size: 16px;
span {
font-weight: bold;
}
}
}
Write media queries at the bottom of the component/page file, each one inside of the main selector name so as to be in scope of the component for component specific variables.
.component-name {
/*...*/
@media screen and (min-width: $breakpoint) {
/*...*/
}
}
With this approach in mind use CSS comments /* ... */
and not SASS //
.
Each CSS file should have the following at the top:
/*
* COMPONENT/PAGE NAME
* Short description of that component/page
*
* Notes: Anything unusual or complicated to mention
* TODO:
*/
If you really need them, then go bananas but document extensively.
Above all else, be cool. Follow the Open Source Code of Conduct.
🌸 ✌️
Allied is a global leader in steel construction, developing solutions for every industry. From aviation to warehouses and everything in between, trust Allied to be with you all the way. The names and logos for Allied are trademarks of Allied Steel Buildings, Inc.