Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Native CSS Nesting and @scope: Component Styles Without a Preprocessor
Native CSS nesting makes writing shorter but isolates nothing; @scope makes a rule apply from a scope root down to a limit and keeps user content out with a donut scope. We rewrite the Bookstore card with nesting and prove with a computed-style hash that nothing changed, and measure how & differs from Sass, the specificity coming from :is(), proximity, and a comparison with Angular, ASP.NET Core CSS isolation and Shadow DOM.
JavaScript Scope, Hoisting and Closures: Where Do Variables Live?
We learn global, function and block scope, the scope chain, how var, let, const and functions are hoisted, the TDZ, and closures through counters, private data and function factories, plus the closure-in-a-loop trap.
JavaScript Variables: let and const, Block Scope and the TDZ
We declare variables with let and const, and use examples to see reassignment versus mutation, block scope, naming rules, why var has been retired, and the TDZ.