Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the * * CSS selector do?

Recently I came across * * in CSS.

Site reference - Site Link.

For a single * usage in CSS style sheet, Internet and Stack Overflow is flooded with examples, but I am not sure about using two * * symbol in CSS.

I googled it, but unable to find any relevant information about this, as a single * selects all elements, but I am not sure why the site used it twice. What is the missing part for this, and why is this hack used (if it is a hack)?

like image 977
swapnesh Avatar asked Mar 25 '13 04:03

swapnesh


People also ask

What is the purpose of * In a selector?

Answer. Answer: A selector is one of the properties of the object that we use along with the component configuration. A selector is used to identify each component uniquely into the component tree, and it also defines how the current component is represented in the HTML DOM.

What is the purpose of * wildcard in a selector in C?

1. Asterisk (*): It is used for replacing 1 or more characters from a selector attribute.


1 Answers

Just like any other time you put two selectors one after another (for example li a), you get the descendant combinator. So * * is any element that is a descendant of any other element — in other words, any element that isn't the root element of the whole document.

like image 101
hobbs Avatar answered Sep 17 '22 20:09

hobbs