最近在学 tailwindcss, 里面有个叫 bg-blue-600 的颜色定义,实际编译进 class 的代码,是 background-color: rgb(37, 99, 235);
可是用 chrome 调试页面的时候,光看 background-color: rgb(37, 99, 235), 怎么也没办法和 bg-blue-600 去关联起来。那为什么不直接在代码里,加一个#define 语句?
比如把
<div class="bg-blue-600">
改成
#define BG_BLUE_600 background-color: rgb(37, 99, 235)
<div class="BG_BLUE_600">
这样不是好理解多了?