I have been asked to increase the font size of the items in the drop down lists in my app.
I am able to identify the css style for list items and can change these using the inspector in the browser but these changes are only temporary and entering the css updates in Glide does not persist these changes when the browser is refreshed. Something is overriding my custom CSS.
I found this topic which is closed so I am curious if there is another thread that addresses this need.
would love any guidance. THANKS
Here’s the CSS that works in the inspector but has no effect in the glide app
span.wire-dropdown___StyledSpan-p3ti25-10.efWkME {
font-size: 21px !important;
color: green !important;
}
Here’s what the google AI tells me to apply the style to every item in the list. this works in the inspector but NOT in the app
/* #r3: li {
color: red !important;
font-size: 40px !important;
} */
#r3\ li.wire-dropdown___StyledLi-p3ti25-8.gPJonX span {
color: green !important;
}
You made a good point here. The dropdown has a special setup. The “list” that opens up belongs to another “layer” compared to the original choice component.
Let’s say “normal” layer for the choice before opening the dropdown, and “overlay” for the part that only shows up when you open.
I expected Glide to tie that “overlay” to the custom-class-name part as well, but actually it doesn’t.
The unique thing about those is an ID, in this format “:r[3-digit number]” but I don’t know if I should trust it or not (e.g: :r196, :r197, :r198).
doh. enabled it and i am seeing style changes to the items in the drop down list - although i had made earlier changes using span.wire-dropdown___StyledSpan-p3ti25-10.efWkME {
and my text is red… i will get this working now that you pointed me in the right direction.
There is a difference in this dropdown/button component that you can associate with the class name button[data-state="open"]. However, the query must be performed at a higher level—perhaps the root or body—to target this “select option”. I believe you can use a conditional to track it.
if there is a way to update this syntax like the DDL that would be cool. but I have a fixed set of users on dedicated tablets for the food pantry so this hack will suffice for now.
What are you trying to do here? I assume you’re targetting the text that appears as the “chosen” selection when you’re not opening the dropdown?
I’m not sure how this is relevant. Do you mean they have all checked your fix and it all worked on their devices?