5-Day Tutorial on UI Training for Interns at Wilderhood
- M
- B
- P
- C
z-index
- Inline elements: span, a, blockquote(?)
- in line with the previous element), width height doesn’t affect
- and snake like model.
- CSS attributes which affect plain text are also applicable to inline elements
- Block elements: div, p, hr, h1-h6, and most of it!
- One full rendering row (Doesn’t allow element before and after)
- Takes width and height
- Needs any 4 of the 6 direction attributes (top, bottom, left, right, width, height)
- Inline-block, img
- What if this is a block element if it can fit in the previous line
- First render it as block model and later check inline with the previous element
- CSS attributes which affects (both) block and inline elements affects inline-block elements (left, right, width, height, top, bottom)
- None: as if the element is not present in the DOM
- Compare with visibility:hidden (reserves space against of display:None)
- Flex: CSS-tricks (link)
- static is default whereas rest like ‘relative’, ‘absolute’ and ‘fixed’ are positioned elements
- Default rendering scheme of the browser
- Default means when parsing DOM, if element a’s opening tag comes before element b’s opening tag ==> a will be rendered left of b or top b or both
- fixed: fixes the position to the window
- Fixed = window +- delta
- Locked w.r.t to window
- delta means, delta left and delta top (or delta right and delta bottom vice versa)
- relative: relative to it’s own element
- absolute: positioned relative to the nearest positioned ancestor ( fixed | absolute | relative)
- By defining both left, right and/or top, bottom properties (direction properties), you can stretch the elements
> :before
> :after
Px, Pt, %, Ems, Rems, vw, vh
Selectors, Nested Selectors, hierarchical selectors, sibling selectors, specificity (id, class, attribute, element) (1000, 100, 10, 1)
` !IMPORTANT
Order of Precedence: external CSS < internal CSS(<style>) < inline CSS `
@include/import (one CSS in another file) Scss/Less
- Use % instead of pt,px (%ge is recursively computed) — 2005
- Use em instead of %ge
- Use rem instead of em
- device:print for printing purposes min-width, max-width would be A4, A3, vice versa
- device:media for printing media or media can be viewed in certain way
CSS Variables (not supported by all browsers)
Curriculum designed by Girish Ede