ブラウザ向けのJavaScriptだとファイルサイズはある程度気になると思います。 この記事では、ファイルサイズの計測方法やボトルネックとなってるライブラリの見つけ方についてできるだけ簡単な方法をまとめます。 ファイルサイズと一言にいっても、ブラウザでは大体minifyしてから配布するのでminify後のファイルサイズも重要です。 ソースコード自体のファイルサイズ minifyしたファイルサイズ minify + gzipしたファイルサイズ コメントの多いソースコードはminifyするとかなり小さくなったりすることが多いので、ソースコード自体のファイルサイズでは比較しにくいです。 また、ソースコードにおいて assert モジュールを使っているとファイルサイズが10kb弱程度minify後で変わります。 assertモジュールは通常外しても問題ないので、unassertでビルド時に取り除き
はじめに 記事のタイトルからして今更感満載ですが,mouse eventのoffsetX,Yに関して長年勘違いをしていたので備忘録を残しておきます. offsetX,Y は要素内でのカーソル座標. javascriptで のようにしてマウスベントを登録した場合, event.offsetX,Yは下図のようにid=boxA要素の左上を原点とした座標値になります. 要素ってどれのこと? では下図のようにboxAの中にboxBがある状態で,boxAに対してmouseEventを付与した場合はどうなるでしょうか. この場合,event.offsetX,Yで取得される座標値は,そのイベントハンドラが付与されている要素(boxA)の左上を原点としたものではなく,マウスが載っている要素(boxB)の左上を原点とした座標値になります. なぜでしょうか. event.curerntTargetとevent.
UGURUS offers elite coaching and mentorship for agency owners looking to grow. Start with the free Agency Accelerator today. A clever idea for text-based spinners in CSS. You set the “keyframes” in the content, and cycle through them by moving the line of text to the left in the actual keyframes. <button>Loading <span class="loading"></span></button> .loading.bar2::after { content: "▁\A▂\A▃\A▄\A▅\
index.md Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well. My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most
Slides for my Talk about WebVR. Presented at BED-Con in Berlin 2016 (http://bed-con.org/2016/)
Module consumers! Frustrated by each module having its own wildly unique README format? Annoyed by modules that omit critical sections like API or Examples? Stuck scrolling through API docs before you even know what the module does? Module authors! Tired of making up your readme format every time you write it? Do you just want consistent readmes pre-populated with your module's name, description a
The Node ecosystem is powered by its modules. npm is the magic that makes it all go. In the course of a week, Node developers evaluate dozens of modules for inclusion in their projects. This is a great deal of power being churned out on a daily basis, ripe for the plucking, just as fast as one can write npm install. Like any ecosystem that is extremely accessible, the quality bar varies. npm does
These are some common causes of design, scalability, performance and maintainability issues I find when refactoring CSS for clients: Using units for setting line heightsUsing units when setting your line heights will make child elements inherit the computed value from their parent. The lack of relativity will force you to keep adding line-heights to override previous values: h1 { font-size: 48px;
We had CSS1, and CSS2. We even had CSS2.1 and we then moved onto CSS3 – or did we? This post is a quick explanation of how CSS is versioned today. CSS versions 1 and 2 were monolithic specifications. All of CSS was included in one massive document. Selectors, positioning, colour – it was all in there. The problem with monolithic specifications is that in order to finish the spec, every component p
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く