Loading…
Loading…
CSS
A complete, current CSS course for students and working developers: selectors and the cascade, units and color, the box model, flexbox and grid, positioning and anchor positioning, responsive and container queries, typography, effects, animation and view transitions, and CSS architecture. 126 articles with practice quizzes.
Sizing relative to the browser window: vw, vh, vmin, vmax, vi and vb, the 100vh problem on phones and the small, large and dynamic units that solve it, scrollbars and 100vw, the on-screen keyboard, and accessible viewport-based font sizes.
kvi5hnuCode Sprout team member8 minWhat CSS lengths mean: absolute units and the CSS pixel, em and why it behaves differently in font-size, rem and root-relative units, ch, ex, cap, ic and lh, how user font settings and zoom affect each, and rules for choosing units.
kvi5hnuCode Sprout team member9 minThe building blocks of CSS values: keywords and custom identifiers, strings and escapes, url(), images, integers, numbers, percentages and fr, reading MDN's value syntax, out-of-range values, and the stages from declared to computed and used values.
kvi5hnuCode Sprout team member10 minHow @scope limits rules to a part of the document: the scope root and :scope, scope limits for donut scoping, implicit scopes in a style element, why the root adds no specificity, scope proximity in the cascade, and how @scope compares with BEM, nesting and shadow DOM.
kvi5hnuCode Sprout team member8 minWriting rules inside rules in plain CSS: implicit descendants, the & nesting selector, nested @media, @supports and @layer, how nesting desugars into :is() and what that means for specificity, the 2024 change to declaration order, and Sass differences.
kvi5hnuCode Sprout team member8 minHow @layer groups styles into ordered layers that beat specificity: declaring the order, anonymous and nested layers, importing third-party CSS into a layer, unlayered styles, the reversed order for !important, revert-layer and a practical structure.
kvi5hnuCode Sprout team member8 minHow shorthands such as margin, font, background and flex expand into longhands, why omitted parts reset to initial values, the one-to-four value pattern for sides, value orders that trip people up, and shorthands with the cascade and var().
kvi5hnuCode Sprout team member8 minThe keywords every property accepts: inherit, initial and unset, revert for returning to browser defaults, revert-layer and the new revert-rule for undoing only part of the cascade, and the all property for resetting everything at once, with the traps of each.
kvi5hnuCode Sprout team member8 minThe full algorithm for choosing between conflicting declarations: origins, !important and why it reverses origin order, shadow DOM context, inline styles, layers, specificity, scope proximity and source order, plus animations and HTML attributes.
kvi5hnuCode Sprout team member10 minHow properties pass from parent to child: which inherit and which don't, why children inherit computed values (the line-height trap), why inherited values lose to any matching rule, why form controls ignore your fonts, and special cases.
kvi5hnuCode Sprout team member9 minHow browsers weigh selectors against each other: the three specificity columns, what counts in each, :is(), :not(), :has(), :where() and :nth-child(of), why columns never carry over, inline styles and !important, and practical ways to keep specificity low and predictable.
kvi5hnuCode Sprout team member9 minHow CSS works with shadow DOM: encapsulation and what crosses it, :host and :host(), ::slotted(), ::part() and exportparts, custom properties as a theming API, :state() and :defined, and how the cascade orders inner and outer styles.
kvi5hnuCode Sprout team member10 minStyling parts of a document that aren't elements: ::before and ::after, ::first-letter and ::first-line and their property limits, ::marker, form control parts, highlights such as ::selection and ::target-text, ::backdrop and ::cue.
kvi5hnuCode Sprout team member11 minThe functional pseudo-classes that take selector lists: :is() for shorter selectors and forgiving lists, :where() for zero specificity, :not() for exclusions and its traps, and :has() for selecting parents and previous siblings, with its limits.
kvi5hnuCode Sprout team member9 minPseudo-classes that react to state: :link, :visited and its privacy limits, :target, :hover and :active on touch screens, :focus-visible and :focus-within, form states from :checked to :user-invalid, :open, :popover-open and :modal, media states, and :lang() and :dir().
kvi5hnuCode Sprout team member14 minSelecting elements by their position among siblings: :first-child, :last-child and :only-child, the of-type variants, :nth-child() with an+b formulas, odd and even, the of S filter, :nth-last-child(), quantity queries, :root and :empty, and the common mistakes with each.
kvi5hnuCode Sprout team member10 minSelecting elements by their place in the document tree: parents, children, ancestors and siblings, the descendant, child (>), next-sibling (+) and subsequent-sibling (~) combinators, reading selectors right to left, why selectors ignore proximity, and when to prefer classes.
kvi5hnuCode Sprout team member9 minSelecting elements by their attributes: [attr] for presence, [attr=value] for exact values, ~= for words, |= for language codes, ^=, $= and *= for prefixes, suffixes and substrings, the i and s case flags, quoting rules, and practical uses such as external links, file types and ARIA states.
kvi5hnuCode Sprout team member8 minThe building blocks of every selector: type selectors, the universal selector, classes and multiple classes, IDs and why to prefer classes, compound selectors, grouping selectors into lists, and how to name classes well.
kvi5hnuCode Sprout team member9 minHow to use new CSS safely: start from a working baseline and add enhancements, using the cascade's error handling for fallbacks, @supports feature queries with and, or, not and selector(), forgiving selectors, and how to choose a browser support target.
kvi5hnuCode Sprout team member10 min