Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the `&::` syntax in LESS CSS?

I've been looking at twitter bootstrap and came across some syntax and I do not know what it does:

From buttons.less:

button.btn,
input[type="submit"].btn {
  &::-moz-focus-inner {
  padding: 0;
    border: 0;
  }

What is the &:: in &::-moz-focus-inner for?

I know the & is for a 'parent selector' and that a : is part of the syntax for a pseudo selector such as :hover, but what is the second : for?

Ps. I've also been looking for a LESS syntax reference but I cannot find any documentation about LESS other than the one page at lesscss.org. Is there no documenation for LESS other than that one page?

like image 766
Zabba Avatar asked Feb 13 '12 07:02

Zabba


People also ask

What is this word the?

The word the is considered a definite article because it defines the meaning of a noun as one particular thing. It's an article that gives a noun a definite meaning: a definite article. Generally, definite articles are used to identify nouns that the audience already knows about.

What is the in grammar?

English has two articles: the and a/an. The is used to refer to specific or particular nouns; a/an is used to modify non-specific or non-particular nouns. We call the the definite article and a/an the indefinite article. the = definite article. a/an = indefinite article.

Where is the is used?

The is used to describe a specific noun, whereas a/an is used to describe a more general noun. For this reason, the is also referred to as a definite article, and a/an is referred to as an indefinite article. The definite article, the, is used before both singular and plural nouns when the noun is specific.

Why do we use the the?

Articles are used before nouns or noun equivalents and are a type of adjective. The definite article (the) is used before a noun to indicate that the identity of the noun is known to the reader. The indefinite article (a, an) is used before a noun that is general or when its identity is not known.


1 Answers

Copypaste from

http://www.evotech.net/blog/2007/05/after-v-after-what-is-double-colon-notation/

The double colon replaced the single-colon selectors for pseudo-elements in CSS3 to make an explicit distinction between pseudo-classes and pseudo-elements. For backward compatibility, the single-colon syntax is acceptable for pre-CSS3 selectors. So, :after is a pseudo-class and ::after is a pseudo-element.

This :: notation (double colon notation) was introduced by the W3 in order to “establish a discrimination between pseudo-classes and pseudo-elements. For compatibility with existing style sheets, user agents must also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and :after). This compatibility is not allowed for the new pseudo-elements introduced in CSS level 3.” For more information, visit W3.

like image 178
biziclop Avatar answered Oct 02 '22 14:10

biziclop