Adding a box around the image
Briefly

By removing calc from the CSS, you can set flex properties more explicitly, using fixed pixel values instead for consistent box sizing.
To maintain blue and green boxes, manage state through JavaScript to prevent reverting to the default styles after letter removal.
Using data attributes like data-blank allows for an easier identification of non-content squares, enabling different styling based on their status.
Choosing between data attributes and classes for styling can depend on personal preference, both methods serve to differentiate elements effectively.
Read at SitePoint Forums | Web Development & Design Community
[
|
]