These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:03 pm Advanced search

canvas for decoration?

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

canvas for decoration?

Postby fulg » Tue Jun 12, 2012 12:45 pm

For img, the spec says:
The img element must not be used as a layout tool.


And:
If an image is decorative but isn't especially page-specific — for example an image that forms part of a site-wide design scheme — the image should be specified in the site's CSS, not in the markup of the document.


Afair, something like that is missing in the specification of the canvas element:
The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly.


One could interpret that "visual images" means decorative images, too. So one could argue that using canvas for a background animation (like sparkling stars on a blog about frogs; so this animation is not "content") would be allowed.

But it isn't, is it? canvas should be used for content images only, right?
fulg
<h5>
 
Posts: 10
Joined: Mon Jun 11, 2012 10:06 pm

Re: canvas for decoration?

Postby zcorpan » Sat Jun 16, 2012 12:15 pm

Yeah, I guess the spec could be a bit clearer about the canvas element. Could you file a spec bug, please? :)
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: canvas for decoration?

Postby fulg » Sat Jun 16, 2012 1:56 pm

Okay, I'll create an issue (in the next days) and report back.
fulg
<h5>
 
Posts: 10
Joined: Mon Jun 11, 2012 10:06 pm

Re: canvas for decoration?

Postby fulg » Thu Jun 21, 2012 2:00 am

fulg
<h5>
 
Posts: 10
Joined: Mon Jun 11, 2012 10:06 pm

Re: canvas for decoration?

Postby fulg » Sat Sep 15, 2012 10:18 pm

Update: WHATWG added "that <canvas> can be used for art".

I'm not sure if "decoration" falls under the tem "art", though.
fulg
<h5>
 
Posts: 10
Joined: Mon Jun 11, 2012 10:06 pm

Re: canvas for decoration?

Postby Haider01 » Thu Oct 30, 2014 7:41 am

What's the use case?
Haider01
<h6>
 
Posts: 1
Joined: Thu Oct 30, 2014 7:31 am


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest