distums / distums.github.io

my personal blog
https://distums.github.io/
0 stars 0 forks source link

frontend jargon #18

Open distums opened 7 years ago

distums commented 7 years ago

parse HTML

div.innerHTML = '<div>One</div><div>Two</div>'
new DOMParser().parseFromString('<div><b>Hello!</b></div>', 'text/html')
document.createRange().createContextualFragment('<div>One</div><div>Two</div>')

detail

distums commented 7 years ago

CSS Standards

HTML5 Standards

Security

HTTP

distums commented 7 years ago

CSS Features

:focus-within

detail

display:flow-root

exmaple

pointer-events

detail

meta theme-color

detail

container query

container-query-discussion

Feature Queries

detail using-feature-queries-in-css

attr function

detail

display: contents.

mask-image

distums commented 7 years ago

Hindley-Milner type signatures

distums commented 7 years ago

PRPL

distums commented 7 years ago

flex size compute

flex-item的宽度计算:

设有n个flex-item,每个flex-item的flex-basis,flex-grow,flex-shrink值分别为:bi,gi,si,(0<i<=n) 则总宽度为bw=b1+b2+...+bn,令当前window宽度为w,则宽度变化为offset=w-bw; 如果offset>0,则wi=bi+offset(gi+/(g1+g2+...+gn)), 如果offset<0,则wi=bi-|offset|(si/(s1+s2+...+sn))。

demo

distums commented 6 years ago

安全