[css-color-5] Add `currentBackgroundColor` Variable
## What `currentBackgroundColor`(or `currentBackground`) would be a variable similar to `currentColor`, the difference being that `currentBackground` is based on the background color rather than the (text) color of the element. ## Use Cases When used with [CSS color functions](https://www.w3.org/TR/css-color-5/), `currentBackground` enables dynamic styling based on the block of color which is predominant in the element. ### Borders and Hover Effects Currently, a popular pattern is to use the currentColor variable for an outline or border on a link or button. Sometimes, this is then swapped on hover. The effect is limited using `currentColor`. Another note is that the color options for foregrounds are often more limited with accessibility being a primary concern. currentBackground enables more subtle dynamic borders without sacrificing accessibility.  https://codepen.io/una/pen/BajmGwZ An example with filter cards:  ### Setting Foreground Color `currentBackground` also affords us more flexibility with hover/focus effects, and even allows us to set `currentColor` in a dynamic way. This is also a continuation of the last example where we use currentColor for the borders in the example on the le
Posted by una on Jul 6, 2020, 8:55 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
[css-color-5] Add `currentBackgroundColor` Variable
## What `currentBackgroundColor`(or `currentBackground`) would be a variable similar to `currentColor`, the difference being that `currentBackground` is based on the background color rather than the (text) color of the element. ## Use Cases When used with [CSS color functions](https://www.w3.org/TR/css-color-5/), `currentBackground` enables dynamic styling based on the block of color which is predominant in the element. ### Borders and Hover Effects Currently, a popular pattern is to use the currentColor variable for an outline or border on a link or button. Sometimes, this is then swapped on hover. The effect is limited using `currentColor`. Another note is that the color options for foregrounds are often more limited with accessibility being a primary concern. currentBackground enables more subtle dynamic borders without sacrificing accessibility.  https://codepen.io/una/pen/BajmGwZ An example with filter cards:  ### Setting Foreground Color `currentBackground` also affords us more flexibility with hover/focus effects, and even allows us to set `currentColor` in a dynamic way. This is also a continuation of the last example where we use currentColor for the borders in the example on the le
Comments (0)
No comments yet. Start the discussion.