The :nth-last-child selector allows you select one or more elements based on their source order, according to a formula. It is defined in the CSS Selectors Level 3 spec as a “structural pseudo-class”, meaning it is used to style content based on its relationship with parent and sibling elements. It functions the same as :nth-child except it selects items starting at
Posts By: Renat
:nth-child
The :nth-child selector allows you to select one or more elements based on their source order, according to a formula. It is defined in the CSS Selectors Level 3 spec as a “structural pseudo-class”, meaning it is used to style content based on its relationship with parent and sibling elements. Suppose we are building a CSS grid, and want
:not(s)
The :not(X) property in CSS is a negation pseudo class and accepts a simple selector as an argument. Essentially, just another selector of any kind. :not matches an element that is not represented by the argument. The passed argument may not contain additional selectors or any pseudo-element selectors. /* the X argument can be replaced with any simple selectors */ :not(X) {
:matches()
The :matches pseudo-class is described as a functional pseudo-class by the official CSS Selectors Level 4 specifications. It doesn’t serve any purpose in itself except making some complex selectors lighter by allowing them to be grouped. In a way, we can think as:matches as syntactic sugar. Basically it keeps you away from repeating a compound selector when there is only one