What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

color:Canvas is White

martin.leese

New member
Joined
Sep 22, 2024
Messages
2
Reaction score
0
HTML Coins
0
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
 

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back