-1

I'm studying HTML using Codecademy.

I saw this code just right now, but I've never seen it before while I was studying

.color .swatch > div { flex-grow: 1; border-right: 10px solid #e6e6e6;}

What is the ">" option means? and What is that option name?

Silvea
  • 11
  • 1
  • 1
    see this link: https://stackoverflow.com/questions/4459821/css-selector-what-is-it – Alireza HI Dec 21 '19 at 10:59
  • 3
    Does this answer your question? [What does the ">" (greater-than sign) CSS selector mean?](https://stackoverflow.com/questions/3225891/what-does-the-greater-than-sign-css-selector-mean) –  Dec 21 '19 at 11:00
  • Thanks a lot to all of you. I understood it in more detail! XD – Silvea Dec 21 '19 at 11:10

1 Answers1

0

It's the 'Child selector' (a lot more info: https://css-tricks.com/child-and-sibling-selectors/)

It only selects elements which are immediate childs rather than anything under the parent.

Taken from the link above:

ul li { margin: 0 0 5px 0; }
ul > li { margin: 0 0 5px 0; }

The first will select any li under a ul, so this would include sub-lists. The second selects li which are direct children of a ul.

Augusto
  • 28,839
  • 5
  • 58
  • 88