Web development

random assortment of HTML/CSS knowledge I return to often.

iframe targetting

edit target attribute for each link individually
edit target for all links on the frame with

CSS units

new viewport unit variants [dymanic, smallest, largest]

box-sizing

by default, borders aren't included in the dimensions of an element.

border-box means borders are included as part of the element, save the headache and do this.

* {
            box-sizing: border-box;
       -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

the perfromance hit of the universal selector [*] barely matters nowadays, so it should be okay for applying simple effects (so no animations, shadows, filters, etc..) on a basic site.

CSS Tip: Star Selector Not That Bad

shape-outside

shape-outside MDN Docs page

allows wrapping text smoothly around an element shaped as a square, circle, a polygon with specified boundaries, or an image.