css – 如何读取Base64 VLQ代码?

我试图了解css源地图的工作原理.我创建了一个非常简单的scss文件.
#navbar {
    color: black;
}

当我编译上面的scss时,我得到以下映射文件.

{
"version": "3","mappings": "AAAA,OAAQ;EACP,KAAK,EAAE,KAAK","sources": ["test.scss"],"file": "test.css"
}

当我解码“映射”时,我得到以下值.

0) [0,0],[7,8]
1) [2,1,-7],[5,5],[2,2],5]

这些价值观是什么?

解决方法

我在 http://www.thecssninja.com/javascript/source-mapping的“Base64 VLQ和保持源映射很小”一节下找到了一个例子.

The above diagram AAgBC once processed further would return 0,32,16,1 – the 32 being the continuation bit that helps build the following value of 16. B purely decoded in Base64 is 1. So the important values that are used are 0,1. This then lets us kNow that line 1 (lines are kept count by the semi colons) column 0 of the generated file maps to file 0 (array of files 0 is foo.js),line 16 at column 1.

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效