-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2021-06-01のJS: Jest 27、vanilla-extract 1.0.0、Learn CSS #875
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jest 27.0.0がリリースされました。
Jest 27.0.0では今までのデフォルトが大きく変更されるリリースとなっています。
testEnvironment
のデフォルトをjsdom
からnode
へ変更、jest-circus
のデフォルト化、fake timersのデフォルトを@sinonjs/fake-timers
ベースのmodern
に変更している。機能追加として、失敗したテストをインタラクティブに実行できるように、inline snapshotsをprettierの依存なく実行できるようになっています。
また、
done
の複数回呼び出しをエラーとしたり、Promiseを返すのとdone
の混在を禁止したり、TypeScriptの型を厳密化するといった変更も含まれています。CSS Variablesが利用できないといったCSS Modulesの問題点の解決と型安全なCSS in JSを目指すvanilla-extract 1.0.0がリリースされました。
vanilla-extractはCSS Modulesの作者の一人でもMark Dalgleishが中心に作られている、CSS Modules-in-TypeScriptなCSSフレームワークです。
TypeScriptでスタイルをJSとして
.css.ts
に書いてclass
属性に指定したものをコンパイルすると、CSSファイルを生成するフレームワークに依存しないツールキットとなっています。直近で様々なCSS in JSが登場しているので、次の記事がCSSへのアプローチをグループ分けしてまとめられています。
web.devでLearn CSSというCSSについて一から学べるCSSのチュートリアル講座が公開されています。
Box Model、セレクタ、詳細度、CSSの単位などの基本的な概念から、GridやFlexboxなどのレイアウト、ColorやmarginなどのCSSプロパティの解説、擬似クラスや疑似要素などCSS全般について幅広く解説されています。