Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the vertical bar (|) valid CSS, or Firefox-specific?

I noticed this rule in Firebug:

*|*:link {
  color:#0000EE;
}

I'm not sure that I've ever seen the vertical bar (|) before. It's in the about:PreferenceStyleSheet so it may be Firefox-specific.

What does it mean? Any link to a reference? I thought possibly that the vertical bar was an "OR", but that's the comma in CSS.

like image 756
Keith Bentrup Avatar asked Sep 14 '09 13:09

Keith Bentrup


People also ask

What is the valid CSS rule?

The :valid CSS pseudo-class represents any <input> or other <form> element whose contents validate successfully. This allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.

Which of the following is a valid CSS selector?

The :valid selector selects form elements with a value that validates according to the element's settings. Note: The :valid selector only works for form elements with limitations, such as input elements with min and max attributes, email fields with a legal email, or number fields with a numeric value, etc.

What is the importance of CSS selectors Where do you use them?

In CSS, selectors are used to target the HTML elements on our web pages that we want to style. There are a wide variety of CSS selectors available, allowing for fine-grained precision when selecting elements to style.


1 Answers

The | selector is the namespace selector. The part before the | is the namespace and the part after the | the selector.

So *|*:link means to match any element in any namespace that is a link.

like image 107
Gumbo Avatar answered Oct 28 '22 15:10

Gumbo