color:Canvas is White

martin.leese

New member
I am trying to use color:Canvas in CSS to obtain the background color of the webpage. However, Canvas is being set to "White". I have created a toy webpage to illustrate my problem; please view the code (Ctrl-u) to see the HTML + CSS. Visit: TestCanvas1.html

In an internal stylesheet, I have set the background-color to "Aqua" for the <body> element, but the text color of the <button> element is set to "White". In an old browser that does not recognize color:Cursor (it does recognize color:Window) the button text remains set to "Yellow". Why is the <button> text color "White" and not "Aqua"?

Many thanks for any help you can give.
 
I am trying to use color:Canvas in CSS to obtain the background color of the webpage. However, Canvas is being set to "White". I have created a toy webpage to illustrate my problem; please view the code (Ctrl-u) to see the HTML + CSS. Visit: TestCanvas1.html

In an internal stylesheet, I have set the background-color to "Aqua" for the <body> element, but the text color of the <button> element is set to "White". In an old browser that does not recognize color:Cursor [should say Color:Canvas] (it does recognize color:Window) the button text remains set to "Yellow". Why is the <button> text color "White" and not "Aqua"?

Many thanks for any help you can give.

As far as I can tell, the CSS System Colors Canvas and CanvasText are intended for use with "color-scheme:". I am not using them in this way, and presume that is why they are not behaving as I expect. The question why they are initialized to "White" and "Black" would be better asked on a forum where there are posters with access to the code a browser is written in. Such posters could then look in the code.

However, I wont be doing this. Instead, I have developed a solution to my problem using JavaScript.

Regards,
Martin
 
Back
Top