Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230886

It it possible to format things inside an ion-select popover?

$
0
0

I’ve customised an ion-select but one thing that’s bothering me is the inability to customise the popover.

The following works fine:

ion-popover {
  --width: 100%;
}

Which is great. However, I’m unable to work with anything other than the documented css custom variables of the popover. I’ve had a look at the DOM, and I can see that htere is lot going on in there. A few things I’ve tried are:

  // Turn ALL text dark gray!
  ion-popover::part(content) {
    color: var(--dark-gray);
  }

  ion-popover::part(content) * {
    all: inherit;
  }

And also this, on the assumption that I could apply the styles to the actual text I care about in the nested ion-radio elements, without caring about the complicated DOM nesting structure.

  ion-radio::part(label),
  ion-radio::part(container) {
    --color: var(--dark-gray); /* Styles the label part of radio buttons */
    color: var(--dark-gray);
  }

What I was really hoping to do was apply dark-gray to all except the currently selected (gray!). But none of the above worked.


Viewing all articles
Browse latest Browse all 230886

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>