You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
The CSS border on canvas does have this side effect; sometimes using box-sizing: border-box along with borders can be helpful. Another solution to this is to place the canvas inside a div, for example as in:
function setup() {
let container = createDiv();
container.id("sketch-container");
canvas = createCanvas(400, 400);
canvas.parent(container);
}
function draw() {
background(0);
rect(mouseX, mouseY, 50, 50)
}
And in the CSS:
#sketch-container {
display: inline-block;
border: 20px darkslategrey groove;
}
Most appropriate sub-area of p5.js?
p5.js version
1.9.4
Web browser and version
130.0.6723.117 (Official Build) (64-bit) (cohort: Stable)
Operating system
Steps to reproduce this
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: