Setting opacity to 0
See original GitHub issueI set opacity to 0 as follows:
h( "div", { class: "", style: { width: 15, height: 15, opacity: 0 }, oninsert: function(el) { checkEl = el; } }, "✔" )
Picodom is not outputting an opacity css style prop on the element. If I set it to 0.1 or higher it does.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
opacity - CSS: Cascading Style Sheets - MDN Web Docs
The opacity CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and...
Read more >HTML DOM Style opacity Property - W3Schools
The opacity-level of an element describes the transparency-level, where 1 is not transperant at all, 0.5 is 50% see-through, and 0 is completely...
Read more >How to Set Opacity of Images, Text & More in CSS
To set the opacity of a background, image, text, or other element, you can use the CSS opacity property. Values for this property...
Read more >opacity | CSS-Tricks
The opacity property in CSS specifies how transparent an element is. Basic use: div { opacity: 0.5; }. Opacity has a default initial...
Read more >How to Use the CSS Opacity Property | Webucator
The opacity property modifies the percent opacity of the element it's applied to. A setting of 0 means that the element should be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m gonna PR this so we can discuss over a possible solution and not about things sucking or not. ✌️
Here’s some interesting discussion: https://github.com/w3c/webcomponents/issues/519, https://github.com/w3c/webcomponents/issues/519#issuecomment-234302745
I think doing
String(value[i]) || ""
might not be the best answer, because other values likefalse
ornull
would be stringified as well and you don’t wantopacity = "null"
. Maybe something like testing againstvalue[i]
not being null or undefined?:The most important thing would be to settle on the API first, should attributes accept only strings? how should other types be handled? And make it clear on the documentation.