CSS selector specificity
When two selectors have same style, then one with higher specificity wins. In case they have same specificity, the one which come later, wins. Specificity read more
Linux/Unix – How to go to previous directory
To go to previous working directory is Linux is a frequently occurring need. These are two ways to achieve it: Using dash (-) $ cd read more
Use universal selector to get all DOM nodes in vanilla Javascript
The universal selector (*), matches the name of any element type. It matches any single element in the document tree. Some ways it can be read more
CSS :nth-last-of-type
CSS :nth-last-of-type(an+b) pseudo class represent all sibling elements of same type whose sibling position is obtained by putting n=0,1,2,3… and so on counting from last. read more
CSS :nth-last-child
CSS :nth-last-child(an+b) pseudo class represent all sibling elements whose sibling position is obtained by putting n=0,1,2,3… and so on from last. Note that sibling can read more
CSS :not – negation pseudo-class
Css negation pseudo-class, :not(X) can be used on any simple selector. It will match element which are not selected by selector X. Example – css read more
CSS :empty – define style for empty element
Css :empty pseudo-class represents an element that has no children at all. Few cases <p></p> is considered empty <div>hello</div> is not considered empty Example – read more
CSS :only-of-type – define style of only child a type
Css :only-of-type pseudo class represents an element that has a parent element and whose parent element has no other element children of same type. Example read more
CSS :only-child – define style if element if only child
Css :only-child pseudo class represents an element that has a parent element and whose parent element has no other element children. Example – css :only-child read more
CSS :nth-of-type
CSS :nth-of-type(an+b) pseudo class represent all sibling elements of same type whose sibling position (starting from 1) is obtained by putting n=0,1,2,3… and so on. read more