question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opacity and rgba()

See original GitHub issue

@davidmanzanares

is it expected behaviour that opacity: 0.5 (for example) doesn’t work if color is defined in rgba() where a=1?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
davidmanzanarescommented, Feb 13, 2018

Thanks @elenatorro ! you reminded me of the opacity layer @makella talked with me some time ago, this is not the same as feature opacity and would require its own property for sure.

So… another problem on the table 😂

1reaction
elenatorrocommented, Feb 13, 2018

Hi 😃 I am writing a comment here just to point how opacity and alpha channels usually work in CSS. Of course, this is totally different to CSS, but since maybe many users would use the renderer having this field of knowledge, it may be possible that they expect the same behaviour.

  • When using an alpha channel with rgba (or hsla), this opacity value is applied only in the property it refers to (i.e: the border, the background, the font…)
  • When using the opacity property, the opacity value applies to all the elements.

I have no idea how this affects the renderer and, AFAIK, since it works in layers, we may not need to have an opacity property. I wanted to add this information just in case it could be useful 😃 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to control color opacity with RGBA in CSS - Flywheel
The RGB color model offers tones that are flat and solid, nothing else. What if you wanted to specify opacity? Let's talk about...
Read more >
Opacity Vs RGBA: Which One Is Better In CSS? - Meetanshi
'A' stands for alpha in rgba() which defines the opacity as a number between 0.0 and 1.0. Here, 0.0 identifies 'fully transparent' and...
Read more >
rgba() - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The rgba() functional notation expresses a color according to its red, green, and blue components. An optional alpha component represents ...
Read more >
A brief introduction to Opacity and RGBA - CSS3.info
Opacity sets the opacity value for an element and all of its children; RGBA sets the opacity value only for a single declaration....
Read more >
Is it possible to change only the alpha of a rgba background ...
Is it possible to write a single css style that will change only the opacity of the rgba attribute? A quick example of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found