Closed Bug 1202357 Opened 9 years ago Closed 6 years ago

[gaia-radio] support disable style and attribute

Categories

(Firefox OS Graveyard :: Gaia::Components, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: gasolin, Unassigned)

References

Details

in bug 1194045 we need disable the radio selection in some condition, but currently gaia-radio does not support it.
Kevin I found a use case that need gaia-radio disabled state, but adding 

```
#radio:disabled ~ span:after {
  opacity: 0.4;
}
```

seems not work. Could you help or guide me to patch for the correct state?
Flags: needinfo?(kevingrandon)
It would likely be something like `#radio[disabled] ~ span:after {`, my guess is that the pseudo selector might not work on a custom element. I'm happy to fix this later this week, unless someone takes it first.
Fred - I just saw that we had this definition inside of settings.css: https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/style/settings.css#L290

Arguably we may want some code inside of the component to handle this, but for now we can re-use the existing style to do so?
Flags: needinfo?(kevingrandon) → needinfo?(gasolin)
Thanks for point out that, add `gaia-radio[disabled]` in settings.css works. 

I'm happy to stick with this solution in bug 1194045, but would left this issue open for future update.
Component: Gaia → Gaia::Components
Flags: needinfo?(gasolin)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.