Streaming live at 10am (PST)

How do I apply nested styles?


#1

Hello! I've created a <ul> with class .contact. I'd like for all of the <li>s within that list to be displayed inline. When I select my list item, though, click Style, and try to change the selector to the parent ul.contact, it doesn't let me. How do I apply nested styles like this, without resorting to applying the same class to every <li> within that <ul>?

Thanks!


When inside of CSS selector (Webflow Playground)
Targeting elements "when inside of" other elements
The new class selector
#2

Hi @michaelrkn. What you're trying to do is create a selector like this .contact li { display:inline }. Currently we don't have the functionality to target the li's like this in Webflow. We are actually in the process of designing a solution. I also find myself needing this over and over because it makes the code much cleaner.


#3

Good morning,

I'm already familiar with how to accomplish this with custom code. I was just curious to know if custom code was used or can you do that using just the Webflow tools? I don't remember seeing it covered in the tutorials.. if it was let me know and I'll look through again. Just don't want to do it again if it's not there or it's a future/old feature.

Never seen "When Located In" before or how to activate it.

Thanks


#4

Hey @thegrafiqlyfe this feature isn't available yet. We had it in the playground, but have not had the resources to built it into the designer. We hope to free up a little in order to work on it!


#5

Any update on this? I would say this is my number one feature request.


#6

@MikeStvnsn we're in the design process right now. thumbsup


#7

Same here! It would make the CSS much cleaner.


#8

keep it DRY webflow. keep it DRY smile


#9

Love seeing all the features Webflow is adding, but I'm sad this hasn't been prioritized! I can't imagine a serious developer using Webflow without it. I really hope you'll add this to Webflow proper - having it in the playground is such a tease wink


#10

Its been a long time since you guys said "We're currently working on this"...whats the current situation?


#11

Any news on this? I really hope you guys are working on this as this is very important in my opinion. Not having to add classes to nested elements is a big deal.


#12

Any update? I would like to see this feature soon! I need it.


#13

@thesergie Can you provide a ETA for this feature for now? :smiley:

I'm planning a project and making decisions ... this is one of the key factors to some of my decisions.

Thanks.

Cheers,

Diana


#14

I'm gonna go ahead and bump this a little... This feature really needs to be in Webflow for developers to consider using it. I've been waiting for this feature since I began using Webflow and somehow, even though many other updates have made it into Webflow, this feature that I would consider to be one of the highest-priority features has been left out. Webflow is great, but it is a major annoyance, even a flaw, to not be able to target nested styles. The fact that it's been in the playground for a long time is very worrisome and confusing as well... I hope they aren't intending to save this feature for some type of "Pro" account.


#15

It would save so much time hunting and tagging each element if nested styles were a function. Let us cascade, please! :slightly_smiling:


#16

Oh wait it's here already? I didn't realize until I dug into "affect all" and then saw nested. Is it fully baked in?


#17

Is it here already? I don't see it @dubblethink , could you post a screen snippet of where one can access this option? Thanks!


#18

Looks like I spoke too soon. The only nested ability is within rich text elements apparently. That's what I was styling at the time and actually thought it was universal :frowning:

https://help.webflow.com/article/how-to-nest-styles-in-webflow


#19

+1 This is a huge issue with this product. It would improve things majorly.


#20

Another begging +1 here. Along with the wider breakpoint, this is the killer for me that keeps webflow as a tool for rush jobs and prevents me using it for longer term work. Plus, it's plain annoying, especially as you've nailed the interface fr it in rich text elements :slight_smile: