Update wiki about CSS standards #870

Closed
opened 2026-05-11 08:54:06 +00:00 by a24julot · 4 comments
Collaborator

The decision has been made to use kebab-case and brackets, more on this in issue: #710. This should be documented so that everyone uses it.

The decision has been made to use kebab-case and brackets, more on this in issue: https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/710. This should be documented so that everyone uses it.
Collaborator

For updating our wiki based on what i have worked with when refactoring, we need to add 3 conventions.

Firstly that we should always use kebab-case for class names

.example-xxx and not .exampleXxx or anything similar.

Secondly we should always reference classes with bracket notation in js:

Not:

className={styles.toolTip}
className={styles.p}

but:

className={styles['tool-tip']}
className={styles['p']}

lastly we should add a section where rgba is allowed instead of hex specifically for shadows and similar css where hex colors are generally a worse option

For updating our wiki based on what i have worked with when refactoring, we need to add 3 conventions. Firstly that we should always use kebab-case for class names `.example-xxx` and not `.exampleXxx` or anything similar. Secondly we should always reference classes with bracket notation in js: Not: ``` className={styles.toolTip} className={styles.p} ``` but: ``` className={styles['tool-tip']} className={styles['p']} ``` lastly we should add a section where rgba is allowed instead of hex specifically for shadows and similar css where hex colors are generally a worse option
Collaborator

Research looks good and is understandable, and should be added to the wiki.

Research looks good and is understandable, and should be added to the wiki.
Collaborator

Added to the wiki.

Added to the [wiki.](https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/CSS-Coding-Convention)
Author
Collaborator

Great job! Will close this issue.

Great job! Will close this issue.
Sign in to join this conversation.
No milestone
No project
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#870
No description provided.