<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Today I learned. | ダーシノ(@bc_rikko)</title><description>フロントエンド関連で今日学んだことを共有</description><link>https://bcrikko.github.io/</link><item><title>dropdown vs. pulldown</title><link>https://bcrikko.github.io/til/posts/2021-04-16/pulldown-dropdown/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2021-04-16/pulldown-dropdown/</guid><description>dropdownはMicrosoft発で一般的に使われている。pulldownはApple発</description><pubDate>Fri, 16 Apr 2021 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>input要素で入力された値をvalueAsNumber、valueAsDateで取得する</title><link>https://bcrikko.github.io/til/posts/2022-04-04/valueasnumber-valueasdate/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-04-04/valueasnumber-valueasdate/</guid><description>input要素で入力されたものをinput#valueで取得すると、すべて文字列になってしまう。ただ&lt;input type=&quot;number&quot;&gt;や&lt;input type=&quot;date&quot;&gt;の場合は、文字列ではなく数値や日付オブジェクトとして取得したい。そのときにvalueAsNumberやvalueAsDateを使うことで、数値や日付オブジェクトとして取得できる。</description><pubDate>Mon, 04 Apr 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Cascade LayersでCSSフレームワークの詳細度を気にせずスタイリングする</title><link>https://bcrikko.github.io/til/posts/2022-04-05/css-cascade-layers/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-04-05/css-cascade-layers/</guid><description>CSS Cascade Layersが使えるようになると、CSSフレームワークを利用するときに詳細度の関係でカスタムスタイルが当たらないような状況に悩まされずにすむ。</description><pubDate>Tue, 05 Apr 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>dialog要素に::backdrop擬似要素が使えるようになった</title><link>https://bcrikko.github.io/til/posts/2022-04-15/dialog-backdrop/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-04-15/dialog-backdrop/</guid><description>Safari 15.4がdialog要素と::backdrop疑似要素をサポートし、全モダンブラウザで利用可能になった。dialog.style.display = &quot;none&quot; や dialog.style.display = &quot;block&quot; のようなスタイルの変更を行わずに、ダイアログの背景を制御できるようになった。</description><pubDate>Fri, 15 Apr 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript Playgroundで型情報をインライン表示する方法</title><link>https://bcrikko.github.io/til/posts/2022-04-23/type-on-playground/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-04-23/type-on-playground/</guid><description>TypeScript Playgroundででコードを書く際、インライン表示したい形の下に^?をコメントすることで、マウスオーバーしなくても型情報が表示される。スクショを撮るときに便利！</description><pubDate>Sat, 23 Apr 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アニメーションで三角関数を使う</title><link>https://bcrikko.github.io/til/posts/2022-05-11/trigonometric-function-with-web-animation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-05-11/trigonometric-function-with-web-animation/</guid><description>Web Animations APIを使うことで簡単にアニメーションを管理できる。CSSの@keyframesで10°ずつ座標を書き表すことは大変だが、JavaScriptを使うことでより柔軟にアニメーションを制御できる。</description><pubDate>Wed, 11 May 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Web Animations APIを使ったアニメーション管理方法</title><link>https://bcrikko.github.io/til/posts/2022-05-12/web-animation-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-05-12/web-animation-api/</guid><description>Web Animations APIを使うことで、UI上での複雑なアニメーションを管理しやすくなった。&quot;</description><pubDate>Thu, 12 May 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Type Guardで代入される側の型を絞り込む</title><link>https://bcrikko.github.io/til/posts/2022-06-13/typeguard/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-06-13/typeguard/</guid><description>TypeScriptでは、Type Predicateの引数に複数値を渡すことで型を検査できる。</description><pubDate>Mon, 13 Jun 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSだけでMasonryレイアウト（組積レイアウト）をする </title><link>https://bcrikko.github.io/til/posts/2022-07-07/css-masonry/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-07/css-masonry/</guid><description>Masonryレイアウト（組積レイアウト）をするにはJavaScriptが必須（jQueryのプラグインとか）だったが、Gridレイアウトの機能でCSSだけで実現できるようになった。</description><pubDate>Thu, 07 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ブラウザスクロールフルマラソン</title><link>https://bcrikko.github.io/til/posts/2022-07-08/fullmarathon-in-browser/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-08/fullmarathon-in-browser/</guid><description>CSSではユニットにcm（センチメートル）を使用できる。ただし、ブラウザのheightの限界は18.94kmなので、ハーフマラソンもできない。</description><pubDate>Fri, 08 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>JavaScriptでrangeジェネレータを作る</title><link>https://bcrikko.github.io/til/posts/2022-07-13/range-in-javascript/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-13/range-in-javascript/</guid><description>10〜20の範囲の数値をループで処理したい、みたいなケースがある。for文を使うことで実装可能だが、もっとわかりやすくするためにジェネレータを使ってrange関数を実装する。</description><pubDate>Wed, 13 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ReactにSOLID原則を適用する</title><link>https://bcrikko.github.io/til/posts/2022-07-19/solid-in-react/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-19/solid-in-react/</guid><description>主にオブジェクト指向プログラミングの文脈において語られるSOLID原則のエッセンスを、Reactを使ったフロントエンド開発に適用するヒント。</description><pubDate>Tue, 19 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>private constructorで目的別にインスタンス化する</title><link>https://bcrikko.github.io/til/posts/2022-07-21/private-constructor/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-21/private-constructor/</guid><description>TypeScriptでconstructorをprivateにすることで、目的別にインスタンスを生成できる。</description><pubDate>Thu, 21 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>単一責任選択の原則とストラテジーパターン</title><link>https://bcrikko.github.io/til/posts/2022-07-22/srp-storategy/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-07-22/srp-storategy/</guid><description>「単一責任の原則（Single Responsibility Principle）」は聞いたことあったが、「単一責任“選択”の原則」は初耳だった。簡単に説明すると「同じ条件分岐を書くなら処理をまとめること」を指している。</description><pubDate>Fri, 22 Jul 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ネストの深いところにある値の分割代入</title><link>https://bcrikko.github.io/til/posts/2022-08-03/deep-property/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-03/deep-property/</guid><description>分割代入を使うことで、オブジェクトのプロパティを変数として抜き出せる。深いところにあるプロパティを取得するためには、分割代入のときに同じような階層をつくる。</description><pubDate>Wed, 03 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Result型でエラーハンドリングする</title><link>https://bcrikko.github.io/til/posts/2022-08-04/typescript-result-type/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-04/typescript-result-type/</guid><description>Result型とは、成功と失敗の両方を表現できる型で、それぞれのハンドリングがしやすくなる。ただし、パターンマッチが使いたくなる。</description><pubDate>Thu, 04 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>複数個のパラメータを同時に型を絞る</title><link>https://bcrikko.github.io/til/posts/2022-08-23/multiple-type-guard/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-23/multiple-type-guard/</guid><description>TypeScriptのタイプガードは、基本1つのパラメータのみを扱うが、オブジェクトとして渡すことで複数個同時に型を絞ることができる。</description><pubDate>Tue, 23 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Type Guardを強制する</title><link>https://bcrikko.github.io/til/posts/2022-08-27/type-guard/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-27/type-guard/</guid><description>TypeScriptで複数の状態を持つEntityクラスを管理する際に、Type Guardしないと扱えないようにする。</description><pubDate>Sat, 27 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSレビューの「きっかけ」を見つける</title><link>https://bcrikko.github.io/til/posts/2022-08-29/bad-smell-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-29/bad-smell-css/</guid><description>私がCSSのコードレビューをする際、何を頼りにアタリをつけているかを言語化してみる。</description><pubDate>Mon, 29 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>min-widthとmax-widthが矛盾しているときのwidthの求め方</title><link>https://bcrikko.github.io/til/posts/2022-08-30/min-max-widths/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-30/min-max-widths/</guid><description>min-widthとmax-widthが同時に設定されており、かつその値に矛盾が生じている場合がある。（CSSを掃除しない人がやりがち）</description><pubDate>Tue, 30 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アクセシブルなファイル選択（input[type=&quot;file&quot;]）の作り方</title><link>https://bcrikko.github.io/til/posts/2022-08-31/accessible-file-input/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-31/accessible-file-input/</guid><description>SpinnerやLoaderを実装するとき、ローディングを表現するHTML要素がないのでspanやdivでマークアップすることが多い。ただ、そのままではスクリーンリーダーにとっては何も伝わらないのでアクセシブルな実装方法を考える。</description><pubDate>Wed, 31 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アクセシブルなSpinner/Loaderの作り方</title><link>https://bcrikko.github.io/til/posts/2022-08-31/accessible-spiner/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-31/accessible-spiner/</guid><description>SpinnerやLoaderを実装するとき、ローディングを表現するHTML要素がないのでspanやdivでマークアップすることが多い。ただ、そのままではスクリーンリーダーにとっては何も伝わらないのでアクセシブルな実装方法を考える。</description><pubDate>Wed, 31 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>margin-bottomに統一するための方法</title><link>https://bcrikko.github.io/til/posts/2022-08-31/avoid-margin-top/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-08-31/avoid-margin-top/</guid><description>marginは相殺が発生するプロパティなため、margin-topとmargin-bottomが混在しているとCSSのメンテがつらくなる。私はmargin-bottom教信者なので、それを布教したい。</description><pubDate>Wed, 31 Aug 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>JavaScriptとクラスのメモリ使用量</title><link>https://bcrikko.github.io/til/posts/2022-09-01/memory-in-js/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-01/memory-in-js/</guid><description>JavaScriptでクラスを使うときに、メンバ変数やStatic Classなどの使い方によっては無駄にメモリを消費してしまうことがある。以下のように大量のインスタンスを生成しテストを行い、ヒープメモリの使用量を調査した。</description><pubDate>Thu, 01 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>SPA時代のデータ更新時のUI表示戦略</title><link>https://bcrikko.github.io/til/posts/2022-09-02/modern-frontend-design/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-02/modern-frontend-design/</guid><description>レガシーなウェブUIは、リクエストが完了してから画面をレンダリングするため、ローダーやスピナーなどを表示して、レスポンスがあるまで待たなければならない。GitHubをはじめ、昨今のUIでは非同期で更新し、表示内容は即反映。リクエストに失敗したら元に戻す戦略を取っているサイトが多い。</description><pubDate>Fri, 02 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>innerHTMLの代わりにElement#setHTMLUnsafe()</title><link>https://bcrikko.github.io/til/posts/2022-09-05/sethtml-sethtmlunsafe/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-05/sethtml-sethtmlunsafe/</guid><description>Chrome 105からのExperimentalな機能としてElement#setHTML()が提供された。※2025-01-06現在は、Element#setHTMLUnsafe()に変わっている。昨今、ReactやVueなどのJavaScriptライブラリ/フレームワークを使う事が多いので、文字列をそのままHTMLとして扱うことはほとんどないと思う。ただし、レガシーなシステムでは今でも危険な実装が残っているかもしれないため、注意が必要だ。</description><pubDate>Mon, 05 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Interfaceの命名規則</title><link>https://bcrikko.github.io/til/posts/2022-09-13/interface-name/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-13/interface-name/</guid><description>私が元C#erなので、Microsoftっぽい命名規則に則ってInterfaceの名前を決めることが多い。単一メソッドを定義する場合、自分以外を操作するメソッド、または複数メソッドを提供する場合、標準的なクラス操作をする場合</description><pubDate>Tue, 13 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>overscroll-behaviorで他要素のスクロールを防ぐ</title><link>https://bcrikko.github.io/til/posts/2022-09-14/overscroll-behavior/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-14/overscroll-behavior/</guid><description>overscroll-behaviorを使うことで、スクロール可能な要素が重なっているときにポインターのある要素以外のスクロールを防ぐことができる。たとえばウェブサイトの右下にチャットボットを表示するとき、過去の会話を見ようとスクロールするとメインコンテンツまでスクロールしてしまう、という現象を防ぐことができる。</description><pubDate>Wed, 14 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Broadcast Channel APIで閲覧コンテキスト間で相互通信を行う</title><link>https://bcrikko.github.io/til/posts/2022-09-15/broadcast-channel-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-15/broadcast-channel-api/</guid><description>Broadcast Channel APIを使うことで、同一デバイス、同一オリジンにおいて任意のチャンネル名を指定し閲覧コンテキスト間（※）で相互通信ができる。※閲覧コンテキストとは、ウィンドウ、タブ、フレーム、iframwのこと。たとえば、ユーザーが別タブで別アカウントでログインしたことを検知してメッセージを表示するなどができる。</description><pubDate>Thu, 15 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>UIデザインをフロントエンドエンジニアはこう見ている</title><link>https://bcrikko.github.io/til/posts/2022-09-21/frontend-developers-point-of-view/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-21/frontend-developers-point-of-view/</guid><description>フロントエンドエンジニアが、デザイナーのつくったUIデザインを見たときの頭の中を整理してみる。私は、このUIデザインを見たときに「見た目」ではなく「構造」に着目して、どのような要素が含まれているか考える。できればこのレベルのことをデザイナーにもやってもらって、統一感のあるUIデザインをしてほしい。</description><pubDate>Wed, 21 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ドメインモデル貧血症が起こる瞬間を体験した</title><link>https://bcrikko.github.io/til/posts/2022-09-28/anemic-domain-model/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-28/anemic-domain-model/</guid><description>ひとからDDDの話を聞くと、だいたい語られる「ドメインモデル貧血症」が起こる瞬間を体験した。ドメインモデルがただのデータの塊になってしまい、ふるまい（ビジネスロジック）がほとんど含まれない状態が大量発生した。ただのgetter/setterを持つだけのデータクラスで、「コストは、データベースのマッピング」と書かれているとおり、思いっきりそのコストを払わされている。 </description><pubDate>Wed, 28 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 4.9 satisfies演算子</title><link>https://bcrikko.github.io/til/posts/2022-09-30/typescript-satisfies/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-09-30/typescript-satisfies/</guid><description>TypeScript 4.9 betaでsatisfies演算子が導入された。このようにして、`as const`と`Record&lt;K, V&gt;`のいいとこどりができるようになった。</description><pubDate>Fri, 30 Sep 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>コピーした要素のスタイルや属性を含めて貼り付ける</title><link>https://bcrikko.github.io/til/posts/2022-10-21/copy-and-paste-with-style/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-10-21/copy-and-paste-with-style/</guid><description>GitHubでコミットやIssueのリンクをコピー（Ctrl+C/Command+C）して、テキストエリアに貼り付ける（Ctrl+V/Command+V）と[リンクテキスト](URL)のような形式で貼り付けられる。他にもWebページの要素をコピーして、リッチテキストエディタなどに貼り付けるとスタイルも一緒に貼り付けられる。これらはClipboardEvent#clipboardDataのデータを読み取ることで実現可能だ。</description><pubDate>Fri, 21 Oct 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>オブジェクトのプロパティを連結してUnion型をつくる</title><link>https://bcrikko.github.io/til/posts/2022-10-21/properties-union/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-10-21/properties-union/</guid><description>オブジェクトのプロパティを連結して`Foo | Foo.Bar | Foo.Bar.Baz`のようなUnion Typeがほしいときがある。</description><pubDate>Fri, 21 Oct 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>読書会スタイル3選、ワールドカフェ、ジグソー法、アクティブ・ブック・ダイアログ</title><link>https://bcrikko.github.io/til/posts/2022-10-25/reading-club/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-10-25/reading-club/</guid><description>DDD読書会を開催するにあたり、いろいろな読書会スタイルについて調べた。本物のカフェのようにリラックスした雰囲気の中で、テーマに集中した対話を行います。</description><pubDate>Tue, 25 Oct 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>section要素で分けてもh1要素はページにつき1つだけ</title><link>https://bcrikko.github.io/til/posts/2022-10-27/h1-in-section/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-10-27/h1-in-section/</guid><description>昔々、まだHTML5の頃には、section要素で区切れば1ページ内で複数h1要素を使っても良いという仕様があった。HTML5が廃止され、HTML Living Standardが採用された現在では、h1要素はページに1つだけになっている。</description><pubDate>Thu, 27 Oct 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>カプセル化と情報隠蔽</title><link>https://bcrikko.github.io/til/posts/2022-10-29/encapsulation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-10-29/encapsulation/</guid><description>プログラミングにおけるカプセル化と情報隠蔽は、同じ意味として使われることが多い。しかし、厳密にはちょっとだけ異なる。</description><pubDate>Sat, 29 Oct 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 4.9に追加されたaccessorについて</title><link>https://bcrikko.github.io/til/posts/2022-11-07/typescript-4.9-rc</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-11-07/typescript-4.9-rc</guid><description>TypeScript 4.9にクラス内自動アクセサが追加された。以下のようにクラスのメンバ変数にaccessorをつけることで、getterとsetterを自動で生成される。accessorが追加された背景には、TypeScript 5.0で追加されるデコレータに必要になるらしい。</description><pubDate>Mon, 07 Nov 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CommonJSとESModulesのデュアルパッケージをつくる</title><link>https://bcrikko.github.io/til/posts/2022-11-11/dual-package/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-11-11/dual-package/</guid><description>rollupを使ってデュアルパッケ―ジを作る方法を紹介する。</description><pubDate>Fri, 11 Nov 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ChatGPTをしゃべらせる方法</title><link>https://bcrikko.github.io/til/posts/2022-12-09/chatgpt-talk/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2022-12-09/chatgpt-talk/</guid><description>Web Speech APIを使うことで、ChatGPTを簡単に喋らせることができる。</description><pubDate>Fri, 09 Dec 2022 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ドメイン駆動設計（エヴァンス本）の要点</title><link>https://bcrikko.github.io/til/posts/2023-01-11/ddd/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-01-11/ddd/</guid><description>ドメイン駆動設計（エヴァンス本）の要点</description><pubDate>Wed, 11 Jan 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ValueObjectが指すものとは？</title><link>https://bcrikko.github.io/til/posts/2023-01-19/valueobject/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-01-19/valueobject/</guid><description>ValueObjectには複数の意味がある。DDDの文脈に限ると「属性を表現するためのオブジェクトがValueObject」となる。</description><pubDate>Thu, 19 Jan 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ユーザーの満足度が高いモノ、低いモノ</title><link>https://bcrikko.github.io/til/posts/2023-01-24/what-users-want/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-01-24/what-users-want/</guid><description>ユーザーの満足度が高いモノ、低いモノ</description><pubDate>Tue, 24 Jan 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.0 Betaがリリースされた</title><link>https://bcrikko.github.io/til/posts/2023-01-30/typescript-5.0-beta</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-01-30/typescript-5.0-beta</guid><description>TypeScript 5.0 Betaがリリースされた。</description><pubDate>Mon, 30 Jan 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Arrayのイミュータブルメソッドが増えた</title><link>https://bcrikko.github.io/til/posts/2023-02-08/immutable-array-methods/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-02-08/immutable-array-methods/</guid><description>EMCAScript proposalが更新され、Arrayにイミュータブルメソッドが生えてくるらしい。</description><pubDate>Wed, 08 Feb 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>意図が伝わりやすいテストの書き方</title><link>https://bcrikko.github.io/til/posts/2023-02-10/readable-test/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-02-10/readable-test/</guid><description>ユニットテストでリテラルを使うか変数を使うか問題。いろいろ話を聞いて考えた結果をまとめる。</description><pubDate>Fri, 10 Feb 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ダイアログを開いたときのフォーカス</title><link>https://bcrikko.github.io/til/posts/2023-02-14/autofocus/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-02-14/autofocus/</guid><description>&lt;dialog&gt;でマークアップされていればautofocus属性があってもなくても関係なく最初のfocusableな要素にフォーカスされるみたいなので、現時点ではまだ考えなくても良さそう。</description><pubDate>Tue, 14 Feb 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>日本語でプログラミングする方法</title><link>https://bcrikko.github.io/til/posts/2023-02-17/japanese-programming/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-02-17/japanese-programming/</guid><description>我々日本人に英語文化のプログラミングは読みづらい。日本語でわかりやすくプログラミングしたい！</description><pubDate>Fri, 17 Feb 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アクセシブルWebフォーム</title><link>https://bcrikko.github.io/til/posts/2023-02-27/accessible-form/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-02-27/accessible-form/</guid><description>1つのinputフィールドに対してラベル、説明、エラーを紐づける方法。</description><pubDate>Mon, 27 Feb 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>実在主義とモデリング</title><link>https://bcrikko.github.io/til/posts/2023-03-02/existentialism/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-02/existentialism/</guid><description>同僚に教えてもらった資料に実在主義とモデリングの関連性が語られていた。</description><pubDate>Thu, 02 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>配列をフィルターする型 </title><link>https://bcrikko.github.io/til/posts/2023-03-03/filtered-type/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-03/filtered-type/</guid><description>TypeScriptの型も、配列のようにフィルターしたい。</description><pubDate>Fri, 03 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Reactで複数のrefを使いたいときの方法 </title><link>https://bcrikko.github.io/til/posts/2023-03-10/multi-ref/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-10/multi-ref/</guid><description>ときどき複数のrefを使いたいことがあるが、コンポーネントに渡せるrefはひとつだけなのでちょっとした対応が必要。</description><pubDate>Fri, 10 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Utilities、Helpers、その他 を避ける理由</title><link>https://bcrikko.github.io/til/posts/2023-03-13/avoid-utilities-helper/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-13/avoid-utilities-helper/</guid><description>Utilities、Helpers、&quot;その他&quot; は極力避けるべきだ。</description><pubDate>Mon, 13 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>「できないこと」を調べるのは難しい</title><link>https://bcrikko.github.io/til/posts/2023-03-13/cannot-do/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-13/cannot-do/</guid><description>「できないこと」を調べるのは悪魔の証明と同様に難しい。</description><pubDate>Mon, 13 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ユビキタス言語と命名について</title><link>https://bcrikko.github.io/til/posts/2023-03-14/ubiquitous-language/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-14/ubiquitous-language/</guid><description>Ubiquitous Language and Naming · Enterprise Craftsmanship</description><pubDate>Tue, 14 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript Decoratorを使った計測</title><link>https://bcrikko.github.io/til/posts/2023-03-23/ts-decorator-measure/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-23/ts-decorator-measure/</guid><description>TypeScript 5.0で追加されたDecoratorでパフォーマンス計測する。</description><pubDate>Thu, 23 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript Decoratorを使ったメモ化</title><link>https://bcrikko.github.io/til/posts/2023-03-23/ts-decorator-memo/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-23/ts-decorator-memo/</guid><description>TypeScript 5.0で追加されたDecoratorでメモ化する。</description><pubDate>Thu, 23 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>HTML5時代に「ブロックレベル要素」「インライン要素」という概念は有用か？</title><link>https://bcrikko.github.io/til/posts/2023-03-27/content-model/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-27/content-model/</guid><description>「ブロックレベル要素」「インライン要素」という概念が必要か、それとも不要かという議論があった。</description><pubDate>Mon, 27 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>メディアクエリのRange Syntaxを使う</title><link>https://bcrikko.github.io/til/posts/2023-03-30/range-syntax/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-30/range-syntax/</guid><description>Safari 16.4がサポートしたことで、Range Syntaxが全主要ブラウザで利用可能になった。</description><pubDate>Thu, 30 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>search要素追加でARIAランドマークロールが勢揃い</title><link>https://bcrikko.github.io/til/posts/2023-03-30/search/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-30/search/</guid><description>search要素が追加されたことで、ARIAランドマークロールがすべて揃った。</description><pubDate>Thu, 30 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ts.createProgram()のパフォーマンス改善</title><link>https://bcrikko.github.io/til/posts/2023-03-30/ts-createprogram/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-03-30/ts-createprogram/</guid><description>TypeScriptのモジュールを使って80個ほどの型定義を作成しようとしたとき、パフォーマンスがかなり悪かった。</description><pubDate>Thu, 30 Mar 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>@propertyを使ったCSS変数の制限</title><link>https://bcrikko.github.io/til/posts/2023-04-03/css-property/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-03/css-property/</guid><description>@propertyは、CSS Houdiniの一種で、Custom Propertyに制約を追加するための機能。</description><pubDate>Mon, 03 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>storybook 6.5から7にアップグレードするときの注意点</title><link>https://bcrikko.github.io/til/posts/2023-04-03/storybook-migration/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-03/storybook-migration/</guid><description>普通にマイグレーションしようとするとエラーになることが多いので、storybook関連のパッケージを削除して再度 init処理をするのがオススメ</description><pubDate>Mon, 03 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Nestingが使えるようになった</title><link>https://bcrikko.github.io/til/posts/2023-04-05/css-nesting/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-05/css-nesting/</guid><description>Chrome 112でついに待望のCSS Nestingが使えるようになった。</description><pubDate>Wed, 05 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>inert属性で一括非活性する/inert属性の用途と注意点</title><link>https://bcrikko.github.io/til/posts/2023-04-07/inert/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-07/inert/</guid><description>inert属性が全主要ブラウザで利用可能になった。</description><pubDate>Fri, 07 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>text-wrapプロパティでいい感じに文章を折り返す</title><link>https://bcrikko.github.io/til/posts/2023-04-11/text-wrap/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-11/text-wrap/</guid><description>text-wrap: balanceを使うことで、&lt;wbr&gt;を使うことなく日本語をいい感じに折り返し処理してくれる。</description><pubDate>Tue, 11 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Storybookで生成したファイルをGitHub Pagesでホストするとエラーになる</title><link>https://bcrikko.github.io/til/posts/2023-04-17/storybook-github-pages/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-17/storybook-github-pages/</guid><description>Storybookで生成したファイルをGitHub Pagesでホストするとエラーになる。</description><pubDate>Mon, 17 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>translate属性で固有名詞を翻訳させない</title><link>https://bcrikko.github.io/til/posts/2023-04-17/translate/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-17/translate/</guid><description>translate=&quot;no&quot;をつけることで固有名詞やコードをページ翻訳の対象からはずせる。</description><pubDate>Mon, 17 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSで三角関数を使う</title><link>https://bcrikko.github.io/til/posts/2023-04-18/css-trigonometric-function/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-18/css-trigonometric-function/</guid><description>いつも「将来使わないから学ぶ必要ない」と言われがちな三角関数がCSSで使えるようになった。</description><pubDate>Tue, 18 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Style Queriesを使ってコンテナ要素のスタイルを評価する</title><link>https://bcrikko.github.io/til/posts/2023-04-20/style-queries-container/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-20/style-queries-container/</guid><description>Chrome111/Edge111でStyle Queriesが使えるようになった。Style Queriesを使うことでコンテナ要素のスタイルを評価できる。</description><pubDate>Thu, 20 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSアニメーションでeasing-functionの細かく設定する</title><link>https://bcrikko.github.io/til/posts/2023-04-24/animation-function/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-24/animation-function/</guid><description>アニメーションのeasing-functionでlinear()が使えるようになった。</description><pubDate>Mon, 24 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>デバイスに合わせてスタイルを変更するupdateメディアクエリ</title><link>https://bcrikko.github.io/til/posts/2023-04-24/media-update/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-04-24/media-update/</guid><description>@media (update: …)を使うことでユーザーの使用デバイスにあわせてアニメーションをリッチにしたり、止めたりできる。</description><pubDate>Mon, 24 Apr 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Algebraic Effects（代数的エフェクト） とは？</title><link>https://bcrikko.github.io/til/posts/2023-05-11/algebraic-effects/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-05-11/algebraic-effects/</guid><description>2019年時点でAlgebraic Effectsをサポートした言語はごく一部で広く使えるものではない。</description><pubDate>Thu, 11 May 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:nth-childのofセレクタ</title><link>https://bcrikko.github.io/til/posts/2023-05-11/nth-child-of-selector/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-05-11/nth-child-of-selector/</guid><description>:nth-childのof SelectorがFirefox113に実装されたことで、全主要ブラウザで利用可能になった。</description><pubDate>Thu, 11 May 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>SharedWorkerのデバッグ方法</title><link>https://bcrikko.github.io/til/posts/2023-05-16/debug-shared-worker/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-05-16/debug-shared-worker/</guid><description>SharedWorkerはそのままだとWorker内で発生したエラーやconsole.log()が見れない。</description><pubDate>Tue, 16 May 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Popover API + Dialog</title><link>https://bcrikko.github.io/til/posts/2023-05-30/popover-dialog/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-05-30/popover-dialog/</guid><description>Popover APIがChrome114/Edge114にExperimentalとして実装された。Popover APIはセマンティクスを提供しない（あくまで属性のひとつ）。</description><pubDate>Tue, 30 May 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>デザイン思考に対して批判的な記事を見かけるようになった背景</title><link>https://bcrikko.github.io/til/posts/2023-06-16/anti-design-thinking/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-06-16/anti-design-thinking/</guid><description>最近、デザイン思考に対して批判的な記事を見かけることが多くなってきた。</description><pubDate>Fri, 16 Jun 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Cookie Store API</title><link>https://bcrikko.github.io/til/posts/2023-06-19/cookie-store-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-06-19/cookie-store-api/</guid><description>Cookie Store APIがChrome、Edge、Safariで使えるようになった。</description><pubDate>Mon, 19 Jun 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>給付金不正受給者を使ったWebスクレイピング練習</title><link>https://bcrikko.github.io/til/posts/2023-07-06/web-scraping/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-06/web-scraping/</guid><description>経済産業省が持続化給付金、家賃支援給付金、一時支援金、月次支援金における不正受給者の公表についてという不正受給者リストを公開していた。</description><pubDate>Thu, 06 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;cite&gt;は作者名を入れてはならないし、&lt;blockquote&gt;に含めてもいけない</title><link>https://bcrikko.github.io/til/posts/2023-07-12/cite/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-12/cite/</guid><description>引用するときに&lt;cite&gt;を使って引用元を明示するが、ここには著作物の名前（書籍、論文、詩、絵画などのタイトル）を入れるもので、作者名（著作者）を入れるものではない。</description><pubDate>Wed, 12 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>mix-blend-modeを使ったブラウン管テレビの再現エフェクト</title><link>https://bcrikko.github.io/til/posts/2023-07-12/mix-blend-mode/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-12/mix-blend-mode/</guid><description>mix-blend-modeを使うと要素を重ねたときにペイントツールのレイヤー合成モードのような表現ができる。 </description><pubDate>Wed, 12 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アニメーションの実装テクニック</title><link>https://bcrikko.github.io/til/posts/2023-07-13/flip-animation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-13/flip-animation/</guid><description>FLIPテクニックと呼ばれるもので、First、Last、Invert、Playの4つのステップでアニメーションを実装する方法だ。</description><pubDate>Thu, 13 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Array#group()とArray#groupToMap()</title><link>https://bcrikko.github.io/til/posts/2023-07-18/array-group-to-map/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-18/array-group-to-map/</guid><description>lodashのGroupByのようなメソッドで簡単にグループできるProposalが提案されている。</description><pubDate>Tue, 18 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Googleにおけるコードレビューのスピード感</title><link>https://bcrikko.github.io/til/posts/2023-07-18/google-review/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-18/google-review/</guid><description>Googleが公開しているエンジニアプラクティスのドキュメントにコードレビューについて書かれている。</description><pubDate>Tue, 18 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Canvas要素のアクセシビリティ対応</title><link>https://bcrikko.github.io/til/posts/2023-07-21/accessible-canvas/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-21/accessible-canvas/</guid><description>Canvas要素の内容はスクリーンリーダーに読み上げられないため、なんらかの対策が必要。</description><pubDate>Fri, 21 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>スクロールに連動しアニメーションする</title><link>https://bcrikko.github.io/til/posts/2023-07-25/scroll-driven-animation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-25/scroll-driven-animation/</guid><description>Chrome115/Edge115でCSSだけでスクロール駆動アニメーションができるようになった。</description><pubDate>Tue, 25 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>View Transitions APIを使ったページ遷移アニメーション</title><link>https://bcrikko.github.io/til/posts/2023-07-27/view-transitions-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-07-27/view-transitions-api/</guid><description>View Transitions APIを使うことで、ページ遷移やDOMをいじったときに自動でアニメーションを追加してくれる。</description><pubDate>Thu, 27 Jul 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>animation-compositionで初期値を基準にアニメーションする</title><link>https://bcrikko.github.io/til/posts/2023-08-01/animation-composition/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-08-01/animation-composition/</guid><description>animation-compositionが使えるようになった。</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Open APIのスキーマ定義からメソッドごとにパスを取得する型</title><link>https://bcrikko.github.io/til/posts/2023-08-01/openapi-type/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-08-01/openapi-type/</guid><description>Open APIのスキーマ定義からメソッドごとにパスを取得する型</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>.slice().splice()と.with()/.toSpliced()の関係</title><link>https://bcrikko.github.io/til/posts/2023-08-01/slice-splice-with-tospliced/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-08-01/slice-splice-with-tospliced/</guid><description>Array#with()とArray#toSpliced()が追加された</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ルミネ風LGTMで優雅さを</title><link>https://bcrikko.github.io/til/posts/2023-08-07/lumine/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-08-07/lumine/</guid><description>ルミネの広告みたいに、ちょっとポエミーなLGTMを書くことがある。</description><pubDate>Mon, 07 Aug 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>入れ子要素のborder-radiusをいい感じにする</title><link>https://bcrikko.github.io/til/posts/2023-08-29/nested-border-radius/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-08-29/nested-border-radius/</guid><description>要素を入れ子にする場合、親と子で同じ値のborder-radiusを設定すると視覚的に微妙になってしまう。</description><pubDate>Tue, 29 Aug 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Ability、Skill、Capabilityの違い</title><link>https://bcrikko.github.io/til/posts/2023-09-01/ability-skill-capability/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-01/ability-skill-capability/</guid><description>Ability、Skill、Capabilityの違い</description><pubDate>Fri, 01 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>::backdropにblur()をかけると見やすくなる</title><link>https://bcrikko.github.io/til/posts/2023-09-04/blur-backdrop/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-04/blur-backdrop/</guid><description>モーダル表示時に::backdropを黒い半透明にすることが多い。だが、そのままだと背景が見えてしまい、モーダルの内容が見づらくなることがある。</description><pubDate>Mon, 04 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;div&gt;は最後の手段</title><link>https://bcrikko.github.io/til/posts/2023-09-15/div/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-15/div/</guid><description>HTML Living Standardが「divは他に適切な要素がない場合の最後の手段」と強く推奨している。</description><pubDate>Fri, 15 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;header&gt;と&lt;hgroup&gt;の使い分け</title><link>https://bcrikko.github.io/til/posts/2023-09-19/header-hgroup/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-19/header-hgroup/</guid><description>&lt;header&gt;と&lt;hgroup&gt;の使い分け</description><pubDate>Tue, 19 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;menu&gt;の歴史</title><link>https://bcrikko.github.io/til/posts/2023-09-19/menu-history/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-19/menu-history/</guid><description>HTMLの&lt;menu&gt;要素は廃止されたり、復活したりしている。</description><pubDate>Tue, 19 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>循環的複雑度（サイクロマティック複雑度）</title><link>https://bcrikko.github.io/til/posts/2023-09-20/cyclomatic-complexity/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-20/cyclomatic-complexity/</guid><description>循環的複雑度（Cyclomatic Complexity: CC）は、客観的尺度を提供するために設計されたコードレベルのメトリクスだ。</description><pubDate>Wed, 20 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>軽量分かち書き器 BudouX</title><link>https://bcrikko.github.io/til/posts/2023-09-25/budoux/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-25/budoux/</guid><description>Googleが開発しているBudouXを使うと、日本語のテキストに分かち書きできる。</description><pubDate>Mon, 25 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>テキストエリアのheightを自動調整する</title><link>https://bcrikko.github.io/til/posts/2023-09-29/form-sizing/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-09-29/form-sizing/</guid><description>field-sizingを使うと、入力内容によって&lt;textarea&gt;のheightが自動調整できる。</description><pubDate>Fri, 29 Sep 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Import Attributesの変遷</title><link>https://bcrikko.github.io/til/posts/2023-10-11/import-attributes/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-10-11/import-attributes/</guid><description>TypeScript 5.3で最新のImport Attributes（with）をサポートした。Import AttributesのProposalで紆余曲折あり、with { type: ... }に決まりそうだ。</description><pubDate>Wed, 11 Oct 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>君たちは著作権情報をどうマークアップするか</title><link>https://bcrikko.github.io/til/posts/2023-10-19/copyright/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-10-19/copyright/</guid><description>&lt;small&gt;はHTMLの要素で、スタイルの表現とは独立して、著作権表示や法的表記のような、注釈や小さく表示される文を表します。</description><pubDate>Thu, 19 Oct 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>令和最新版JavaScriptの書き方にするESLint Plugin</title><link>https://bcrikko.github.io/til/posts/2023-10-20/eslint-unicorn/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-10-20/eslint-unicorn/</guid><description>eslint-plugin-unicornは、古い書き方を推奨される新しい書き方に変えるプラグイン。ただし、宗教戦争になりそうなルールがあるので導入は難しそう。</description><pubDate>Fri, 20 Oct 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS掃除の重要性</title><link>https://bcrikko.github.io/til/posts/2023-10-25/cleaning-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-10-25/cleaning-css/</guid><description>CSSは常に掃除し、過不足なく実装しなければすぐ負債化する。</description><pubDate>Wed, 25 Oct 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>フロントエンドエンジニアがUI開発するときの頭の中</title><link>https://bcrikko.github.io/til/posts/2023-10-25/what-i-think-about-ui/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-10-25/what-i-think-about-ui/</guid><description>私が何を考えながらUI開発をしているか、言語化してみる。</description><pubDate>Wed, 25 Oct 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ESLint v8.53でスペースやセミコロンなどの67のルールが一括非推奨に</title><link>https://bcrikko.github.io/til/posts/2023-11-01/eslint-deprecating-formatting-rules/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-01/eslint-deprecating-formatting-rules/</guid><description>ESLint v8.52でスペースやセミコロンなどの67のルールが一括非推奨になった</description><pubDate>Wed, 01 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSでpow()/sqrt()/hypot()/log()が利用可能に</title><link>https://bcrikko.github.io/til/posts/2023-11-13/css-exponential-functions/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-13/css-exponential-functions/</guid><description>CSSでpow()、sqrt()、log()、hypot()が使えるようになった。既存のsin()やcos()などと組み合わせることで、より柔軟なアニメーションが書きやすくなる。</description><pubDate>Mon, 13 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>GitHub Markdown のアラート記法</title><link>https://bcrikko.github.io/til/posts/2023-11-21/markdown-alert/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-21/markdown-alert/</guid><description>GitHub Flavored Markdownでアラート記法が使えるようになった。</description><pubDate>Tue, 21 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSを動的に追加する方法</title><link>https://bcrikko.github.io/til/posts/2023-11-27/dynamic-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-27/dynamic-css/</guid><description>CSSStyleSheetとdocument#adoptedStyleSheetsを使うと、JavaScriptからCSSを動的に追加できる。</description><pubDate>Mon, 27 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>構造化テキストを文字列結合・置換しない</title><link>https://bcrikko.github.io/til/posts/2023-11-30/programming/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-30/programming/</guid><description>プログラミングの原則：構造化テキストを文字列結合で作らない、置換でいじらない</description><pubDate>Thu, 30 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>UI Guideline</title><link>https://bcrikko.github.io/til/posts/2023-11-30/ui-guideline/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-11-30/ui-guideline/</guid><description>一般的なUIコンポーネントごとにどんな名前が使われているか、関連コンポーネントはなにか、Propsはどんなものがあるか、HTMLはどのように書かれているかがまとまっているのでUIコンポーネントデザイン・開発するときに参考になりそう。</description><pubDate>Thu, 30 Nov 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>JS Formatterグランプリ</title><link>https://bcrikko.github.io/til/posts/2023-12-11/js-formatter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-12-11/js-formatter/</guid><description>ESLint v8.53からスタイル関連のルールが非推奨になり、別途Formatterが必要になるのでいろいろ調べてみた。</description><pubDate>Mon, 11 Dec 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;details name=&apos;xxx&apos;&gt;でJavaScriptなしでアコーディオンメニューが実装可能に</title><link>https://bcrikko.github.io/til/posts/2023-12-12/details/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-12-12/details/</guid><description>details要素にname属性をつけるとグループ化することができるようになった。</description><pubDate>Tue, 12 Dec 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title> Baseline 2023</title><link>https://bcrikko.github.io/til/posts/2023-12-14/baseline/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-12-14/baseline/</guid><description>2023年はCSS進化の年だといっても過言ではない。</description><pubDate>Thu, 14 Dec 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title> データ指向プログラミングとは何か</title><link>https://bcrikko.github.io/til/posts/2023-12-14/data-oriented-programming/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-12-14/data-oriented-programming/</guid><description>DOPの原則は、昨今のソフトウェア設計におけるベストプラクティスと合致しているのでアリより。</description><pubDate>Thu, 14 Dec 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ブラウザで分かち書きする</title><link>https://bcrikko.github.io/til/posts/2023-12-26/intl-segments/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2023-12-26/intl-segments/</guid><description>Intl.Segmentsを使うことで、3rdパーティライブラリを使わなくても分かち書きできるようになった。</description><pubDate>Tue, 26 Dec 2023 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>GoogleのログインUIの考察</title><link>https://bcrikko.github.io/til/posts/2024-01-11/google-login/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-11/google-login/</guid><description>母に「Googleアカウントでログインして」と言ったところつまずいたページ。</description><pubDate>Thu, 11 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>103 Early Hintsは何者か</title><link>https://bcrikko.github.io/til/posts/2024-01-25/103-early-hints/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-25/103-early-hints/</guid><description>データをレスポンスする前に、必要なリソースをあらかじめブラウザに伝えることで表示速度を向上させることができる。</description><pubDate>Thu, 25 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:has()擬似クラスが全主要ブラウザで利用可能に</title><link>https://bcrikko.github.io/til/posts/2024-01-25/has-class/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-25/has-class/</guid><description>Firefox121が:has()をサポートしたことで、全主要ブラウザで利用可能にな</description><pubDate>Thu, 25 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeSpecがDSLを選択した理由</title><link>https://bcrikko.github.io/til/posts/2024-01-29/typespec/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-29/typespec/</guid><description>TypeSpecはAPI定義言語で、OpenAPIのスキーマ定義やクライアント、ドキュメントなどを生成できる。</description><pubDate>Mon, 29 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.4がリリースされた</title><link>https://bcrikko.github.io/til/posts/2024-01-30/typescript-5.4</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-30/typescript-5.4</guid><description>TypeScript 5.4 betaがリリースされた。</description><pubDate>Tue, 30 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;select&gt;に&lt;hr&gt;で区切り線を付ける</title><link>https://bcrikko.github.io/til/posts/2024-01-31/hr-in-select/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-01-31/hr-in-select/</guid><description>いままでWebでは&lt;select&gt;内に区切り線を入れることができず、代替手段として&lt;optgroup&gt;が使われていたが、HTMLの仕様としてselect要素にhr要素を含められるようになった</description><pubDate>Wed, 31 Jan 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>cap heightで要素内のアイコンをちょうどいい感じにする</title><link>https://bcrikko.github.io/til/posts/2024-02-02/cap-height/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-02/cap-height/</guid><description>capという単位を使うと、アルファベットのベースライン〜キャップラインの高さを表現することができる。</description><pubDate>Fri, 02 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ESLintを爆速にする</title><link>https://bcrikko.github.io/til/posts/2024-02-02/eslint-cache/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-02/eslint-cache/</guid><description>ESLint実行時に—cacheフラグをつけることで、.eslintcacheが作成され変更があったファイルのみチェックするようになるので実行時間が短くなる。</description><pubDate>Fri, 02 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>aspect-ratioで要素のサイズを決める</title><link>https://bcrikko.github.io/til/posts/2024-02-05/aspect-ratio/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-05/aspect-ratio/</guid><description>aspect-ratioは画像に適用するイメージが強いけど、普通の要素でも使える。 Cardコンポーネントやタイル型UIで、width/heightに絶対値を指定するような方法より直感的でわかりやすい。</description><pubDate>Mon, 05 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>自動入力されたフィールドか判定する</title><link>https://bcrikko.github.io/til/posts/2024-02-13/autofill/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-13/autofill/</guid><description>:autofillを使うことで、自動入力されたフィールドかどうかを判定できる。</description><pubDate>Tue, 13 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>block要素をinline-block要素っぽく扱う方法</title><link>https://bcrikko.github.io/til/posts/2024-02-15/fit-content/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-15/fit-content/</guid><description>fit-contentを使うことで、block要素でも中身のサイズに合わせてwidthが変わる。</description><pubDate>Thu, 15 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>DocumentFragmentで余計な要素を作らない</title><link>https://bcrikko.github.io/til/posts/2024-02-15/fragment/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-15/fragment/</guid><description>DocumentFragmentを使うことで余計なcontainer要素を抑制できる</description><pubDate>Thu, 15 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>カラーフォントの色を変更する</title><link>https://bcrikko.github.io/til/posts/2024-02-16/color-font/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-16/color-font/</guid><description>Reactで`&lt;title&gt;`を変更する方法。</description><pubDate>Fri, 16 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>複数の状態を型で表現する方法</title><link>https://bcrikko.github.io/til/posts/2024-02-16/multi-state/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-16/multi-state/</guid><description>typeによって複数の状態を表現する方法で、react-router-domの実装を参考にしてみる。</description><pubDate>Fri, 16 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>React で &lt;title&gt; をいじる方法</title><link>https://bcrikko.github.io/til/posts/2024-02-16/react-title/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-16/react-title/</guid><description>Reactで`&lt;title&gt;`を変更する方法。</description><pubDate>Fri, 16 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ES2024のリリース候補</title><link>https://bcrikko.github.io/til/posts/2024-02-21/es2024/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-21/es2024/</guid><description>ES2024に追加される新機能が決まった</description><pubDate>Wed, 21 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Mouse Event、Touch Event、Pointer Event の違い</title><link>https://bcrikko.github.io/til/posts/2024-02-28/mouseevent-touchevent-pointerevent/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-28/mouseevent-touchevent-pointerevent/</guid><description>Mouse Event、Touch Event、Pointer Event の違い</description><pubDate>Wed, 28 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ポインターが要素からはみ出ても位置を追い続ける</title><link>https://bcrikko.github.io/til/posts/2024-02-28/set-pointer-capture/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-02-28/set-pointer-capture/</guid><description>Element#setPointerCapture()を使うと、Element#releasePointerCapture()が実行されるかpointerupされるまでキャプチャし続ける。</description><pubDate>Wed, 28 Feb 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>::backdropがスタイルを継承するようになっ</title><link>https://bcrikko.github.io/til/posts/2024-03-01/inherit-backdrop/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-01/inherit-backdrop/</guid><description>::backdropがスタイルを継承するようになったため、:rootで宣言した変数が使えるようになった。</description><pubDate>Fri, 01 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Vitest（jest）でuseFakeTimers()を使うとPromiseが動かなくなる </title><link>https://bcrikko.github.io/til/posts/2024-03-04/vitest-usefaketimers/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-04/vitest-usefaketimers/</guid><description>useFakeTimersを使うと`Error: Test timed out in 5000ms.」となる。</description><pubDate>Mon, 04 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>世界一流エンジニアの思考法</title><link>https://bcrikko.github.io/til/posts/2024-03-05/engineer/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-05/engineer/</guid><description>「アジャイルサムライ」「リーダブルコード」「リーン」「エッセンシャル思考」「失敗の科学」「プログラマー脳」「ヘルシープログラマー」などの本を1冊にまとめたような本。一部「ん？ホンマか？」となる部分もあったが、読んでおいて損はない。</description><pubDate>Tue, 05 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;input type=&apos;checkbox&apos; switch&gt; で簡単スイッチUI</title><link>https://bcrikko.github.io/til/posts/2024-03-06/checkbox-switch/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-06/checkbox-switch/</guid><description>Safari TP 185でCheckboxのスイッチ化ができるようになった。</description><pubDate>Wed, 06 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>バニラCSSでSassの@functionや@mixin使えるようになる（かも）</title><link>https://bcrikko.github.io/til/posts/2024-03-06/css-function-mixin/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-06/css-function-mixin/</guid><description>CSSでもSassの@functionや@mixinを使えるようにしようぜという議論がGitHubでされている。</description><pubDate>Wed, 06 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Scoping</title><link>https://bcrikko.github.io/til/posts/2024-03-06/scoped-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-06/scoped-css/</guid><description>Safari TP 185がCSS Scopingをサポートした。</description><pubDate>Wed, 06 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>safeキーワードを使ってあふれたアイテムをなんとか伝える</title><link>https://bcrikko.github.io/til/posts/2024-03-07/flexbox-safe/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-07/flexbox-safe/</guid><description>safeキーワードを使うとコンテナ要素からはみ出した場合に「文章の先頭だけ表示」ができるようになる。</description><pubDate>Thu, 07 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>テスト駆動開発の誤解とゴール</title><link>https://bcrikko.github.io/til/posts/2024-03-11/tdd/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-11/tdd/</guid><description>過去の自分は、テスト駆動開発（TDD）＝テストファーストという間違った認識をしていた。そこでテスト駆動開発 / Kent BecKを読んで認識が変わった。</description><pubDate>Mon, 11 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>持続可能なCSSルール ECSS（Efficient CSS）</title><link>https://bcrikko.github.io/til/posts/2024-03-14/efficient-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-14/efficient-css/</guid><description>ECSSとは、OOCSS、BEM、SMACSS、FLOCSSなどクラス名をどう命名するかに着目したCSS設計とはちょっと違っていて、どちらかというとコーディングガイドラインみたいなルール。</description><pubDate>Thu, 14 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>入力内容に応じてtextareaの高さを調整する</title><link>https://bcrikko.github.io/til/posts/2024-03-14/textarea-with-field-sizing/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-14/textarea-with-field-sizing/</guid><description>CSS4のfield-sizing()を使うことで、忌々しいtextareaの高さ問題を自動調整できるようになる。</description><pubDate>Thu, 14 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>JSON Canvas Format</title><link>https://bcrikko.github.io/til/posts/2024-03-15/json-canvas-format/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-15/json-canvas-format/</guid><description>JSON Canvas Formatとは、ObsidianのCanvas用に作られたJSONフォーマット。</description><pubDate>Fri, 15 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ブラウザで簡易メモ帳を開く</title><link>https://bcrikko.github.io/til/posts/2024-03-15/tab-memo/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-15/tab-memo/</guid><description>contenteditable属性を使うことで、ブラウザのタブを簡易メモ帳にできる。</description><pubDate>Fri, 15 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>デジタルUIデザインの歴史</title><link>https://bcrikko.github.io/til/posts/2024-03-18/disital-ui-design-history/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-18/disital-ui-design-history/</guid><description>スキューモーフィズム、フラットデザイン、ニューモーフィズム</description><pubDate>Mon, 18 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Variable Groups</title><link>https://bcrikko.github.io/til/posts/2024-03-21/css-variable-group/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-21/css-variable-group/</guid><description>Sassの.Block { &amp;__Element: ... }のように&amp;でCSSカスタムプロパティを拡張するCSS Variable Groupという提案がなされている。</description><pubDate>Thu, 21 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>フォーカスがあたったinputに紐づくlabelを強調する</title><link>https://bcrikko.github.io/til/posts/2024-03-27/focus-within/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-27/focus-within/</guid><description>:focus-withinを使うと、その要素、または子要素にフォーカスが当たったときにスタイルを当てられる。</description><pubDate>Wed, 27 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Chrome &apos;n&apos; Friends</title><link>https://bcrikko.github.io/til/posts/2024-03-28/chromenfriends/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-28/chromenfriends/</guid><description>Chrome系ブラウザ（ChromiumをベースとしたChromeをはじめ、Edge、Braveなどのブラウザを指す）</description><pubDate>Thu, 28 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ライトモード/ダークモードで色を切り替える</title><link>https://bcrikko.github.io/til/posts/2024-03-28/light-dark/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-28/light-dark/</guid><description>light-dark()を使うことで、ユーザー環境のカラースキームによって色が自動で切り替わる。</description><pubDate>Thu, 28 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>system-colorを知る</title><link>https://bcrikko.github.io/til/posts/2024-03-29/system-color/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-03-29/system-color/</guid><description>system-colorはユーザーエージェントが提供しているカラーパレットで、Windowのハイコントラストモードにすると強制色モードが有効になりsystem-colorが変わる。</description><pubDate>Fri, 29 Mar 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>divdivしたHTMLのことをdivitis、またはdiv soupと呼ぶ</title><link>https://bcrikko.github.io/til/posts/2024-04-05/divitis-divsoup/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-05/divitis-divsoup/</guid><description>divdivしたHTMLのことを軽蔑的な意味を込めてdivitis、またはdiv soupと呼ぶ。</description><pubDate>Fri, 05 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>【令和最新版】上下中央揃え</title><link>https://bcrikko.github.io/til/posts/2024-04-18/align-content/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-18/align-content/</guid><description>flexやgrid用のコンテナを用意しなくてもalign-contentだけで上下中央揃えができるようになった。</description><pubDate>Thu, 18 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScript Stage 4 になった仕様</title><link>https://bcrikko.github.io/til/posts/2024-04-18/ecmascript-stage4/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-18/ecmascript-stage4/</guid><description>ECMAScript Stage 4 になった仕様</description><pubDate>Thu, 18 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSでHTMLをテストする</title><link>https://bcrikko.github.io/til/posts/2024-04-23/html-test-with-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-23/html-test-with-css/</guid><description>CSSでHTMLをテストする</description><pubDate>Tue, 23 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Popover API + CSS Anchor Positioningでツールチップを表示する</title><link>https://bcrikko.github.io/til/posts/2024-04-26/popover-api-and-css-anchor-positioning/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-26/popover-api-and-css-anchor-positioning/</guid><description>Popover API + CSS Anchor Positioningでツールチップを表示する。</description><pubDate>Fri, 26 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.5がリリースされた</title><link>https://bcrikko.github.io/til/posts/2024-04-26/typescript-5.5</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-04-26/typescript-5.5</guid><description>TypeScript 5.5 betaがリリースされた。Array#filter()で除外したはずの型が残るせいで不要なキャストが必要だったのが改善された。いままでもちょっとはチェックしてくれていたけど、基本的なチェックは全部やってくれるようになった。</description><pubDate>Fri, 26 Apr 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node.js v22で使えるようになった機能</title><link>https://bcrikko.github.io/til/posts/2024-05-07/node-v22/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-07/node-v22/</guid><description>Node.js v22がリリースされた。</description><pubDate>Tue, 07 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Reactコンポーネントが提供する要素名を利用者に伝える</title><link>https://bcrikko.github.io/til/posts/2024-05-09/return-element-react/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-09/return-element-react/</guid><description>&lt;InfoMessage /&gt;というコンポーネントがあったとして、そのコンポ―ネントがInformationメッセージだけを返すのか、&lt;p&gt;でくくって返すのか利用者からはわからない。</description><pubDate>Thu, 09 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>2024年4月 全主要ブラウザで使えるようになった機能</title><link>https://bcrikko.github.io/til/posts/2024-05-09/web-platform-2024-04/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-09/web-platform-2024-04/</guid><description>2024年4月 全主要ブラウザで使えるようになった機能</description><pubDate>Thu, 09 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>存在しない型をつくらない</title><link>https://bcrikko.github.io/til/posts/2024-05-13/nonexistent-type/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-13/nonexistent-type/</guid><description>不要な状態ができないような型を作るアプローチは良い、古事記にもそう書かれている。</description><pubDate>Mon, 13 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Logical Propertiesで中央揃え</title><link>https://bcrikko.github.io/til/posts/2024-05-14/css-logical-properties/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-14/css-logical-properties/</guid><description>margin-block/margin-inlineはLogical Properties（論理プロパティ）と呼ばれ、ブロックの先頭、インラインの末尾のような意味的な場所に対応している。 そのため、writing-modeがvertical-lrでもvertical-rlでも使える。</description><pubDate>Tue, 14 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>font-sizeが10px未満にしても表示できる</title><link>https://bcrikko.github.io/til/posts/2024-05-17/font-size/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-17/font-size/</guid><description>ブラウザの最小フォントサイズは10pxだったが、0pxまで表示できるようになっている。VisuallyHiddenの代わりに使えるかも知れない。</description><pubDate>Fri, 17 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>トランジションさせる要素の初期状態を指定する@starting-style</title><link>https://bcrikko.github.io/til/posts/2024-05-21/starting-style/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-21/starting-style/</guid><description>`@starting-style`を使うと、トランジション開始時のスタイルを定義できる。</description><pubDate>Tue, 21 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>URL.parseで文字列をパースする</title><link>https://bcrikko.github.io/til/posts/2024-05-21/url-parse/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-21/url-parse/</guid><description>URL.parse()を使うと、URL.canParse()とnew URL()を一度に行うことができる。</description><pubDate>Tue, 21 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>すべてのアーキテクチャ・設計手法は「関心の分離」を実現するための手段</title><link>https://bcrikko.github.io/til/posts/2024-05-22/what-is-architecture/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-22/what-is-architecture/</guid><description>すべてのアーキテクチャ・設計手法は「関心の分離」を実現するための手段</description><pubDate>Wed, 22 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>属性駆動スタイリング</title><link>https://bcrikko.github.io/til/posts/2024-05-23/attribute-driven-styling/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-23/attribute-driven-styling/</guid><description>BEMでいうところのModifierをclas に含めず、属性で表現しスタイリングすること。</description><pubDate>Thu, 23 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>dialog要素はcolorを継承しない</title><link>https://bcrikko.github.io/til/posts/2024-05-24/dialog-inherit-color/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-24/dialog-inherit-color/</guid><description>dialog要素はコンテキストが切り替わるので、単純にcolor: inheritをしてしまうと直前の要素に指定されたcolorを継承してしまうからやっちゃダメかも。</description><pubDate>Fri, 24 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>アーキテクチャを突き詰める Online Conference で聞いたセッションでよかった</title><link>https://bcrikko.github.io/til/posts/2024-05-28/architecture-conference/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-28/architecture-conference/</guid><description>全体的に「関心の分離をどうするか」をいろんな視点・手法で発表するカンファレンスだった。  </description><pubDate>Tue, 28 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>操作せず一定時間が経過しても画面暗転やロックを防ぐ</title><link>https://bcrikko.github.io/til/posts/2024-05-29/wake-lock/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-29/wake-lock/</guid><description>Screen Wake Lock APIは電子書籍を読んでいるときやレシピを見ているときなど、操作してないけど暗転されると困るときに使う。</description><pubDate>Wed, 29 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>コンパイラに優しいコードを書く</title><link>https://bcrikko.github.io/til/posts/2024-05-30/slow-types/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-05-30/slow-types/</guid><description>Slow typesを書くとTypeScriptの型チェックが遅くなることがある。そのため、人間やブラウザだけでなく、コンパイラに優しいコードを書くことが求められる。</description><pubDate>Thu, 30 May 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>スクロールバー表示/非表示時のガタツキを防ぐ</title><link>https://bcrikko.github.io/til/posts/2024-06-03/css-scroll-bar/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-03/css-scroll-bar/</guid><description>あらかじめスクロールバー分のスペースを確保することで、要素が増えスクロールバーが表示されてもガタつかないようにできる。</description><pubDate>Mon, 03 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>PlaywrightとAxeでE2Eテストにアクセシビリティチェックを組み込む</title><link>https://bcrikko.github.io/til/posts/2024-06-04/playwright-axe-accessibility-check/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-04/playwright-axe-accessibility-check/</guid><description>ReactやVueなどでコンポーネントを分割しながら開発していると、文書全体の整合性チェックができない。そのため、E2Eテストに組み込むことでレンダリング後のHTMLを確認する。</description><pubDate>Tue, 04 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>早まったDRY原則の適用はやめよう</title><link>https://bcrikko.github.io/til/posts/2024-06-06/dont-dry-your-code-prematurely/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-06/dont-dry-your-code-prematurely/</guid><description>DRY原則は、「コード」ではなく「知識」の重複を防ぐこと。コードが重複しているから共通化しようと考えてはならない。</description><pubDate>Thu, 06 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node.jsの引数にパスを渡すときは引用符でくくる</title><link>https://bcrikko.github.io/til/posts/2024-06-06/node-arg/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-06/node-arg/</guid><description>引用符なしの場合、src/**/*.js が文字列としてではなく、このパターンに一致するパスが引数に渡ってしまう。そのため「ダメな例」で target を出力すると src/**/*.js ではなく src/index.jsという文字列になる。</description><pubDate>Thu, 06 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ES2025で追加される新しいSetメソッドを使ってfilter実装を簡素化する</title><link>https://bcrikko.github.io/til/posts/2024-06-07/new-set-methods/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-07/new-set-methods/</guid><description>ES2025で追加予定（現在Stage4）の新しいSetメソッドを使うとArray#filter()の実装が楽になる。</description><pubDate>Fri, 07 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>dialog要素のどこにフォーカスを当てればよいか考える</title><link>https://bcrikko.github.io/til/posts/2024-06-12/dialog-focus/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-12/dialog-focus/</guid><description>dialog要素を表示したときに、ブラウザのデフォルトの挙動でフォーカスが当たる場所が微妙なので考えてみる。</description><pubDate>Wed, 12 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>.d.tsは参照のみでdistには含まれない</title><link>https://bcrikko.github.io/til/posts/2024-06-13/d-ts/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-13/d-ts/</guid><description>以下のような*.d.tsファイルはプロジェクト内限定の参照専用型定義ファイルのため、distディレクトリには出力されない。</description><pubDate>Thu, 13 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Clipboard APIでクリップボードにアクセスする</title><link>https://bcrikko.github.io/til/posts/2024-06-14/clipboard-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-14/clipboard-api/</guid><description>Firefox127がClipboard APIのRead/Writeをサポートしたことで、全モダンブラウザで利用可能になった。</description><pubDate>Fri, 14 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScript Stage2.7のJoint Itelationを使う</title><link>https://bcrikko.github.io/til/posts/2024-06-17/joint-itelation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-17/joint-itelation/</guid><description>Joint Itelationは2つ以上のイテレータ（配列など）を同時にループしたいときに使える。</description><pubDate>Mon, 17 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ES2025 Promise.try()を使う</title><link>https://bcrikko.github.io/til/posts/2024-06-17/promise-try/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-17/promise-try/</guid><description>関数には同期的な処理と非同期的な処理がある。関数利用者はいまから使う関数がPromiseを返すかどうか知りたくない。</description><pubDate>Mon, 17 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>State of JS 2023 から考えるライブラリとの付き合い方</title><link>https://bcrikko.github.io/til/posts/2024-06-21/state-of-js-2023/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-21/state-of-js-2023/</guid><description>個人的にState of JSをライブラリ選定の基準にするのは危険だと思っている。</description><pubDate>Fri, 21 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>「閉じる」アクションを適切に処理する CloseWatcher API</title><link>https://bcrikko.github.io/til/posts/2024-06-24/close-watcher-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-24/close-watcher-api/</guid><description>CloseWatcherAPIを使うとPCのESCキー、スマホの戻るボタンを押したことを検知して処理できるため、マルチデバイス対応が容易になる。</description><pubDate>Mon, 24 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Anchor Positioningを使ってネットワーク図をつくる</title><link>https://bcrikko.github.io/til/posts/2024-06-26/css-anchor-positioning/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-26/css-anchor-positioning/</guid><description>CSS Anchor Positioningを使うとターゲット要素（アンカー要素）の位置を簡単に取得できるため、JavaScriptを使わずネットワーク図のような複雑なGUIを作ることができる。</description><pubDate>Wed, 26 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>classとtypeのtype predicateの挙動の違い</title><link>https://bcrikko.github.io/til/posts/2024-06-28/class-type-predicate/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-06-28/class-type-predicate/</guid><description>自身の型を絞り込むために`T is U`のようなtype predicateを実装する場合、classとtypeでは挙動が異なるので注意が必要。</description><pubDate>Fri, 28 Jun 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>height:0→autoをトランジションする</title><link>https://bcrikko.github.io/til/posts/2024-07-01/height-transition/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-01/height-transition/</guid><description>通常height:0→autoのトランジションはできないが、calc-size()が実装されたら使えるようになる</description><pubDate>Mon, 01 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>@propertyの使い所</title><link>https://bcrikko.github.io/til/posts/2024-07-02/css-property/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-02/css-property/</guid><description>を使うことで、JavaScriptからCSSカスタムプロパティを参照したときに正しい値を取得できるようになる。</description><pubDate>Tue, 02 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>縦長のモーダルをスクロールする</title><link>https://bcrikko.github.io/til/posts/2024-07-10/scroll-in-modal/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-10/scroll-in-modal/</guid><description>Popover APIまたはdialog#showModal()で表示したdialog要素、::backdrop疑似要素はともにposition: fixedなのでBootstrapのようなスクロールができない。</description><pubDate>Wed, 10 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSでif()が使えるようになる</title><link>https://bcrikko.github.io/til/posts/2024-07-12/css-if/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-12/css-if/</guid><description>Inline conditionals（if()）が CSS Values Module Level 5 の仕様に追加される。</description><pubDate>Fri, 12 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>setInterval()、setTimeout()は内部的にeval()を使っている（場合もある）</title><link>https://bcrikko.github.io/til/posts/2024-07-18/setInterval-setTimeout-eval/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-18/setInterval-setTimeout-eval/</guid><description>setInterval()、setTimeout()は内部的にeval()を使っている（場合もある）</description><pubDate>Thu, 18 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node.js v22.5がリリースされた</title><link>https://bcrikko.github.io/til/posts/2024-07-19/node-v225/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-19/node-v225/</guid><description>Node.js v22.5がリリースされた。</description><pubDate>Fri, 19 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>font-size-adjustで異なるフォントのサイズ感を調整する</title><link>https://bcrikko.github.io/til/posts/2024-07-24/font-size-adjust/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-24/font-size-adjust/</guid><description>font-size-adjustに係数を指定することで、フォントのサイズ感を調整できる。</description><pubDate>Wed, 24 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>「しかのこのこのここしたんたん」をマルコフ連鎖でつくる</title><link>https://bcrikko.github.io/til/posts/2024-07-24/shikanoko-markov/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-24/shikanoko-markov/</guid><description>「しかのこのこのここしたんたん」をマルコフ連鎖でつくる動画をみたので実装してみる。</description><pubDate>Wed, 24 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>target=&quot;_blank&quot;とrel=&quot;noopener noreferrer&quot;のいま</title><link>https://bcrikko.github.io/til/posts/2024-07-25/target-blank/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-25/target-blank/</guid><description>rel=&quot;noopener noreferrer&quot;を使うようになったのは2016年7月頃にtarget=&quot;_blank&quot;のセキュリティリスクに関する記事を読んだからだ。</description><pubDate>Thu, 25 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>@view-transitionを使って遷移時にトランジションする</title><link>https://bcrikko.github.io/til/posts/2024-07-25/view-transition/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-25/view-transition/</guid><description>Chrome126/Edge126で@view-transitionが使えるようになった。</description><pubDate>Thu, 25 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>curlコマンドでPOST/PUTするときにJSONファイルを指定する</title><link>https://bcrikko.github.io/til/posts/2024-07-26/curl/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-26/curl/</guid><description>コマンドラインからAPIを直接叩くときにcurlコマンドを使う</description><pubDate>Fri, 26 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>MacOSにPython開発環境を構築する</title><link>https://bcrikko.github.io/til/posts/2024-07-26/setup-python/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-26/setup-python/</guid><description>Pythonの開発環境を構築する機会があったのでメモとして残す。</description><pubDate>Fri, 26 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Google Fontsのrender-blockingを解消する</title><link>https://bcrikko.github.io/til/posts/2024-07-27/optimize-google-font/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-27/optimize-google-font/</guid><description>このページをLighthouseで計測すると、以下のような警告が表示される。</description><pubDate>Sat, 27 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Safari 17.6がリリースされたことでsafeキーワードが利用可能に</title><link>https://bcrikko.github.io/til/posts/2024-07-30/safari-17.6</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-30/safari-17.6</guid><description>Safari 17.6がリリースされたことでflexboxのsafeキーワードが利用可能になった。</description><pubDate>Tue, 30 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.6 Betaがリリースされた</title><link>https://bcrikko.github.io/til/posts/2024-07-30/typescript-5.6</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-07-30/typescript-5.6</guid><description>先日、TypeScript 5.6 Betaがリリースされた。</description><pubDate>Tue, 30 Jul 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Reactでautofocus属性が使えないときの対処法</title><link>https://bcrikko.github.io/til/posts/2024-08-01/react-autofocus/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-01/react-autofocus/</guid><description>ReactではautoFocus: booleanというインターフェースを持ちながら、なぜか属性が削除されてしまうというバグ？仕様？がある。</description><pubDate>Thu, 01 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Vitest 1.xから2.xにアップデートにするとjest-domのメソッドがエラーになる</title><link>https://bcrikko.github.io/til/posts/2024-08-01/vitest-migration/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-01/vitest-migration/</guid><description>Vitestを1.xから2.xにアップグレードしたところ、testing-library/jest-domが提供するtoBeInTheDocumentやtoHaveAttribute、toHaveClassなどが見つからないというエラーになった。</description><pubDate>Thu, 01 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>スクロール可能な要素にフォーカスをあてる</title><link>https://bcrikko.github.io/til/posts/2024-08-05/focusable-scroller/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-05/focusable-scroller/</guid><description>スクロール可能な要素にフォーカスできるようになったことで、dialog要素のどこにフォーカスを当てればよいか考えるで紹介しているフォーカスワープがなくなり、ユーザビリティが向上する。</description><pubDate>Mon, 05 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node.js v22.6.0で実験的にTypeScriptをサポート</title><link>https://bcrikko.github.io/til/posts/2024-08-07/node-22.6.0</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-07/node-22.6.0</guid><description>Node.js v22.6.0で実験的にTypeScriptがサポートされた。</description><pubDate>Wed, 07 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>&lt;ruby&gt;の配置を制御するruby-align</title><link>https://bcrikko.github.io/til/posts/2024-08-07/ruby-align/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-07/ruby-align/</guid><description>Chrome128でruby要素が改行可能になり、ルビの配置を制御できるようになった。</description><pubDate>Wed, 07 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>カンマ演算子を使ってパイプラインを実現する</title><link>https://bcrikko.github.io/til/posts/2024-08-12/comma-operator/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-12/comma-operator/</guid><description>カンマ演算子とは、演算対象を左から順に評価し最後の値を返す演算子のこと。</description><pubDate>Mon, 12 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node.js v22.7.0でTypeScriptのシンタックスをサポート</title><link>https://bcrikko.github.io/til/posts/2024-08-23/node-22.7.0</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-23/node-22.7.0</guid><description>Node.js v22.7.0で--experimental-transform-typesが追加されたことでenumsやnamespaceといったTypeScriptの構文がJavaScriptに変換されるようになった。</description><pubDate>Fri, 23 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Intl.DurationFormatで時分秒の多言語対応をする</title><link>https://bcrikko.github.io/til/posts/2024-08-27/intl-durationformat/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-27/intl-durationformat/</guid><description>Chrome 129 BetaでIntl.DurationFormatがサポートされた。現時点ではSafari 16.4のみサポート済み。Intl.DurationFormatは国際化APIの一部で、時分秒の多言語対応とフォーマットができるようになる。</description><pubDate>Tue, 27 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>scheduler.yield()を使い長いタスクに割り込む</title><link>https://bcrikko.github.io/til/posts/2024-08-27/scheduler-yield/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-27/scheduler-yield/</guid><description>Chrome 129 Betaでscheduler.yield()がフラグなしで使えるようになった。scheduler.yield()を使うことで、長い処理の中に割り込むことができる。</description><pubDate>Tue, 27 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>th要素にscope属性をつけて見出しをセルを紐づける</title><link>https://bcrikko.github.io/til/posts/2024-08-28/th-scope/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-28/th-scope/</guid><description>th要素にはscope属性をつけることができる。基本的には気にしなくて良いが昨今のWebUIではテーブル自体が拡張され複雑化することが多く、マークアップだけでは適切に紐づけることができないため有用になるケースもある。</description><pubDate>Wed, 28 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>VSCodeのリファクタリング機能でリネームするとエイリアスが残る</title><link>https://bcrikko.github.io/til/posts/2024-08-30/vscode-rename/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-08-30/vscode-rename/</guid><description>VSCodeのリファクタリング機能（F2）を使ってリネームすると、JavaScriptやTypeScriptの変数、関数名などを一括変更できる。しかし、リネームした後にエイリアスされ変更前の名前が保持されてしまう。</description><pubDate>Fri, 30 Aug 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScriptの標準化プロセスと各Stageの意味と移行条件</title><link>https://bcrikko.github.io/til/posts/2024-09-03/ecmascript-process/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-03/ecmascript-process/</guid><description>ECMAScriptはEcma Internationalによって標準化されている仕様で、その標準化プロセスはStage 0からStage 4までの6つの段階に分かれている。各Stageの意味と移行条件 Stage 0 新しい機能のアイデア段階。このProposalがなぜ有用なのか説明が必要するリポジトリの作成と、Champion（旗振り役）が決まったらStage 1に進む。</description><pubDate>Tue, 03 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>details要素のname属性を使ってグループ化する</title><link>https://bcrikko.github.io/til/posts/2024-09-04/details-name/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-04/details-name/</guid><description>Firefox 130でdetails要素のname属性がサポートされたことで、全主要部（Chrome120、Edge120、Firefox130、Safari17.2）で使えるようになった。details要素にname属性をつけることでグループ化ができ、アコーディオンの開閉制御を排他的に行うことができるようになった。</description><pubDate>Wed, 04 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSで名前空間セパレ―タ（|）を使う</title><link>https://bcrikko.github.io/til/posts/2024-09-05/namespace-separator/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-05/namespace-separator/</guid><description>CSSで見かけないセレクタ（|）があった。「|」はNamespace Separator（名前空間セパレータ）と呼ばれるもので、セレクタと名前空間（@namespace）を分離するために使われる。</description><pubDate>Thu, 05 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>place-itemsでaling-itemsとjustify-itemsを1行で指定する</title><link>https://bcrikko.github.io/til/posts/2024-09-05/place-items/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-05/place-items/</guid><description>place-itemsプロパティを使うとグリッドやフレックスボックスなどにおいて、align-itemsとjustify-itemsを1行で指定できる。</description><pubDate>Thu, 05 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Call-This Operatorを使ってオブジェクト指向と関数型の良いとこ取りをする</title><link>https://bcrikko.github.io/til/posts/2024-09-09/call-this-operator/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-09/call-this-operator/</guid><description>Call-This OperatorというProposalが提案されており、これを使うとオブジェクト指向プログラミング（OOP）と関数型プログラミング（FP）の良いとこ取りができる。Call-This Operatorを簡単に紹介すると、Function.property.call(this, ...args)を、~&gt;を使ってthis~&gt;fn(...args)のように表現することができる。※何年もStage 1のままで動きがないので、実際使えるようになるかはわからない。</description><pubDate>Mon, 09 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>スクロールバーの表示によるガタツキを防ぐscroll-gutter</title><link>https://bcrikko.github.io/til/posts/2024-09-12/scroll-gutter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-12/scroll-gutter/</guid><description>コンテンツの増減によりスクロールバーが表示されたり消えたりするときに、レイアウトがガタつくことがある。これを防ぐためにscroll-gutterプロパティを使うことができる。Safari TP 203が対応したことで、近い将来全主要ブラウザで利用可能になる。</description><pubDate>Thu, 12 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>setCustomValidity()でバリデーションメッセージの多言語対応をする</title><link>https://bcrikko.github.io/til/posts/2024-09-12/set-custom-validity/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-12/set-custom-validity/</guid><description>HTML標準のバリデーションでは、たとえばrequired属性を指定した場合は「このフィールドを入力してください。」というメッセージが表示される。HTMLInputElement:setCustomValidity()メソッドを使うことで、メッセージを変更できる。</description><pubDate>Thu, 12 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>select要素のスタイルをカスタマイズする</title><link>https://bcrikko.github.io/til/posts/2024-09-17/customizable-select/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-17/customizable-select/</guid><description>Chrome Canary 130がカスタマイズ可能なselect要素を実験的にサポートした。フロントエンドエンジニア大歓喜。chrome://flagsで#experimental-web-platform-featuresを有効にすることでselect要素のカスタマイズができるようになる。</description><pubDate>Tue, 17 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:targetを使ったLightbox UIの実装</title><link>https://bcrikko.github.io/til/posts/2024-09-18/lightbox-ui/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-18/lightbox-ui/</guid><description>画像をクリックすると拡大表示される機能をLightboxと呼ぶ。:target擬似クラスを使うことで、JavaScriptなしでも実装できる。</description><pubDate>Wed, 18 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>text-spacing-trimで括弧や句読点にできるスペースを調整する</title><link>https://bcrikko.github.io/til/posts/2024-09-18/text-spacing-trim/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-18/text-spacing-trim/</guid><description>日本語では「」や【】などの括弧や、や。などの句読点を使うことが多い。ただ、それらは全角扱いなので先頭が揃わない、文中に余分なスペースが生まれるなどの弊害があった。text-spacing-trimを使うことで、先頭や文中の括弧や句読点のスペースを調整することができる。</description><pubDate>Wed, 18 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:has()を使って前の兄弟要素を選択する</title><link>https://bcrikko.github.io/til/posts/2024-09-19/previous-siblings/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-19/previous-siblings/</guid><description>Selecting Previous Siblingsで:has()擬似クラスを使って、前の兄弟要素を選択する方法が紹介されていた。:has(+ &amp;)は、「マウスオーバーした要素（&amp;）が次にくる要素」を指している。正規表現の肯定先読みのようなもの。</description><pubDate>Thu, 19 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>改行されたinline要素のすべての行にスタイルを適用する</title><link>https://bcrikko.github.io/til/posts/2024-09-20/box-decoration-break/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-20/box-decoration-break/</guid><description>inline要素（インラインボックス）を改行すると、以下のようにborderが途中で切れたり、paddingを使うと前の行と要素が重なってしまったり、いろいろな問題があった。box-decoration-breakプロパティは、改行されたinline要素のすべての行にスタイルを適用でき、これらの問題を解決することができる。</description><pubDate>Fri, 20 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>サーバ？サーバー？外来語の末尾長音問題はJISZ8031:2019で変わった</title><link>https://bcrikko.github.io/til/posts/2024-09-24/jis-z8031-2019/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-09-24/jis-z8031-2019/</guid><description>サーバ？サーバー？コンピュータ？コンピューター？外来語の末尾長音は、以前のJIS規格では省略して書くことが推奨されていた。しかし、JISZ8031:2019では、原則長音をつける方針になった。</description><pubDate>Tue, 24 Sep 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>line-clampプロパティで表示する行数を制限する</title><link>https://bcrikko.github.io/til/posts/2024-10-01/line-clamp/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-01/line-clamp/</guid><description>Safari TP 204がリリースされ、line-clampプロパティが使えるようになった。他のブラウザは未対応のため、-webkit-ベンダープレフィックス付きのプロパティをいくつか使う必要がある。</description><pubDate>Tue, 01 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>image-renderingでピクセルアートのキレイに表示する</title><link>https://bcrikko.github.io/til/posts/2024-10-02/image-rendering/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-02/image-rendering/</guid><description>ピクセルアート（ドット絵）やQRコードのような小さな画像を拡大表示するとアンチエイリアスによって輪郭がぼやけてしまう。image-renderingで画像の拡大縮小時のアルゴリズムを指定することでアンチエイリアスを無効化できる。</description><pubDate>Wed, 02 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>VSCodeのミニマップにラベル（目印）をつける</title><link>https://bcrikko.github.io/til/posts/2024-10-04/vscode-minimap-label/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-04/vscode-minimap-label/</guid><description>VSCode には Minimap というファイル全体をプレビューする機能がある。// MARK: や // #region などを使うことでミニマップにラベル（目印）を表示できる。</description><pubDate>Fri, 04 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ES2025 Iterator Helpersを使う</title><link>https://bcrikko.github.io/til/posts/2024-10-16/iterator-helpers/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-16/iterator-helpers/</guid><description>2025年〜2026年のECMAScript界隈はイテレータ元年になりそうなほどIterator関連のProposalが承認された。そのなかでES2025の仕様に追加されることになったIterator Helpersについて学ぶ。</description><pubDate>Wed, 16 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>新しいHTTPリクエストメソッド QUERY</title><link>https://bcrikko.github.io/til/posts/2024-10-17/http-query-method/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-17/http-query-method/</guid><description>新しいHTTPリクエストメソッドのQUERYメソッドのドラフト仕様が公開された。QUERYメソッドは、データ取得やクエリの実行時など安全で冪等なクエリを実行するために使用される。クエリパラメータが大量に必要になる場合、GETメソッドではURIの長さ制限に引っかかり正確なリクエストができないことがある。慣習的にPOSTメソッドのリクエストボディを使ってリクエストすることがあるが、そもそもPOSTメソッドは冪等でない。</description><pubDate>Thu, 17 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Iterator Sequencingでイテレータを合成する</title><link>https://bcrikko.github.io/til/posts/2024-10-17/iterator-sequencing/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-17/iterator-sequencing/</guid><description>2024年10月にIterator SequencingがStage2.7にアップデートされた。Iterator SequencingはArray#concat()のように複数のイテレータを合成し、新しいイテレータを返す。この他のIterator関連のメソッドはIterator Helpersを参照。</description><pubDate>Thu, 17 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Optional Propertyの乱用は諸悪の根源</title><link>https://bcrikko.github.io/til/posts/2024-10-29/dont-use-optional-property/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-10-29/dont-use-optional-property/</guid><description>私は、数年来のOptional Propertyアンチ、Optional Property撲滅委員会 会長を務めている。なぜそこまでOptional Propertyを嫌うのか、その理由を説明し世の中から不要な?をなくしたい。</description><pubDate>Tue, 29 Oct 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Chrome DevToolsでスクロール可能要素を見つける</title><link>https://bcrikko.github.io/til/posts/2024-11-08/find-scrollable-element/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-08/find-scrollable-element/</guid><description>ChromeのDevTools（Elementsタブ）に、新たにscrollバッジが追加された。ElementsタブでHTMLを確認すると、スクロールできる要素の隣に(scroll)というバッジが表示されるようになった。UI開発でよくある2重スクロールや範囲外スクロールなどの調査が容易になった。</description><pubDate>Fri, 08 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>text-indentで段落の文字下げをする</title><link>https://bcrikko.github.io/til/posts/2024-11-08/text-indent/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-08/text-indent/</guid><description>国語の授業では「段落の1行目は1文字下げて書きましょう」と習った。これをCSSで実現するにはtext-indentを用いる。サンプルではemを使ったが、英語ならch（0の大きさ）、日本語ならic（水の大きさ）という単位を使うことで、文字サイズに応じて文字下げの量を調整できる。</description><pubDate>Fri, 08 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.7 RCの主なアップデート</title><link>https://bcrikko.github.io/til/posts/2024-11-11/typescript-5.7</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-11/typescript-5.7</guid><description>TypeScript 5.7 RCがリリースされた。初期化されていない変数のチェック ES2024をサポート、Node.js v22の新しいAPIを用いたコンパイルキャッシュ、クラス内のメソッドでComputed Property Namesをサポート、tsconfig.jsonの所有権チェック</description><pubDate>Mon, 11 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>import属性がなぜ必要なのか</title><link>https://bcrikko.github.io/til/posts/2024-11-15/import-attributes/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-15/import-attributes/</guid><description>ECMAScirpt 2025に追加予定のimport属性（import attributes）はなぜ必要なのか。import構文はブラウザで実行されるため、参照したファイルの中身が読み込むまでわからない。拡張子が*.jsonだからと言って本当にJSONである保証はない。改ざんされて悪意のあるコードが含まれるJavaScriptファイルという可能性もある。</description><pubDate>Fri, 15 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSだけでスクロールバーの幅を取得する</title><link>https://bcrikko.github.io/til/posts/2024-11-15/width-without-scrollbar/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-15/width-without-scrollbar/</guid><description>100vw - 100cqwでスクロールバーの幅がわかる。vw: ウェブページの表示領域（viewport）のwidthを100としたときの単位。cqw: クエリコンテナのwidthを100としたときの単位</description><pubDate>Fri, 15 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>BigIntで発生する誤差と対策</title><link>https://bcrikko.github.io/til/posts/2024-11-18/20000000000000000000000000000000000/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-18/20000000000000000000000000000000000/</guid><description> ロシアの裁判所、Googleに対し20000000000000000000000000000000000ドルを賠償請求か ロシアの裁判所がとんでもない額（200溝ドル = 2*10^34）という賠償請求を命じた。JavaScriptで安全に扱える数はNumber.MAX_SAFE_INTEGERの値である9007199254740991（2^53-1）までだ。なので、200溝ドルという桁を扱うためには、BigIntを使う必要がある。BigIntを使うにはBigIntコンストラクタを使うか、数値リテラルの末尾にnをつけて表現する。</description><pubDate>Mon, 18 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ブログにブラウザの対応状況を表示する</title><link>https://bcrikko.github.io/til/posts/2024-11-18/astro-baseline/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-18/astro-baseline/</guid><description>当ブログでは、一部ブラウザでしか使えないような機能を取り扱うことがある。毎回「対応状況: Chrome123, Edge, Safari, Firefox」みたいなことを書いていたのだが、手動で更新し続けるには限界がある。そこで、W3C WebDX Community Groupが公開しているbaseline-statusというWeb Componentsを使用する。</description><pubDate>Mon, 18 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>border-blockで論理的なブロック方向にボーダーを引く</title><link>https://bcrikko.github.io/til/posts/2024-11-18/logical-border/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-18/logical-border/</guid><description>Logical Propertiesのひとつであるborder-blockを使うことで、論理的なブロック方向にボーダーを引くことができる。「論理的なブロック方向」とは縦書き、横書き、右から読む、左から読むなど言語によってwriting-modeが異なっても、意味的に正しい方向を指す。</description><pubDate>Mon, 18 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Amazonで使える便利ブックマークレット集</title><link>https://bcrikko.github.io/til/posts/2024-11-19/amazon-bookmarklet/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-19/amazon-bookmarklet/</guid><description>検索結果を「販売元: Amazon」に限定する。マーケットプレイスで商品を出品している中華系企業は、ごくごく一部を除き出品ガイドラインを守っていない。商品ページのURLからクエリストリングを削除する。Amazon内ではユーザーの行動をトラッキングするために様々なクエリストリングがURLに付与される。</description><pubDate>Tue, 19 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>成長のために戦略的に学ぶ</title><link>https://bcrikko.github.io/til/posts/2024-11-20/how-to-study/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-20/how-to-study/</guid><description>2019年頃から新しい技術（フレームワーク、ライブラリ、ツールなど）を積極的に追うことをやめた。フロントエンドエンジニアとして働く上で新しい技術を学ぶことは重要だし、学ぶことをやめたらエンジニアとして生きていけないとも思っている。しかし、界隈の流行り廃りは激しく、5年後に使える技術は数えるほどしか残らない。どんなに学んでも常に飢えている状態だった。有限な時間を有効活用するために新しいだけの技術には飛びつかず戦略的に学習することにした。</description><pubDate>Wed, 20 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ToggleEventを使ってPopoverの開閉を検知する</title><link>https://bcrikko.github.io/til/posts/2024-11-20/toggle-event/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-20/toggle-event/</guid><description>ToggleEventを使うことで、Popoverの開閉を検知することができる。ToggleEventのoldState/newStateプロパティで、open/closedの状態を取得できる。dialog#showModal()を使った場合、ブラウザによってToggleEventが発火しないことがある。</description><pubDate>Wed, 20 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>DRY原則の誤解と乱用</title><link>https://bcrikko.github.io/til/posts/2024-11-21/misunderstanding-about-dry/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-21/misunderstanding-about-dry/</guid><description>下手に共通化するくらいなら重複したままのほうがマシだ。プログラミングの原則の中で、初心者が最初に触れるであろう「DRY原則（※）」は誤解されやすく、適用の容易さから乱用されやすい。</description><pubDate>Thu, 21 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>showPicker()でinput要素のDatePickerやSelect要素のドロップダウンメニューを表示する</title><link>https://bcrikko.github.io/til/posts/2024-11-21/show-picker/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-21/show-picker/</guid><description>type=&apos;date&apos;やtype=&apos;color&apos;属性を指定したinput要素を、HTMLInputElement#showPicker()メソッドを使うことでJavaScriptから表示できる。同じようにselect要素のドロップダウンメニューをHTMLSelectElement#showPicker()メソッドを使って表示することもできる。</description><pubDate>Thu, 21 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>シニアエンジニアとイシュースカベンジャーの苦悩</title><link>https://bcrikko.github.io/til/posts/2024-11-22/issue-scavenger/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-22/issue-scavenger/</guid><description>誰もやりたがらないIssueは、誰もやらないまま残り続け、やがてゴミになる。例を挙げるとすれば以下のようなものだ。リファクタリングなど、成果が見えづらいIssue。ライブラリアップデートなど、面倒臭いIssue。納期があるからと後回しにしたIssue</description><pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>兄弟セレクタ（次兄弟結合子）で兄要素を取得する</title><link>https://bcrikko.github.io/til/posts/2024-11-22/previous-siblings/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-22/previous-siblings/</guid><description>:has()擬似クラスと兄弟セレクタ（次兄弟結合子）を使うことで、兄要素が取得できる。</description><pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSでマーカー風アンダーラインを引く方法</title><link>https://bcrikko.github.io/til/posts/2024-11-22/text-decoration-skip-ink/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-22/text-decoration-skip-ink/</guid><description>text-decorationのunderlineを使うことで、&lt;strong&gt;の文字にマーカーのようなunderlineを引ける。使うプロパティは以下の通り。text-decoration.&lt;a&gt;やリンクのようなunderlineのスタイルを指定するプロパティ。text-underline-offset。underlineの位置を調整するプロパティ。text-decoration-skip-ink。アルファベットのunderlineが途切れないようにするプロパティ</description><pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>text-decorationの下線の位置をtext-underline-offsetで調整する</title><link>https://bcrikko.github.io/til/posts/2024-11-22/text-underline-offset/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-22/text-underline-offset/</guid><description>主にリンクに使われるtext-decorationの下線の位置をtext-underline-offsetを使うことで調整できる。pxやemなどの&lt;length&gt;や&lt;percentage&gt;の値を指定できる。また、負の値も指定できる。</description><pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>「実装のしやすさ」はコード品質の正しい指標か</title><link>https://bcrikko.github.io/til/posts/2024-11-23/quality-of-code/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-23/quality-of-code/</guid><description>コードの品質を測るためには、さまざまな品質評価指標がある。この「実装のしやすさ」は実に厄介だ。</description><pubDate>Sat, 23 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>仕事をしてない人がやっている仕事</title><link>https://bcrikko.github.io/til/posts/2024-11-23/who-dont-work/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-23/who-dont-work/</guid><description>仕事をしてない人がやっている仕事</description><pubDate>Sat, 23 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSの三角関数を活用してローダーをつくる</title><link>https://bcrikko.github.io/til/posts/2024-11-24/trigonometric-functions-in-css/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-24/trigonometric-functions-in-css/</guid><description>CSSで三角関数（sin()、cos()など）が使えるようになった。社会では役に立たないと言われがちな三角関数だが、全然そんなことない。JavaScriptのMath.sin()やMath.cos()では、引数をラジアン（弧度法）に変換しなければならないのだが、CSSの三角関数は優秀で角度（度数法）のdegを渡すだけでよい。</description><pubDate>Sun, 24 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>身近にいる目標にしている人たち</title><link>https://bcrikko.github.io/til/posts/2024-11-25/engineers-i-respect/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-25/engineers-i-respect/</guid><description>みなさんは身近に尊敬できる、または目標している人はいるだろうか？私には2人いる。1人は前職でお世話になったリーダー。もう1人は現職の上司だ。</description><pubDate>Mon, 25 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ブラウザからインターネット接続状態を取得する</title><link>https://bcrikko.github.io/til/posts/2024-11-25/navigator-online/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-25/navigator-online/</guid><description>Navigator#onLineプロパティを使うことで、ブラウザからインターネット接続の状態を取得できる。online/offlineイベントをリスンすることで、インターネット接続の状態が変化したときに処理を実行できる。</description><pubDate>Mon, 25 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>エンジニア人生で最も影響を受けた本 3選</title><link>https://bcrikko.github.io/til/posts/2024-11-26/favourite-books/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-26/favourite-books/</guid><description>エンジニアにとってこれまでに読んできた本は、その人のマインドセットを知るうえで重要な情報源だ。なので、まずは自分から 「なぜ今のような考え、思想に至ったか」「その根底にあるはなにか」 を説明するために、過去に読んできた250冊以上の技術書やビジネス書の中から、とくに影響を受けた3冊の本を紹介する。</description><pubDate>Tue, 26 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>経験を積むほどつまらない回答しかできなくなる</title><link>https://bcrikko.github.io/til/posts/2024-11-27/a-boring-answer/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-27/a-boring-answer/</guid><description>A. 場合による。こんな曖昧な答えに物足りなさを感じる。特に、明確な回答を求めている質問者にとっては不満に思えるかもしれない。しかし、経験を積んだ人ほど「場合による」と言いがちだ。</description><pubDate>Wed, 27 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>コミュニケーションコストは必要経費だからケチらない</title><link>https://bcrikko.github.io/til/posts/2024-11-28/communication-cost/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-28/communication-cost/</guid><description>コミュニケーションは面倒だ。やりとりにかかる時間だけでなく、何度も質問したり確認したりすることは心理的にもハードルが高い。なので心優しい人は相手の負担にならないように、気持ちを想像して仕事をしようとする。</description><pubDate>Thu, 28 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ESLint + stylisticでswitch文のindentが修正できない</title><link>https://bcrikko.github.io/til/posts/2024-11-28/conflict-eslint-between-tslint/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-28/conflict-eslint-between-tslint/</guid><description>VSCodeでeslintをtypescript-eslintを使っているとき、switch文のindentで2つのルールがコンフリクトして上書き合戦がはじまってしまう。eslintからformatter関連の機能が削除されたため、stylisticで代用する。</description><pubDate>Thu, 28 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>イチからつくり直したほうが速い、という幻想</title><link>https://bcrikko.github.io/til/posts/2024-11-29/development-of-fantasy/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-29/development-of-fantasy/</guid><description>「いまあるものを活かしながら手直ししていく方法だと２年かかります。イチからつくり直していいのであれば、半年でやります。」任天堂の元社長であり、天才プログラマーと呼ばれた岩田聡氏が、MOTHER2の開発が行き詰まっているときに糸井重里氏に放った言葉だ。技術的負債が詰まったプロジェクトに参画したプログラマーなら誰もが「イチからつくり直したほうが速い」と考えるだろう。しかし、「イチからつくり直す」という選択肢は理想に見えるが、現実は残酷だ。</description><pubDate>Fri, 29 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>VitestでPromiseを返すメソッドのテストで警告が出る</title><link>https://bcrikko.github.io/til/posts/2024-11-29/vitest-auto-awaits/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-11-29/vitest-auto-awaits/</guid><description>Promise returned by expect(actual).resolves.toEqual(expected) was not awaited. Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. Please remember to await the assertion. VitestでPromiseを返すメソッドをテストするときに、上記のような警告がでる。要約すると「Vitest@2では自動でawaitするけど、Vitest@3になったら失敗するよ」という内容。</description><pubDate>Fri, 29 Nov 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Fetch APIのkeepaliveを使ってページ離脱後でもレスポンスを処理する</title><link>https://bcrikko.github.io/til/posts/2024-12-02/fetch-keepalive/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-02/fetch-keepalive/</guid><description>Firefox 133がサポートしたことで、全主要ブラウザでFetch APIのkeepaliveオプションが使えるようになった。keepaliveオプションを使うことで、ページを閉じたり離脱したりしたあとでもレスポンスを適切に扱える。</description><pubDate>Mon, 02 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>GitHub Actionsでnpm publishを自動化する</title><link>https://bcrikko.github.io/til/posts/2024-12-03/publish-npm-package-using-github-actions/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-03/publish-npm-package-using-github-actions/</guid><description>npm publishを手作業でやるのは大変なので、GitHub Actionsを使ってやってみる。</description><pubDate>Tue, 03 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>「サニタイズ言うなキャンペーン」から技術書の正しい書き方を理解する</title><link>https://bcrikko.github.io/til/posts/2024-12-04/dont-say-sanitize/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-04/dont-say-sanitize/</guid><description>SNSを見ていたら「サニタイズ言うなキャンペーン」が2000年代に行われていたことを知る。高木さんの記事を読んでみても、当時の状況を知らない私にとってはいまいちピンとこなかったので、思考をまとめる意味でも書き出してみる。</description><pubDate>Wed, 04 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>attr()でデフォルト値を設定する</title><link>https://bcrikko.github.io/til/posts/2024-12-05/attr-fallback/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-05/attr-fallback/</guid><description>Safari TP 208でattr()のフォールバックをサポートした。2024年12月現在では、Safari TPとFirefoxでのサポートしている。CSS Variablesのフォールバックのようにattr(attribute-name[, &lt;fallback&gt;])のように指定できる。</description><pubDate>Thu, 05 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>前任者の臭いを消す仕事</title><link>https://bcrikko.github.io/til/posts/2024-12-05/remarking-work/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-05/remarking-work/</guid><description>担当者が変わったタイミングで、いままで使っていたサービスや技術スタック、制度、人事などをまるっと変わることがある。技術スタックで言えば昔の某技術知識共有サービスとか。私はそれを「前任者の臭いを消す仕事」と呼んでいる。と同時に、自分を絶対正義とする政治臭・宗教臭がするからあまり好きじゃない。</description><pubDate>Thu, 05 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScript Proposalの2024年12月のアップデート内容</title><link>https://bcrikko.github.io/til/posts/2024-12-09/ecmascript-proposal-updates/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-09/ecmascript-proposal-updates/</guid><description>先日105回目のミーティングで、ECMAScriptの各種プロポーザルがアップデートされた。New Proposals Sync Imports: stage 1 Stabilize: stage 1 More Currency Display  hoices: stage 2 Updated Proposals Immutable ArrayBuffers: stage 1→2 Error.isError: stage 2.7→3 Intl.DurationFormat: 3→4</description><pubDate>Mon, 09 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>注釈を表現するためにu要素を使う</title><link>https://bcrikko.github.io/til/posts/2024-12-12/underline-element/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-12/underline-element/</guid><description>u要素は、もともとunderline要素と呼ばれ下線を引くために用いられてきたが、HTML4で非推奨となった。しかし、HTML5では「固有名詞に注釈をつける」「スペルミスを表現する」などの意味になって復活した。</description><pubDate>Thu, 12 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSだけでOverflowやスクロールバーの表示を検出する</title><link>https://bcrikko.github.io/til/posts/2024-12-13/detect-overflow/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-13/detect-overflow/</guid><description>Scroll-Driven Animationの機能を使うことで、CSSだけでOverflowやスクロールバーの表示を検出できる。Scroll-Driven Animation（スクロール駆動アニメーション）のサポート状況は、以下の通り。</description><pubDate>Fri, 13 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Node 23.4.0のassert.partialDeepStrictEqualを試す</title><link>https://bcrikko.github.io/til/posts/2024-12-13/node-23.4.0</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-13/node-23.4.0</guid><description>Node.js 23.4.0がリリースされ、その中でassert.partialDeepStrictEqualが実験的に導入された。よくあるdeepStrictEqualとの違いは、テストの中で追加、または変更されたプロパティだけをテストできるという点である。</description><pubDate>Fri, 13 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>background-clipでテクスチャ画像を使ったテキストやボーダーを表現する</title><link>https://bcrikko.github.io/til/posts/2024-12-16/background-clip-border-area/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-16/background-clip-border-area/</guid><description>Safari 18.2でbackground-clip: border-areaがサポートされた。background-clipを使うことで、background-imageなどで指定した背景を切り抜き、表示することができる。</description><pubDate>Mon, 16 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>SQL Injectionの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2024-12-17/sql-injection/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-17/sql-injection/</guid><description>SQL Injectionとは、データベース操作を悪用するサイバー攻撃のひとつ。攻撃者が不正なSQLコードを入力フォームやクエリパラメータなどに挿入してデータベースを不正に操作することで、秘匿情報の取得（情報漏えい）や破壊、不正な変更をする攻撃だ。</description><pubDate>Tue, 17 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>::details-content疑似要素でdetails要素の中身をスタイリングする</title><link>https://bcrikko.github.io/til/posts/2024-12-19/details-content/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-19/details-content/</guid><description>details要素に関連して::details-content疑似要素がサポートされはじめている。執筆時点では、Chrome、Edge、Safari TP 210でサポートしている。</description><pubDate>Thu, 19 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>@media printと@pageの違いと使い分け</title><link>https://bcrikko.github.io/til/posts/2024-12-20/at-page/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-20/at-page/</guid><description>Safari 18.2がサポートしたことで、全主要ブラウザで@pageが使えるようになった。@media printは印刷用に変更するスタイル（サイドバーを消す、色をモノクロにするなど）を設定するためのもので、@page`は印刷時のページサイズ（A4、B5など）や向き（縦、横向き）、さらに左上にページ番号を振る、というような印刷オプションを設定するためのものだ。</description><pubDate>Fri, 20 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>::target-textでscroll-to-textを強調する</title><link>https://bcrikko.github.io/til/posts/2024-12-20/target-text/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-20/target-text/</guid><description>https://example.com#:~:text={target}という該当テキストの選択箇所へリンクする方法がある。そのときにどの部分が選択されているかを指すための::target-textという疑似要素が、全主要ブラウザで利用可能になった。</description><pubDate>Fri, 20 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>conic-gradientを使った円グラフパターン</title><link>https://bcrikko.github.io/til/posts/2024-12-21/creative-border/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-21/creative-border/</guid><description>グラデーション関連のCSS関数に、conic-gradient()がある。この関数は放射状のグラデーションを作ることができ、応用することで円グラフがCSSだけで簡単に作れる。</description><pubDate>Sat, 21 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>クエリコンテナ単位とaspect-ratioを使ったマガジンUI</title><link>https://bcrikko.github.io/til/posts/2024-12-24/query-container/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-24/query-container/</guid><description>ブログやニュースサイトなど、トップページに記事が並んでいるデザインを作るときに、クエリコンテナ単位やaspect-ratioを使うと、最小のCSSでレスポンシブなページを実装できる。</description><pubDate>Tue, 24 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Cross-Site Request Forgery（CSRF）の攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2024-12-25/cross-site-request-forgery/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-25/cross-site-request-forgery/</guid><description>Cross-Site Request Forgery（CSRF）とは、意図しないリクエストを別のウェブアプリケーションに送信させる攻撃手法のこと。被害者が認証済みのセッションを保持している場合に、攻撃者が被害者の権限を悪用して不正な操作を実行させる可能性がある。</description><pubDate>Wed, 25 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Gridを使ったグラフ表示</title><link>https://bcrikko.github.io/til/posts/2024-12-25/css-grid-graph/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-25/css-grid-graph/</guid><description>CSS Grid Layoutが全主要ブラウザで利用可能になったことで、いままでCanvasやSVGでがんばっていたグラフ描画も、HTMLとCSSだけで簡単に実装できるようになった。HTMLでグラフが書けるメリットは、レスポンシブで、かつアクセシビリティに有効であるという点に尽きる。</description><pubDate>Wed, 25 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>light-dark()を使ったテーマカラー管理手法</title><link>https://bcrikko.github.io/til/posts/2024-12-26/css-light-dark/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-26/css-light-dark/</guid><description>light-dark()は、2つの色を関数にわたすことで、ユーザー環境に合わせてテーマカラーを変えることができる。また、メディアクエリのprefers-color-schemeを使わなくてもテーマを変更できる。</description><pubDate>Thu, 26 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>importmapで依存関係を管理する</title><link>https://bcrikko.github.io/til/posts/2024-12-27/importmap/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-27/importmap/</guid><description>昨今のフロントエンド開発は、バンドル前提が主流になっている。外部パッケージを含めたすべてのコードを、ひとつ、ないし数個のファイルにまとめて提供することで、依存関係の管理が容易になる。反面、頻繁に変更が入るコードとそうでないコードがひとつのファイルとして扱われるため、キャッシュができず、毎回大きなファイルを読み込むため、パフォーマンスが悪化するというデメリットがある。</description><pubDate>Fri, 27 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>昨今のブラウザ事情と多様性</title><link>https://bcrikko.github.io/til/posts/2024-12-28/dear-browsers/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2024-12-28/dear-browsers/</guid><description>Firefoxって現代のIEだよねw冗談で言ったことが引用され「ダーシノさんが言っていた」とFirefoxのサポートをやめたいという主張の根拠として扱われてしまうことがあった。不用意な発言に反省しつつ、ブラウザの多様性について向き合ったので、せっかくなので昨今のブラウザ事情とその重要性について語りたい。（※私が感じている状況なので、実際とは異なるかもしれません）</description><pubDate>Sat, 28 Dec 2024 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Directory Traversalの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-14/directory-traversal/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-14/directory-traversal/</guid><description>Directory Traversalとは、攻撃者がWebアプリケーションの不適切な入力処理を悪用して、通常はアクセスが許可されていないサーバー上のファイルやディレクトリにアクセスする攻撃手法のこと。Traversalとは「横断」という意味なので、ディレクトリを横断して本来アクセスできないディレクトリやファイルにアクセスすることを指す。</description><pubDate>Tue, 14 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Insecure Deserializationの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-15/insecure-deserialization/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-15/insecure-deserialization/</guid><description>Insecure Deserializationとは、信頼できないデータをデシリアライズする際に発生する脆弱性を利用した攻撃手法のこと。攻撃者はデータを改ざんし、不正なオブジェクトを生成して悪用することが可能になる。</description><pubDate>Wed, 15 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>dialog要素の背面のスクロールを無効化する</title><link>https://bcrikko.github.io/til/posts/2025-01-16/disable-scrolling-dialog/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-16/disable-scrolling-dialog/</guid><description>&lt;dialog&gt;要素（モーダルダイアログ）を表示するときに注意したいのが、元の要素のスクロール。 overscroll-behaviorで対処できなくはないが、カーソルが外れるとダイアログの裏側要素がスクロールされてしまう。</description><pubDate>Thu, 16 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS text-box-trimでテキストの上下のスペースをカスタマイズする</title><link>https://bcrikko.github.io/til/posts/2025-01-16/text-box-trim/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-16/text-box-trim/</guid><description>日本語では気になる場面は少ない。しかし、英語の場合は、テキストの上下のスペースにより中心線がズレて見えたり、スペースのリズムが崩れているように見えたりする。text-boxプロパティを使うことで、開発者自身がテキストの上下のスペースをカスタマイズできるようになった。</description><pubDate>Thu, 16 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScript 正規表現のパターン修飾子の使い方</title><link>https://bcrikko.github.io/til/posts/2025-01-17/regexp-pattern-modifiers/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-17/regexp-pattern-modifiers/</guid><description>2024年10月にRegExp Modifiersの提案がStage 4に更新された。おそらくECMAScript 2025に含まれることが予想される。正規表現のフラグはすべてに適用されてしまう。RegExp Modifiersのパターン修飾子を使うと、iなどのフラグを一部にだけ適用することができる。</description><pubDate>Fri, 17 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>現役エンジニアが令和7年共通テスト「情報I」を解説する</title><link>https://bcrikko.github.io/til/posts/2025-01-20/the-common-test-for-university-admissions/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-20/the-common-test-for-university-admissions/</guid><description>2025年1月18日（土）、19日（日）の2日間にわたり、令和7年度の大学入学共通テストが行われた。著者は、現役プログラマとしてキャリアを積んでいるので「情報I」程度の問題は全問正解できないといけないので、実際に解いてみた。ついでに自分自身の振り返りも兼ねて解説してみた。</description><pubDate>Tue, 21 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Cross-Site Scripting（XSS）の攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-22/cross-site-scripting/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-22/cross-site-scripting/</guid><description>{ページの概要}</description><pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>chownコマンドでグループ指定する際の区切り文字</title><link>https://bcrikko.github.io/til/posts/2025-01-23/chown/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-23/chown/</guid><description>chown（CHange OWNer）とは、ファイルやディレクトリの所有者情報を変更する際に使用するコマンドである。ユーザやグループ単位でファイル/ディレクトリのパーミッションを管理することができる。区切り文字をドットやコロンを使うことがある。</description><pubDate>Thu, 23 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS @counter-styleを使ったリストマークのカスタマイズ</title><link>https://bcrikko.github.io/til/posts/2025-01-24/counter-style/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-24/counter-style/</guid><description>@counter-styleを使うことで、カウンターによってリストマークをカスタマイズすることができる。同じようにリストマークを変更するlist-styleプロパティもあるのだが、こちらはすべてのリストマークが変更されてしまう。（※nth-childなどを使えば1つずつ変更できないこともない）</description><pubDate>Fri, 24 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>新しいattr()では&lt;color&gt;や&lt;length&gt;などが取得できる</title><link>https://bcrikko.github.io/til/posts/2025-01-28/brandnew-attr/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-28/brandnew-attr/</guid><description>attr()という要素の属性の値を受け取ってCSS内で使用できる機能が進化して、&lt;color&gt;や&lt;length&gt;などを受け取れるようになった。この仕様は、CSS Values and Units Module Level 5のWOrking Draftで策定されている。</description><pubDate>Tue, 28 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>XML External Entity（XXE）の攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-28/xml-external-entity/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-28/xml-external-entity/</guid><description>XML External Entity（XXE）とは、XMLドキュメントのEntity定義を悪用し外部のファイルを参照することでサーバー内などにある機密情報を抜き取ったり、External Entityを利用したDoS攻撃を行う攻撃手法のこと。</description><pubDate>Tue, 28 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Clickjackingの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-29/cickjacking/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-29/cickjacking/</guid><description>Clickjackingとは、攻撃者がユーザーに意図しないクリックをさせる攻撃手法のこと。攻撃者は透明な要素（transparentやopacity:0など）や偽装した要素を画面上に配置し、ユーザーが意図しないボタンやリンクをクリックさせるように誘導する。海外のちょっとアレなサイトを見ているときによく遭遇するやつだ。</description><pubDate>Wed, 29 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>text-strokeとpaint-orderで縁取り文字や袋文字を表現する</title><link>https://bcrikko.github.io/til/posts/2025-01-29/text-stroke/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-29/text-stroke/</guid><description>text-strokeとpaint-orderを使うことで、いままで文字が潰れてしまっていた縁取り文字や袋文字がCSSだけで表現できるようになった。</description><pubDate>Wed, 29 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TypeScript 5.8 リリースノート</title><link>https://bcrikko.github.io/til/posts/2025-01-30/typescript-5.8</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-30/typescript-5.8</guid><description>TypeScript 5.8の主なアップデートをまとめました。</description><pubDate>Thu, 30 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>OS Command Injectionの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-01-31/os-command-injection/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-01-31/os-command-injection/</guid><description>OS Command Injectionとは、アプリケーションがOSコマンドを実行する機能を提供したり、同等の機能を実装したりする際に、悪意のあるコマンドを実行させる攻撃手法のこと。攻撃者がサーバー上で任意のコマンドを実行し、管理権限を奪ったり、データを盗んだり、破壊したり、さらなる攻撃の踏み台にされたりすることが可能になる。</description><pubDate>Fri, 31 Jan 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Header Injectionの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-02-01/header-injection/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-01/header-injection/</guid><description>Header Injectionとは、HTTPヘッダを用いて任意のデータを送信する攻撃手法のこと。</description><pubDate>Sat, 01 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Open Redirectionの攻撃手法と対策</title><link>https://bcrikko.github.io/til/posts/2025-02-01/open-redirection/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-01/open-redirection/</guid><description>Open Redirectionとは、任意のURLにリダイレクトさせる攻撃手法のこと。リダイレクトの仕組みを用い、ユーザーの秘匿情報の盗取やマルウェア配布などを行うことができる。</description><pubDate>Sat, 01 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Temporalオブジェクトを使った日付・時刻操作</title><link>https://bcrikko.github.io/til/posts/2025-02-12/javascript-temporal/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-12/javascript-temporal/</guid><description>FirefoxがTemporalオブジェクトをExperimentalとしてリリースした。Temporalオブジェクトを使うことで、JavaScriptによる日付・時刻操作が大幅に簡素化され、dayjs、date-fns（やmoment.js）などのライブラリを使わなくても、同様な機能をネイティブがサポートしてくれるようになる。</description><pubDate>Wed, 12 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>オンラインコミュニケーションでのリアクションは過剰なくらいがちょうど良い</title><link>https://bcrikko.github.io/til/posts/2025-02-13/over-reaction/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-13/over-reaction/</guid><description>現職では、2016年からリモートワークが導入され、コロナ禍を経て、現在では推奨される働き方になっている。リモートワークにおける生産性やコミュニケーションについては多くの議論があるが、ここでは「オンラインミーティング」に絞って語りたい。</description><pubDate>Thu, 13 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>意見が合わないときは超好意的に解釈してみる</title><link>https://bcrikko.github.io/til/posts/2025-02-14/be-favorably/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-14/be-favorably/</guid><description>意見があわない相手とのコミュニケーションは、大きなストレスになる。ちょっとしたすれ違いが積み重なり、相手の思想や人格まで嫌になってしまうこともある。私自身、その許容量が少ないため、すぐに人を遠ざけてしまいがちだ。</description><pubDate>Fri, 14 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ベクトルと内積</title><link>https://bcrikko.github.io/til/posts/2025-02-15/vector/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-15/vector/</guid><description>妥協しないデータ分析のための 微積分+線形代数入門で微積分・線形代数の学び直しをしている。その中で学んだことを忘れないように自分の言葉でまとめたい。ベクトル（Vector）とは、値が並んでいるものを指す。そして、その値の個数が次元と呼ばれる。</description><pubDate>Sat, 15 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>AstroでKaTeXで書いた数式をMathMLに変換して表示する</title><link>https://bcrikko.github.io/til/posts/2025-02-16/astro-math/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-16/astro-math/</guid><description>当ブログはAstroというSSG（静的サイトジェネレータ）を使っている。また、記事はMarkdownを拡張したMDXというフォーマットを用いて書いている。数学で学んだことを記事にする際、プレーンテキストでは微積分や行列などの数式を表現することが難しい。そのため、KaTeX（LaTeXのJavaScriptライブラリ）の記法を使ってコードブロック内に数式を表現したい。</description><pubDate>Sun, 16 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CanvasRenderingContext2D#fillText()を文字長に応じて自動改行する</title><link>https://bcrikko.github.io/til/posts/2025-02-18/canvas-linebreak/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-18/canvas-linebreak/</guid><description>Canvas APIは、ブラウザでゲーム開発や画像生成をするためには必要不可欠なAPIだ。しかし、テキストを描画するCanvasRenderingContext2D#fillText()には、自動改行できないという弱点がある。第3引数でmaxWidthを指定できるのではみ出すことはないが、改行ではなく文字列が圧縮されてしまう。そこでCanvasRenderingContext2D.measureText()を使って、文字列の幅を計測し、maxWidthに到達しそうになったら改行するという処理が必要になる。</description><pubDate>Tue, 18 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>transform: scale()とzoomプロパティの違い</title><link>https://bcrikko.github.io/til/posts/2025-02-19/scale-vs-zoom/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-19/scale-vs-zoom/</guid><description>いままでCSSで要素や画像を拡大・縮小するにはtransform: scale()を用いるのが一般的であったが、2024年に新たにzoomプロパティがBaselineに追加された。この2つの機能の違いについてまとめる。</description><pubDate>Wed, 19 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>漏れのある抽象化の法則（The Law of Leaky Abstractions）</title><link>https://bcrikko.github.io/til/posts/2025-02-21/the-law-of-leaky-abstractions/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-21/the-law-of-leaky-abstractions/</guid><description>先日、同僚との会話のなかで「漏れのある抽象化の法則」が話題にあがった。 初耳法則だったので、原文を読み自分なりの言葉でまとめたい。※原文と異なる解釈があるかもしれないので、Joel氏の記事を読むことをオススメする。</description><pubDate>Fri, 21 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>position: fixedの基準を親要素にあわせる</title><link>https://bcrikko.github.io/til/posts/2025-02-22/position-fixed/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-22/position-fixed/</guid><description>position: fixed;を指定すると、ドキュメントフローから除外され、Initial Containing Block（最初の包含ブロック ≒ viewport ≒ ブラウザの表示領域）を基準に配置される。通常は親要素を基準にしたposition: fixedは使用できない。対策として以下の2つがある。transformプロパティを使ったCSSハック。containプロパティを使った制御（推奨）。</description><pubDate>Sat, 22 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>scrollendイベントでスクロールの完了タイミングを検知する</title><link>https://bcrikko.github.io/til/posts/2025-02-22/scrollend-event/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-22/scrollend-event/</guid><description>scrollendイベントを使うことで、スクロールが完了したタイミングを検知できる。スクロールによるアニメーションやロードなどが使われるようなウェブサイトで効果を発揮する。</description><pubDate>Sat, 22 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Clean CodeとA Philosophy of Software Designの共通点と相違点</title><link>https://bcrikko.github.io/til/posts/2025-02-26/aposd-vs-clean-code/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-26/aposd-vs-clean-code/</guid><description>Clean Codeの著者:Robert C.Martin氏（以下、UBと呼ぶ）とA Philosophy of Software Designの著者:John K. Ousterhout氏（以下、JOHNと呼ぶ）の対談がGitHubで公開されていた。そこで、両者の言い分を整理してみる。</description><pubDate>Wed, 26 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>階層によってh1要素のfont-sizeがかわる歴史的背景</title><link>https://bcrikko.github.io/til/posts/2025-02-27/h1-font-size/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-02-27/h1-font-size/</guid><description>階層が深くなるにつれ、h1要素のfont-sizeがどんどん小さくなり、3階層目にはh1要素とh2要素のfont-sizeが逆転してしまう。実際にHTML Living Standardの仕様を見てみると以下のようになっていた。</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 3月号</title><link>https://bcrikko.github.io/til/posts/2025-03-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-01/monthly-letter/</guid><description>2025年2月に投稿された記事をHTML、CSS、JavaScript、その他のカテゴリごとにまとめて紹介する。各記事の要点を簡潔に要約し、最新の技術動向や知見を振り返る。</description><pubDate>Sat, 01 Mar 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>ウェブに関する標準化団体やグループと活動内容</title><link>https://bcrikko.github.io/til/posts/2025-03-01/web-communities/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-01/web-communities/</guid><description>ウェブに関する団体はいくつもあり、どこで何をやっているのか、我々フロントエンドエンジニアにどんな影響があるのか、簡単にまとめる。</description><pubDate>Sat, 01 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Firefox136でAIにページを要約させる</title><link>https://bcrikko.github.io/til/posts/2025-03-06/firefox-with-ai/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-06/firefox-with-ai/</guid><description>Firefox 136がリリースされた。今回のリリースの目玉機能は「Sidebar tooles include an AI chatbot」だ。FirefoxのサイドバーにChatGPTやGeminiなどを表示し、ブラウザで表示している内容を渡して処理できるという機能である。この機能を使うことで、ページに表示されている文章をそのままAIに渡して、要約や説明、クイズ作成などができる。</description><pubDate>Thu, 06 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>インポスター症候群に耐える</title><link>https://bcrikko.github.io/til/posts/2025-03-07/imposter-syndrome/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-07/imposter-syndrome/</guid><description>インポスター症候群とは、自分の成果や能力が過剰に評価されているのではないか？と自身の力を信じられない心理状態を指す。とくに令和のエンジニアバブルでは、引く手あまたで能力以上の報酬が提示されたり、逆に相場上昇のせいで今の年収と比べて自分には能力がないと思ってしまう、そんな人が多いのではないだろうか？</description><pubDate>Fri, 07 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>脳が反応する前にブロックするインターネットサバイバル術</title><link>https://bcrikko.github.io/til/posts/2025-03-08/internet-survival/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-08/internet-survival/</guid><description>ありがたいことに定期的にツイートや記事を拡散していただいて、賛否はあれど私の主張が多くの人に届くことは素直に嬉しい。ただ、拡散度合いが一定ラインを超えると急激に怖い人が増えてくる。</description><pubDate>Sat, 08 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Popover=hintの使い方</title><link>https://bcrikko.github.io/til/posts/2025-03-11/popover-hint/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-11/popover-hint/</guid><description>Popover APIの新しいモードとしてhintが導入されようとしている。デフォルトのpopover=autoの場合、popoverで表示した要素が排他的に制御されるため、一度に複数のポップオーバーを表示することができない。popover=hintを使うことで、popoverメニューを表示しながらツールチップを表示するという処理が実現できる。</description><pubDate>Tue, 11 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Parse, don&apos;t validate（型駆動設計）のメリット</title><link>https://bcrikko.github.io/til/posts/2025-03-12/parse-dont-validate/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-12/parse-dont-validate/</guid><description>Parse, don’t validateを読んだので、そこで理解した内容をまとめる。Parse, don’t validateとは、データを単に検証（validate）するのではなく、解析（parse）して適切なデータ型や構造に変換しようという考え方だ。</description><pubDate>Wed, 12 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>フロントエンドエンジニアのためのHaskell入門</title><link>https://bcrikko.github.io/til/posts/2025-03-20/haskell/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-20/haskell/</guid><description>JavaScriptのなんちゃって関数型プログラミングではなく、純粋な関数型プログラミングのエッセンスを学びたくてHaskellを選び、過去3回入門したが3回破門されたので、今度こそ免許皆伝したい。普段はTypeScriptで開発を行っているので、Haskellと比較しながら学んでいきたい。</description><pubDate>Thu, 20 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Invoker Commands APIのcommand/commandforを使って宣言的に動作を割り当てる</title><link>https://bcrikko.github.io/til/posts/2025-03-24/invoker-commands-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-24/invoker-commands-api/</guid><description>Popover APIのように、インタラクティブ要素と操作対象の要素をHTML属性で紐づけ、操作することができるInvoker Commands APIが、主要ブラウザに実験的に実装されている。Invoker Commands APIでは、それらの属性の代わりにcommand属性とcommandfor属性を使って、より宣言的にわかりやすい紐づけができるようになる。</description><pubDate>Mon, 24 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Relative Colorsで色を柔軟に扱う</title><link>https://bcrikko.github.io/til/posts/2025-03-26/relative-colors/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-26/relative-colors/</guid><description>Relative Colorsを使うことで、オリジナルの色に対して、rgba、hsl、lchなどのカラー関数を適用できるようになった。デザイントークンなどhexで定義された色を、hsl関数を用いて彩度や輝度のみを変更したり、rgb関数のRed要素だけを変更したりできる。 アニメーションや:hoverや:activeなどのバリエーション作成に便利。</description><pubDate>Wed, 26 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>名前付きキャプチャグループでString#match()をより使いやすく</title><link>https://bcrikko.github.io/til/posts/2025-03-27/named-capturing-group/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-27/named-capturing-group/</guid><description>ある文字列から正規表現でマッチした部分を抽出する際、String#match()を使う。普通に使うと以下のようにmatch[n]という非常にわかりづらいコードになる。分割代入（Destructuring）を使うことで、ちょっとはわかりやすくなるが、それ以上に名前付きキャプチャグループが使いやすい。</description><pubDate>Thu, 27 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>HTMLのみでTreeView UIをつくる</title><link>https://bcrikko.github.io/til/posts/2025-03-27/treeview-by-details/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-03-27/treeview-by-details/</guid><description>listitem要素とdetails要素を使うことで、HTMLだけでTreeView UIを実装できる。details要素のname属性を使うことで、排他的な開閉処理も可能だ。</description><pubDate>Thu, 27 Mar 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 4月号</title><link>https://bcrikko.github.io/til/posts/2025-04-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-01/monthly-letter/</guid><description>2025年3月に公開した記事のまとめ。HTML、CSS、JavaScript、Web、マインドセット、プログラミングなど幅広いトピックをカバー。各記事の要点を簡潔に紹介する。</description><pubDate>Tue, 01 Apr 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>text-autospaceで日本語と英語、数字の間隔を開ける</title><link>https://bcrikko.github.io/til/posts/2025-04-03/text-autospace/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-03/text-autospace/</guid><description>国際化対応（Internationalization/i18n）の機能のひとつにtext-autospaceがある。このプロパティは、日本語のように複数の文字体系（漢字、英語、数字など）を混在させて使う言語において、その間にスペースを開けることができる。</description><pubDate>Thu, 03 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>食事する哲学者の問題と解決策</title><link>https://bcrikko.github.io/til/posts/2025-04-04/dining-philosophers-problem/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-04/dining-philosophers-problem/</guid><description>食事する哲学者の問題 / Dining Philosophers Problemとは、デッドロックに関する問題をわかりやすくモデル化した問題のことだ。テーブルには哲学者の間に1本ずつ、計5本のフォークが置かれている。食事をするには、隣接する2本のホークが必要。哲学者はスレッド、フォークは共有リソースのメタファーで、哲学者が全員同時に左のフォークを手に取ると、誰も右のフォークが取れず、デッドロックが発生する。</description><pubDate>Fri, 04 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>MCPサーバをつくって学ぶ</title><link>https://bcrikko.github.io/til/posts/2025-04-07/what-is-mcp/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-07/what-is-mcp/</guid><description>最近、AIアシスタントの文脈で「MCP」や「MCPサーバー」という用語を聞くようになった。Model Context Protocolとは、AIとアプリケーションとの間で情報を効率的にやり取りするためのプロトコル。 簡単に説明すると、AIが自分の作ったアプリケーションを操作できるように、データを提供したり、機能を公開したりして、扱いやすくするための方法を定義したもの（プロトコル）。MCPを使うことで、AIがアプリケーションのコンテキストを理解できるようになる。 たとえば、いままで手動でデータを貼り付けたり、プロンプトを書いてコンテキストを補っていたりしたものが、AIが直接アプリケーションから取得できるようになる。</description><pubDate>Mon, 07 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>print-color-adjustで出力に応じた最適化を行う</title><link>https://bcrikko.github.io/til/posts/2025-04-08/print-color-adjust/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-08/print-color-adjust/</guid><description>print-color-adjustプロパティを使うことで、出力端末上での外観を最適化できる。よくあるウェブサイトのスタイルに「目に優しくするために背景色に真っ白（#fff）を避ける」というものがある。当TILブログも同様に真っ白を避け#fafafaを使っている。ただ、そういったページを印刷すると無用なインクを消耗してしまう。そういったことに対処するためにprint-color-adjustプロパティがある。</description><pubDate>Tue, 08 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Gradientでマンガ風集中線をつくる</title><link>https://bcrikko.github.io/til/posts/2025-04-11/manga-effect/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-11/manga-effect/</guid><description>CSSのconic-gradientプロパティを使うことで、簡単にマンガ風の集中線エフェクトをつけることができる。repeating-conic-gradientプロパティを用い、0deg→10degは隙間（transparent）、次の1degに線を指定し、それが一回転するまで繰り返すことで、集中線をつくることができる。角度を調整すればもっと密度の高い集中線も作れる。</description><pubDate>Fri, 11 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>FlexboxよりGridを使う理由</title><link>https://bcrikko.github.io/til/posts/2025-04-15/prefer-grid-to-flex/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-15/prefer-grid-to-flex/</guid><description>先日、Grid First, Flex Thirdという記事を読んだ。要約すると「レイアウトを行う際は grid &gt; block &gt; flex の順で使うべき」という主張がなされている。並びのレイアウトはFlexbox、格子状に区切ってどこに何を配置するかはGridを使う派だったのだが、Gridの有用性を再認識した。</description><pubDate>Tue, 15 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>教えがいのある人間になる</title><link>https://bcrikko.github.io/til/posts/2025-04-16/worth-teaching/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-16/worth-teaching/</guid><description>「教えがいのある人間になる」という目標を立てて行動している。いままでは、情報を集め、自分で噛み砕いて実践するという独学スタイルでやってきた。しかし、昨今の世の中の変化はあまりにも早く、自分ひとりで学ぶには限界を感じるようになった。そこで考えたのが「人から教えてもらう」ことだ。</description><pubDate>Wed, 16 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>スクロールバーとOSの外観設定</title><link>https://bcrikko.github.io/til/posts/2025-04-17/scrollbar/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-17/scrollbar/</guid><description>ボタン付きのスタック型のコンポーネントで、スタック要素にスクロールバーが表示されるとき、OSの外観設定によってスタイルが崩れてしまう。以下のようにスクロールバーが表示されることで、Scrollable AreaとButtonの幅がズレてしまう。</description><pubDate>Thu, 17 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>カスタムGPTを使った辞書付き翻訳機</title><link>https://bcrikko.github.io/til/posts/2025-04-18/translator-custom-gpts/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-18/translator-custom-gpts/</guid><description>ChatGPTの活用として、チーム共通の翻訳機をカスタムGPTを作って使用している。開発では、ユビキタス言語（用語の和名/英名、意味などがまとまった辞書）をCSVで管理していたので、そのまま「知識」としてアップロードして利用した。</description><pubDate>Fri, 18 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ダークモードとライトモードで画像を変える</title><link>https://bcrikko.github.io/til/posts/2025-04-22/theme-image/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-04-22/theme-image/</guid><description>画像とサイトの背景色の色が同じ時にどこから画像かわからないなど、ダークモードとライトモードで画像を変えたいときがある。picture要素のmedia属性を使うことで、モードに応じた画像を表示できる。</description><pubDate>Tue, 22 Apr 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 5月号</title><link>https://bcrikko.github.io/til/posts/2025-05-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-01/monthly-letter/</guid><description>2025年4月に公開した記事のまとめ。CSSやHTML、AI、プログラミング、マインドセットなど幅広いトピックをカバー。各記事の要点を簡潔に紹介する。</description><pubDate>Thu, 01 May 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>hyphenate-limit-charsでハイフネーションされる文字数を制御する</title><link>https://bcrikko.github.io/til/posts/2025-05-08/hyphenate-limit-chars/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-08/hyphenate-limit-chars/</guid><description>英語の1単語が長く折り返しが発生する場合に、hyphensプロパティを使うことでハイフネーションができる。さらにhyphenate-limit-charsプロパティを使うことで、ハイフネーションを許可する単語の長さや、ハイフン前後の最小文字数を指摘できる。</description><pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>hyphensプロパティが効かないときの対処法</title><link>https://bcrikko.github.io/til/posts/2025-05-08/hyphenation-does-not-work/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-08/hyphenation-does-not-work/</guid><description>hyphenate-limit-charsでハイフネーションされる文字数を制御するの記事を書いているときに、hyphensプロパティを使ってもハイフネーションされないことがあった。</description><pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>AstroでMermaid記法を使う</title><link>https://bcrikko.github.io/til/posts/2025-05-13/astro-mermaid/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-13/astro-mermaid/</guid><description>当ブログはAstro + mdxで構成されている。図解するとき、いままではプレーンテキストでAAのような書き方をしていたが、Mermaid記法を使いたい。</description><pubDate>Tue, 13 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>RegExp.escape()で正規表現のパターンをエスケープする</title><link>https://bcrikko.github.io/til/posts/2025-05-14/regexp-escape/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-14/regexp-escape/</guid><description>RegExp.escape()がBaseline 2025になり、全主要ブラウザで使えるようになった。RegExp.escape()を使うことで、正規表現のパターンをエスケープできる。いままでのバックスラッシュを使ったエスケープよりパターンの可読性が上がる。</description><pubDate>Wed, 14 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>SSHキーの作成と暗号化アルゴリズムの種類</title><link>https://bcrikko.github.io/til/posts/2025-05-14/ssh-keygen/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-14/ssh-keygen/</guid><description>SSHキーの作成と暗号化アルゴリズムの種類</description><pubDate>Wed, 14 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>margin-trimで先頭/末尾のmarginを削除する</title><link>https://bcrikko.github.io/til/posts/2025-05-16/margin-trim/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-16/margin-trim/</guid><description>margin-trimを使うことで、コンテナ要素の先頭と末尾のmarginを削除できる。p要素のように上下にmarginを持つ要素を並べるとき、marginの向きを一方向に制限し、かつmargin-topを使うなら先頭の要素の、margin-bottomを使うなら末尾の要素のmarginをresetする必要があった。margin-trimを使うとblock、またはinline方向の最初と最後のmarginを削除できる。</description><pubDate>Fri, 16 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>長文ドキュメントにおけるアクセシビリティとユーザビリティ</title><link>https://bcrikko.github.io/til/posts/2025-05-20/accessible-dpub/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-20/accessible-dpub/</guid><description>Digital Publishing WAI-ARIA Module 1.1では、長文ドキュメント内で容易にナビゲートするための仕様や方法が定義されている。長文ドキュメントの典型であるマニュアルなどはコンテンツの上部に目次があり、そこから各見出しにジャンプできる。単純にidとhrefを使うだけでなく、アクセシビリティの観点も考慮する必要がある。</description><pubDate>Tue, 20 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>overflow-block、overflow-inlineによる柔軟なレイアウト</title><link>https://bcrikko.github.io/til/posts/2025-05-20/overflow-block/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-20/overflow-block/</guid><description>内包するコンテンツが溢れたときにスクロール or 非表示にするときにはoverflowプロパティを使うのが一般的である。しかし、overflowプロパティは視覚的にX軸またはY軸のどちらかを指定してスクロールを発生させるため、横書きと縦書きコンテンツの両方に対応できない。（対応する場合は2パターン用意する必要がある）overflow-blockやoverflow-inlineは、従来のoverflowプロパティと同様にコンテンツが溢れたときにスクロール or 非表示を設定できる。さらに、論理的プロパティなのでwrithing-modeが変わっても対応できる。</description><pubDate>Tue, 20 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>overflowプロパティのhiddenとclipの違いとユースケース</title><link>https://bcrikko.github.io/til/posts/2025-05-22/overflow-hidden-vs-clip/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-22/overflow-hidden-vs-clip/</guid><description>overflowプロパティにはhiddenとclipという似たような挙動をする値がある。どちらもコンテンツが溢れたときに非表示にする値だが、ユースケースは異なる。</description><pubDate>Thu, 22 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>読み込みに失敗した画像の代わりにaltを表示する</title><link>https://bcrikko.github.io/til/posts/2025-05-23/broken-image/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-23/broken-image/</guid><description>img要素の読み込みに失敗すると、ブラウザが壊れが画像アイコンとともにalt属性に設定してあるテキストを表示してくれる。img要素にfont-styleなどを指定することで、alt属性のテキストを他の文章と区別できる。</description><pubDate>Fri, 23 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>displayプロパティを使ったフェードイン/フェードアウトアニメーション</title><link>https://bcrikko.github.io/til/posts/2025-05-26/transition-behavior/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-26/transition-behavior/</guid><description>displayプロパティを使った表示/非表示時のアニメーションは、transitionプロパティの対象にならずフェードイン・フェードアウトができなかった。アニメーションするにはJavaScriptでOpacityを変更し、時間経過でdisplayを切り替える必要があった。現在は、@starting-styleやtransition-behaviorを使うことで、CSSだけでフェードイン・フェードアウトのアニメーションが可能になった。</description><pubDate>Mon, 26 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>contrast-color()で背景色にあわせて適切な色を取得する</title><link>https://bcrikko.github.io/til/posts/2025-05-30/contrast-color/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-05-30/contrast-color/</guid><description>contrast-color()を使うことで、背景色にあわせてコントラスト比が適切な色（黒 or 白）を取得できる。WCAG（Web Content Accessibility Guidelines）に、2色のコントラスト比を計算する方法が書かれている。</description><pubDate>Fri, 30 May 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 6月号</title><link>https://bcrikko.github.io/til/posts/2025-06-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-01/monthly-letter/</guid><description>2025年5月に公開した記事のまとめ。CSSやJavaScriptの最新機能、アクセシビリティ、HTMLの実践的な知見を中心に解説。</description><pubDate>Sun, 01 Jun 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>Table要素を使ったtreegridの実装</title><link>https://bcrikko.github.io/til/posts/2025-06-03/treegrid/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-03/treegrid/</guid><description>TreeViewを実現する際、Table要素では行の入れ子構造ができない。そのため、WAI-ARIAとJavaScriptを使って実装する。なお、Table構造にする必要がない場合は、HTMLのみでTreeView UIをつくる のようにdetails要素を使うのが簡単だ。</description><pubDate>Tue, 03 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ECMAScript Proposalの2025年6月のアップデート内容</title><link>https://bcrikko.github.io/til/posts/2025-06-06/ecmascript-proposal-updates/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-06/ecmascript-proposal-updates/</guid><description>先日108回目のミーティングで、ECMAScriptの各種プロポーザルがアップデートされた。New Proposals, Inspector: Statge 1, More Random Functions: Stage 1, Updated Proposals, Math.clamp: Stage 1→2, SeededPRNG: Stage 1→2, Error.isError: Stage 3→4</description><pubDate>Fri, 06 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>なぜ:visitedのプライバシー保護対策が必要なのか？</title><link>https://bcrikko.github.io/til/posts/2025-06-10/visited-link/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-10/visited-link/</guid><description>Chrome 136で:visitedのプライバシー保護が強化された。背景と問題点:visitedは閲覧済みリンクを視覚的に区別するために使用されてきた。しかし、この機能をつかって悪意あるサイトが「ユーザーの閲覧履歴を推測する」ことが可能だったため、以前から問題視され、さまざまな対策が講じられてきた。</description><pubDate>Tue, 10 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:lang()で言語によってスタイルを変える</title><link>https://bcrikko.github.io/til/posts/2025-06-20/css-lang/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-20/css-lang/</guid><description>:lang()擬似クラスを使うことで、要素に適用されている言語（&lt;p lang=ja&gt;など）に基づいてスタイルを変更できる。複数の言語を扱うウェブサイトで、言語ごとにテキストに関するスタイル（text-spacing-trimやtext-autospaceなど）を変更したり、言語切替に対応しているウェブサービスのUIを調整したりできる。</description><pubDate>Fri, 20 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>width:100%の代わりにwidth:stretchを使う</title><link>https://bcrikko.github.io/til/posts/2025-06-25/width-stretch/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-25/width-stretch/</guid><description>width:100%とmarginを組み合わせたときに、親要素の幅を超えてしまうことがある。その場合、margin分を減算してwidthに設定する必要がある。そんなときにwidth:stretchを使うと、marginの計算なしで親要素の幅に合わせられる。ただし、執筆時点ではChrome 138/Edge 138のみサポートしている。Firefoxは-moz-available、Safariは-webkit-fill-availableのベンダープレフィックス付きのキーワードが必要。</description><pubDate>Wed, 25 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>JavaScriptは参照渡しではなく参照の値渡し</title><link>https://bcrikko.github.io/til/posts/2025-06-28/js-is-pass-by-sharing/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-06-28/js-is-pass-by-sharing/</guid><description>プログラミング初心者がつまづきやすい値渡しと共有渡しの言葉を、そのままJavaScriptの文脈で使われることがある。しかし、仕様書を読むとJavaScriptのそれは「共有渡し（Pass-by-Sharing）」であり、「参照渡し（Pass-by-Reference）」とは言えない。※ECMAScriptの言語仕様書には「共有渡し(Pass-by-Sharing)」という用語は明示的に定義されていない。引数の渡し方を説明するために使われる概念的な用語であり、日本語では「オブジェクト参照の値渡し」と呼ばれることもある。</description><pubDate>Sat, 28 Jun 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 7月号</title><link>https://bcrikko.github.io/til/posts/2025-07-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-01/monthly-letter/</guid><description>2025年6月に公開した記事のまとめ。HTML/CSS/JavaScriptの最新トピックや実践的な知見を紹介。</description><pubDate>Tue, 01 Jul 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>なぜ「継承を使うな」と言われるのか、代替案はあるのか</title><link>https://bcrikko.github.io/til/posts/2025-07-01/oop-inheritance/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-01/oop-inheritance/</guid><description>オブジェクト指向プログラミング（Object-Oriented Programming）を学ぶと、以下の3つを特徴だと説明される。カプセル化（隠蔽）多態性（ポリモーフィズム）継承.しかし、インターネットでは「継承を使うな」と言われることが多い。 なぜなのか、その理由を考えてみる。</description><pubDate>Tue, 01 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>usingを使いリソース管理（解放）を行う</title><link>https://bcrikko.github.io/til/posts/2025-07-02/javascript-using/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-02/javascript-using/</guid><description>JavaScriptはガベージコレクションを備えているため、スコープを外れると自動的にメモリから解放される。しかし、非メモリリソース（データベースやファイルストリームなど）を扱う場合は、明示的な解放（cleanup）をしないとリソースリークが発生してしまう。</description><pubDate>Wed, 02 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Quantity Queriesで要素数ごとに表示を切り替える</title><link>https://bcrikko.github.io/til/posts/2025-07-09/quantity-queries/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-09/quantity-queries/</guid><description>Quantity Queriesとは、「特定の要素がいくつあるか？」によってスタイルを切り替えるテクニックを指す。たとえば、Gridレイアウトにおいて要素数によって以下のようにスタイルを変えたいことがある。</description><pubDate>Wed, 09 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS Custom Highlight APIで任意のテキストをハイライトする</title><link>https://bcrikko.github.io/til/posts/2025-07-10/custom-highlight-api/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-10/custom-highlight-api/</guid><description>CSS Custom Highlight APIを使うことで、JavaScriptで範囲を指定し、任意のスタイル（ハイライトなど）を適用できる。マウスで選択した部分のスタイルを変更する::selectionや、#:~:text=***のようにURLのハッシュを使って特定のテキストの選択してスタイルを変更する::target-textのような強調表示のぎ疑似要素を拡張して、任意の範囲をハイライトするためのAPIである。</description><pubDate>Thu, 10 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>生成AIを支える技術: 埋め込みモデル、ベクトル変換、ベクトル検索を手計算で理解する</title><link>https://bcrikko.github.io/til/posts/2025-07-14/vector-search/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-14/vector-search/</guid><description>検索機能を強化する「RAG」について学びたいが、具体的にどのような仕組みで動いているか理解できていない。そこで、まずは生成AIの基礎知識を身につけるためにすべて人力でモデル作成、ベクトル変換、ベクトル検索を行うことで仕組みを理解したい。</description><pubDate>Mon, 14 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>現代貨幣理論（MMT）の基礎と日本財政への応用と課題</title><link>https://bcrikko.github.io/til/posts/2025-07-15/modern-monetary-theory/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-15/modern-monetary-theory/</guid><description>現代貨幣理論（MMT、Modern Monetary Theory）は、政府が自国通貨を発行できるかぎりは財政赤字が増えてもインフレが制御されていれば問題にならないという考え方で、まさに日本は「円」という自国通貨を発行できるのでMMTの前提条件を満たしており、理論的には採用可能である。</description><pubDate>Tue, 15 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>TreeWalkerを使ってDOMツリーを効率的に走査する</title><link>https://bcrikko.github.io/til/posts/2025-07-16/treewalker/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-16/treewalker/</guid><description>TreeWalkerオブジェクトでNodeFilterを使うことでDOMツリーを効率的に走査できる。以下のサンプルではNodeFilter.SHOW_ELEMENTでElementノードのみを走査している。</description><pubDate>Wed, 16 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Element.closest()で親方向に検索して要素を取得する</title><link>https://bcrikko.github.io/til/posts/2025-07-17/element-closest/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-17/element-closest/</guid><description>Element.closest()を使うことで、現在の要素から親方向に向かって検索し、CSSセレクターに一致するノードを取得する。親方向に向かって検索するための機能なので、#current → .ancestor → .parent:last-child のような兄弟要素や .parent:has(.xxx) のような自身の祖先以外の要素は取得できない。</description><pubDate>Thu, 17 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>日々の学びとテックブログ執筆でのAI活用事例</title><link>https://bcrikko.github.io/til/posts/2025-07-18/how-i-learn-with-ai/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-18/how-i-learn-with-ai/</guid><description>ChatGPT や GitHub Copilot、Claude Code、Google NotebookLM などさまざまなAIツールが登場し、日々の学び方も変わってきたのでどのように活用しているかをまとめておく</description><pubDate>Fri, 18 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>sibling-indexとsibling-countで作るリングメニュー</title><link>https://bcrikko.github.io/til/posts/2025-07-23/sibling-index-and-count/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-23/sibling-index-and-count/</guid><description>sibling-indexとsibling-countを使うと、CSSで兄弟要素の全数とその中での位置を取得できる。要素の全数と位置を取得できるので、たとえば角度の計算が必要なリングメニューのようなUIを簡単に実装できる。</description><pubDate>Wed, 23 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ユーザー設定フォントサイズと許容サイズの課題と解決</title><link>https://bcrikko.github.io/til/posts/2025-07-29/font-size/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-29/font-size/</guid><description>ページ全体のフォントサイズを設定する際、ブラウザのデフォルト値（16px）を使うのが一般的だ。しかし、ブラウザのユーザー設定フォントサイズは9〜24pxと幅広く、推奨値以外を設定した場合、デザインが崩れたり、ユーザー体験が損なわれたりする可能性がある。</description><pubDate>Tue, 29 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>OSINT（Open Source Intelligence）の悪用と対策</title><link>https://bcrikko.github.io/til/posts/2025-07-30/open-source-intelligence/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-07-30/open-source-intelligence/</guid><description>OSINT（Open Source Intelligence）とは、誰でもアクセスできる公開情報を収集し、分析することで、特定の目的に役立つ情報を得る手法である。個人に焦点を当てると、SNSのプロフィールや投稿、ブログ、論文、地図情報、GitHubリポジトリや会社のオウンドメディア投稿など、それぞれは独立した情報に見えても、断片を組み合わせることで個人の行動パターンや主義主張などを明らかにできる。もちろん合法的な情報</description><pubDate>Wed, 30 Jul 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 8月号</title><link>https://bcrikko.github.io/til/posts/2025-08-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-01/monthly-letter/</guid><description>2025年7月に投稿した記事をタグごとにまとめ、要点を簡潔に紹介する。CSSやJavaScript、AI、セキュリティなど幅広いトピックをカバー。</description><pubDate>Fri, 01 Aug 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>URLPatternを使ったパターンマッチングと実用例</title><link>https://bcrikko.github.io/til/posts/2025-08-06/url-pattern/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-06/url-pattern/</guid><description>URL Pattern APIを使うことで、URLのパーツ（プロトコル、ホスト名、パス、クエリパラメータ、ハッシュなど）をパターンマッチングで抽出できる実験的なWeb APIである。このWeb APIを使うことで、URLパターンマッチングがやりやすくなるので、ルーティングやアクセス制御などURLを扱う処理が簡潔に書けるようになる。</description><pubDate>Wed, 06 Aug 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>公正世界仮説と認知の歪み</title><link>https://bcrikko.github.io/til/posts/2025-08-19/just-world-hypothesis/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-19/just-world-hypothesis/</guid><description>良いことをした人は報われてほしいし、悪いことをした人には相応の罰を受けてほしい。そう思うのは、善人側にいる人にとっては自然だろう。しかし、現実は必ずしもそうではないし、そういった思考が認知の歪みを生むこともある。</description><pubDate>Tue, 19 Aug 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSSでワードアート風3Dテキストを表示する</title><link>https://bcrikko.github.io/til/posts/2025-08-26/3d-layered-text/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-26/3d-layered-text/</guid><description>テキスト用の要素を複数個用意し、1つずつtranslateZ()で奥方向（Z軸方向）にずらしていくことで、CSSだけでワードアートのような3Dテキスト表現が実現できる。</description><pubDate>Tue, 26 Aug 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>POMLでAIプロンプトを構造化して管理する</title><link>https://bcrikko.github.io/til/posts/2025-08-27/propmpt-orchestration-markup-language/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-27/propmpt-orchestration-markup-language/</guid><description>主流なAI（GPT）では、プロンプト（指示）を自然言語で与えて、タスクを実行させる。ただし、誰もが一度は「自然言語を使った指示はあいまいで、実行ごとに結果が困って困る」「利用者によってプロンプトのフォーマットが異なるので管理しづらい」と思ったことがあるだろう。</description><pubDate>Wed, 27 Aug 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>URLのフラグメント（#）からdetails要素を開く</title><link>https://bcrikko.github.io/til/posts/2025-08-29/open-details/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-08-29/open-details/</guid><description>details要素を使うことで、アコーディオンメニューのようなものが簡単に実装できる。ただし、details要素を開いた状態にするにはopen属性を付ける必要があり、内包される情報が隠蔽されてしまう。</description><pubDate>Fri, 29 Aug 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 9月号</title><link>https://bcrikko.github.io/til/posts/2025-09-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-01/monthly-letter/</guid><description>2025年8月に公開した記事のまとめ。フロントエンド技術やAI、認知バイアスなど幅広いトピックを解説。</description><pubDate>Mon, 01 Sep 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>セルフ・ハンディキャッピングと正しく負ける難しさ</title><link>https://bcrikko.github.io/til/posts/2025-09-02/self-handicapping/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-02/self-handicapping/</guid><description>久しぶりにオモコロチャンネルを見たときに 「【実体験】これだけは気をつけた方がいいことを話します」 という動画を見つけた。この動画では、過去の失敗をもとに気をつけた方が良いことが語られている。たとえば「最初に作った銀行口座は一生使うことになる」「銀行印は特別だから絶対になくすな」「通帳をディズニーのデザインにしたら失くした」みたいなことが挙げられていた。</description><pubDate>Tue, 02 Sep 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>scrollbar-colorプロパティでスクロールバーの色を変える</title><link>https://bcrikko.github.io/til/posts/2025-09-04/scrollbar-color/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-04/scrollbar-color/</guid><description>scrollbar-colorプロパティを使うことで、スクロールバーの色を変更できる。Safari TP 227でサポートされたので、近々全主要ブラウザで利用可能になりそうだ。</description><pubDate>Thu, 04 Sep 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>YouTubeのサムネのシークバーを見やすくする</title><link>https://bcrikko.github.io/til/posts/2025-09-08/youtube-seekbar/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-08/youtube-seekbar/</guid><description>YouTubeのサムネには、動画をどこまで見たかわかるように赤色のシークバーが表示されている。しかし、「赤」は警告色で人の目を引くため、クリック率を増やしたい動画投稿者はサムネに赤色の枠をつけることが多々ある。そのため、YouTubeのシークバーがとサムネの色が被ってしまい、見えなくなる。</description><pubDate>Mon, 08 Sep 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>interpolate-sizeとcalc-size()のアニメーションの仕方と使い分け</title><link>https://bcrikko.github.io/til/posts/2025-09-19/interpolate-size-vs-calc-size/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-19/interpolate-size-vs-calc-size/</guid><description>CSSアニメーションの鬼門に、height: autoのトランジションがうまくできない問題がある。height:0→autoをトランジションするでは、Experimentalなcalc-size()という関数をつかって実現していた。interpolate-sizeプロパティは、アニメーションやトランジションを行うときに、実際のheightなどのサイズとauto、fit-content、max-content などの内在サイズを補間するために使用する。</description><pubDate>Fri, 19 Sep 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Claude Code + さくらのAI EngineではじめるAgentic Coding</title><link>https://bcrikko.github.io/til/posts/2025-09-30/claude-code-with-ai-engine/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-09-30/claude-code-with-ai-engine/</guid><description>Claude Codeは基本有料でPro/Maxプランでないと使えない。そのため利用を躊躇していた。そんな中、Claude Code Router を使うことで、自分の好きなプロパイダーで Claude Code を使えると知った。また、つい先日リリースされたさくらのAI Engineは、1ヶ月3,000リクエストまで無料で使えるということで、Claude Code Router + さくらのAI Engineを使ってAgentic Codingを体験してみた。</description><pubDate>Tue, 30 Sep 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Monthly Newsletter 10月号</title><link>https://bcrikko.github.io/til/posts/2025-10-01/monthly-letter/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-10-01/monthly-letter/</guid><description>2025年9月に公開された記事のまとめ。HTML、CSS、JavaScript、その他のトピックをタグごとに分類して紹介します。</description><pubDate>Wed, 01 Oct 2025 00:00:00 GMT</pubDate><author>GitHub Copilot</author></item><item><title>「ゴッホ展 家族がつないだ画家の夢」を楽しむための事前知識</title><link>https://bcrikko.github.io/til/posts/2025-10-21/vincent-van-gogh/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-10-21/vincent-van-gogh/</guid><description>2025/09/12 〜 2025/12/21、上野の東京都美術館でゴッホ展 家族がつないだ画家の夢が開催されている。画家ゴッホを懇親的に支えた弟テオや、画家として評価されるよう奔走したテオの妻ヨーなど、ゴッホの家族にフォーカスして絵画や手紙を展示する展覧会だ。筆者は、ゴッホについて「ひまわり」「星月夜」「自画像」など有名作品程度しか知らないので、展覧会を楽しむためにも予習したい。</description><pubDate>Tue, 21 Oct 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>さくらインターネットに入社して10年でやったこと</title><link>https://bcrikko.github.io/til/posts/2025-11-01/sakura-internet/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2025-11-01/sakura-internet/</guid><description>2025年11月1日、さくらインターネットにフロントエンドエンジニアとして入社してから10年がたった。これまでに失敗したことや迷惑をかけたことも多々あったが、振り返ってみると求められている以上の成果を出せたのではないかと自負している。ということで、この10年間で取り組んできた活動を振り返る。</description><pubDate>Sat, 01 Nov 2025 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>geolocation要素による位置情報の取得方法</title><link>https://bcrikko.github.io/til/posts/2026-01-19/geolocation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-01-19/geolocation/</guid><description>JavaScriptのGeolocation APIよりも権限要求や位置情報取得の実装が簡略化された。Geolocation APIでは予期せぬタイミングで権限要求のダイアログが表示されたり、ブラウザがブロックしたり、ユーザー体験が阻害されるケースがあったが、&lt;geolocation&gt;要素ではユーザーの明示的な操作により開始されるので意図とタイミングが明確になった。</description><pubDate>Mon, 19 Jan 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Promiseの静的メソッド（all/allSettled/any/race）の違いを理解する</title><link>https://bcrikko.github.io/til/posts/2026-02-20/promise-static-methods/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-02-20/promise-static-methods/</guid><description>JavaScriptで非同期処理に使うPromiseオブジェクトには、以下のような静的メソッドがある。Promise.all()はよく使うものの他はあまり使ったことがないので、すぐ使い方を忘れてしまう。そこで、ユースケースと視覚的にわかりやすく解説する。</description><pubDate>Fri, 20 Feb 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Map.getOrInsert()やMap.getOrInsertComputed()で効率よくMapを使う</title><link>https://bcrikko.github.io/til/posts/2026-03-06/map-get-or-insert/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-06/map-get-or-insert/</guid><description>UpsertのプロポーザルがStage 4に到達し、Map#getOrInsertやMap#getOrInsertComputedが主要ブラウザで利用できるようになった。 Map内にキーが存在すればその値を返し、存在しなければデフォルト値を返すメソッドだ。キャッシュや遅延初期化などで活用できる。</description><pubDate>Fri, 06 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>innerHTMLを安全に扱うためのsetHTMLメソッド</title><link>https://bcrikko.github.io/til/posts/2026-03-10/set-html/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-10/set-html/</guid><description>Element#innerHTMLは、文字列をHTMLとして解釈してDOMに反映するプロパティで、ユーザー入力などをそのまま反映させるとクロスサイトスクリプティング（XSS）攻撃のリスクがある。テキストノードであればNode#textContentのように安全に反映できるプロパティができたが、いまだにHTMLとしてそのまま使いたいユースケースもある。そこでFirefoxが先行してElement#setHTML()という安全に文字列をDOMに反映するための新しいメソッドを実装した。</description><pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>HTMLInputElement#showPicker()でinput要素のメニューを表示する</title><link>https://bcrikko.github.io/til/posts/2026-03-12/show-picker/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-12/show-picker/</guid><description>showPicker()でinput要素のDatePickerやSelect要素のドロップダウンメニューを表示するで紹介したHTMLInputElement#showPicker()でdatalist要素のドロップダウンメニューも表示できるようになった。執筆時点ではFirefox 149（beta）でサポートされていたので、もう少しで全主要ブラウザで利用可能になる。</description><pubDate>Thu, 12 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>CSS multi-column layoutで新聞や論文のような段組みレイアウトをつくる</title><link>https://bcrikko.github.io/til/posts/2026-03-13/multi-columns/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-13/multi-columns/</guid><description>CSS multi-column layoutは、コンテンツを新聞や論文のように複数段に分割したり、段数、幅、間隔、区切り線、分割などを制御する仕組みだ。Grid LayoutやFlexboxなどを使わずに自動的に段組みレイアウトをつくることができ、見出しや段落の制御が容易になる。ただし、コンテナーの高さや行数を固定すると文章が読みづらくなることがあるため、アクセシビリティの観点から注意が必要だ。</description><pubDate>Fri, 13 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>ResizeObserverを使ってCanvas要素の再レンダリングをする</title><link>https://bcrikko.github.io/til/posts/2026-03-16/resize-observer/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-16/resize-observer/</guid><description>ResizeObserverは、要素サイズの変化を監視して変更が発生したらcallbackを呼び出すオブジェクトだ。Canvas APIは、Canvas要素のサイズ（widthやheight）が変更されても再描画しないため、正しく描画されない。そんなときにResizeObserverを使ってCanvas要素のサイズが変更されたら再描画する処理を実装できる。</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>AstroとPagefindでサイト内検索を実装する</title><link>https://bcrikko.github.io/til/posts/2026-03-17/astro-pagefind/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-17/astro-pagefind/</guid><description>当ブログも記事が増えてきた。GitHub上で検索できるけどより簡単な方法を提供するためにPagefindを導入した。Pagefindは、クライアントで動作するStaticな検索ライブラリ。Astroのような静的サイトジェネレーター（SSG）との相性がよく、ページをビルドしたあとにインデックスを生成し、クライアントでそれを使って検索を行う。</description><pubDate>Tue, 17 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>テックブログをはじめた理由と書き続ける理由。感謝と恩送り</title><link>https://bcrikko.github.io/til/posts/2026-03-18/why-i-keep-writing-tech-blog/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-18/why-i-keep-writing-tech-blog/</guid><description>私は2013年にテックブログを立ち上げて以来、記事を書き続けている。全盛期には月8〜10万PVあり、AdSenseの広告料だけで毎月1万円ほどの収入があった。現在は、1〜2万PVまで落ち込み広告料も月1.5ドルになっているので、ブログを書く理由が「お金」にあったら続けていないと思う。いまでも続けているのは、当初の目的に加え新たな理由ができたからだ。</description><pubDate>Wed, 18 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:open擬似クラスで開いている要素を選ぶ</title><link>https://bcrikko.github.io/til/posts/2026-03-19/open-pseudo-class/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-19/open-pseudo-class/</guid><description>いままで要素が開いている状態かどうかは、details[open]やdialog[open]のように属性セレクターを使って判定してきた。そのため、select要素やinput（カラーピッカー）のような入力フォームでは開いた状態をCSSから選択する方法がなく、JavaScriptでクラスを付け替える実装に頼るしかなかった。そこで登場したのが:open擬似クラス。 :open擬似クラスは開閉状態を持つ要素のうち、現在開いているものを選択するための新しいCSS擬似クラスだ。</description><pubDate>Thu, 19 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>@supports（feature queries）でブラウザーのサポート状況によってスタイルを切り替える</title><link>https://bcrikko.github.io/til/posts/2026-03-20/at-supports/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-20/at-supports/</guid><description>ブラウザがCSSの特定の機能をサポートしているか確認するために@supportsが提供されている。 @supportsはfeature queries（機能クエリー）と呼ばれ、プログレッシブエンハンスメントが実現できる。</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>Webナビゲーションの歴史</title><link>https://bcrikko.github.io/til/posts/2026-03-23/history-of-web-navigation/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-23/history-of-web-navigation/</guid><description>Webのナビゲーションは単なる技術的な進化ではなく、ユーザー体験と開発モデルの変化とともに再設計されてきた。URLや履歴、画面状態をどのように一致させるかという問題への解答の変遷だ。</description><pubDate>Mon, 23 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>:heading擬似クラスと:heading()関数で見出しをまとめてスタイリングする</title><link>https://bcrikko.github.io/til/posts/2026-03-25/heading-pseudo-classes/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-03-25/heading-pseudo-classes/</guid><description>ページのベースとなるスタイルをつくるときに、見出しを :is(h1, h2, h3, h4, h5, h6) { ... } のようにまとめてスタイルを当てることがある。それをシンプルかつ、詳細度を制御してスタイリングするために、:heading擬似クラスと:heading()関数という新しいCSSセレクターが検討されている。2026年3月の執筆時点では、Firefox NightlyやSafari TPのみで利用可能。</description><pubDate>Wed, 25 Mar 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>meter要素で自動的にメーターの色を変える</title><link>https://bcrikko.github.io/til/posts/2026-04-01/meter-element/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-04-01/meter-element/</guid><description>progress要素に似た見た目のmeter要素がある。meter要素は、範囲内の数値を表すための要素で、highやlow属性を使うことで自動的にメーターの色を変えられる。progress要素は見た目が似ているが、タスクの進捗状況を表す要素なので、low/highのような範囲を指定するような属性はない。</description><pubDate>Wed, 01 Apr 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item><item><title>言葉のぶつけ合いが怖い</title><link>https://bcrikko.github.io/til/posts/2026-04-03/war-of-words/</link><guid isPermaLink="true">https://bcrikko.github.io/til/posts/2026-04-03/war-of-words/</guid><description>小さい頃から言葉をぶつけ合うのが怖くて、対立構造にならない立ち回りをしてきた。思いやりのある言葉で、お互いを尊重しあい、意見はするが折れるところは折れる。たとえ相手の意見が間違っていたとしても一旦受け止めて、優しく返す。そんな穏やかな議論がしたい。しかし、言葉を選ばない人たちは一定数いる。</description><pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate><author>ダーシノ</author></item></channel></rss>