processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.2k stars 3.23k forks source link

Add guideline about chaining to style guide #6797

Closed meezwhite closed 4 months ago

meezwhite commented 5 months ago

Increasing access

Improve style guide to prevent future inconsistencies in docs.

Most appropriate sub-area of p5.js?

Feature enhancement details

In reference to https://github.com/processing/p5.js/issues/6400#issuecomment-1709419148, as proposed by @nickmcintyre, to add guideline about chaining functions to styleguide.

// Nope.
fill(0)
  .strokeWeight(0)
  .textSize(10);

// Nope.
fill(0).strokeWeight(0).textSize(10);

// Yep.
fill(0);
strokeWeight(0);
textSize(10);
Anayverma commented 5 months ago

Hey @meezwhite I would like to work on this issue. Please assign it to me.

limzykenneth commented 5 months ago

Yes I think that is fine to add, @meezwhite you can go ahead with a PR if you like.