immutable-styles 基本试用

此文档来自官方文档,从官方demo 学起比较快

安装

官方推荐的是通过webpack 的构建方式,通过babel loader

clone 代码

git clone https://github.com/callum-hart/immutable-styles-tutorial.git

安装依赖

yarn

构建&&运行

  • dev 模式
yarn start

生成的css 文件,从文件可以看出基于attr 的模式

  • 构建
yarn build

说明

immutable-styles 提出的解决方法还是不错,同时作者的http://www.callumhart.com/blog/css-overrides-friend-or-foe 这篇文章写的也不错
可以了解下作者的触发点,以及解决问题的思路,同时可以参考https://callum-hart.gitbook.io/immutable-styles/beginnertutorial 这篇文章
具体的了解使用

参考

https://callum-hart.gitbook.io/immutable-styles/beginnertutorial
http://www.callumhart.com/blog/css-overrides-friend-or-foe
https://github.com/callum-hart/immutable-styles-tutorial.git

posted on   荣锋亮  阅读(253)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示