processing / processing/p5.js-website

Feature: Standardize HTML class attribute naming (className → class)

Open
#989 4 comments 0 reactions 1 assignee View on GitHub

@hxrshxz is already working on this.

Since Apr 5, 2026.

Feature Request
Dominant language
MDX
Stars
96
Forks
322
Avg merge
5d 22h
Merged PRs (30d)
8

Description

Increasing Access

Making the code style consistent helps keep the project easier to read and understand, especially for new contributors. Right now, some parts of the code use className and others use class. Sticking to class everywhere follows Preact’s best practices and standard HTML, which makes things simpler and less confusing for everyone.

Most appropriate sub-area of p5.js?

Code Quality / Refactoring

Feature request details

Description

This is a code quality improvement to standardize the use of HTML class attributes throughout the codebase.

Current Issue

The codebase inconsistently uses both className and class attributes. Some files use class, others use className, and some mix both within the same file.

Proposed Solution

Replace all instances of className with class throughout the codebase to maintain consistency with Preact best practices.

Files That Need Updates (74 total instances across 23 files)

High Priority - TSX/JSX Components (54 instances):
  • src/components/Icon/index.tsx - 20 instances
  • src/components/SearchResults/index.tsx - 10 instances
  • src/components/Dropdown/index.tsx - 9 instances
  • src/components/CodeEmbed/index.jsx - 7 instances
  • src/components/AccessibilitySettings/index.tsx - 6 instances
  • src/components/ReferenceSidebar/index.tsx - 6 instances
  • src/components/ReferenceDirectoryWithFilter/index.tsx - 5 instances
  • src/components/Sidebar/JumpToSection/index.tsx - 5 instances
  • src/components/CircleButton/index.tsx - 2 instances (lines 7, 18)
  • src/components/CodeFrame/index.tsx - 2 instances (lines 34, 38)
  • src/components/Nav/MainNavLinks.tsx - 2 instances (lines 87, 99) MIXED with class
  • src/components/CopyCodeButton/index.tsx - 1 instance (line 39)
  • src/components/Sidebar/index.tsx - 1 instance (line 49)
Medium Priority - Astro Components (4 instances):
  • src/components/LinkButton/index.astro - 1 instance (line 11)
  • src/components/PaginationNav/index.astro - 1 instance (line 12)
  • src/components/PageHeader/HomePage.astro - 1 instance (line 23)
  • src/components/PageHeader/ItemPage.astro - 1 instance (line 23)
Lower Priority - Layout Files (13 instances):
  • src/layouts/ReferenceItemLayout.astro - 4 instances (lines 33, 42, 44, 52) MIXED with class
  • src/layouts/TextDetailLayout.astro - 3 instances (lines 23, 32, 34)
  • src/layouts/TutorialLayout.astro - 3 instances (lines 23, 32, 34)
  • src/layouts/ContributorDocLayout.astro - 1 instance (line 21)
  • src/layouts/ExampleLayout.astro - 1 instance (line 21)
  • src/layouts/PeopleLayout.astro - 1 instance (line 21)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.