为YER网站生成基本的Sixfoh编码图像。
sixfoh的Python项目详细描述
六角
为您的网站生成基sixfoh编码的图像。
安装
pip install sixfoh
用法
给Sixfoh一些图像转换成Base64::
sixfoh datauri/*.png
如果没有给出任何文件,它将在当前目录中查找图像。
使用量少于
用--less`标记对输出进行管道化,它将在导入到的变量前面加上较少的变量 您的css.:
sixfoh --less myimage.png > datauri.less
我通常会在photoshop中将所有的图标分割并输出到一个“data uri”文件夹中。
sixfoh -L data-uri/* > datauri.less
导入并使用:
@import "datauri.less"; #Logo { background-image: @myimage; }
对于带有--scss标志的sass,您也可以这样做。
选项
-L | Writes images into a group of LessCSS variables, to be included in a stylesheet or written to a .less file to be imported. (alias: –less) |
-S | Writes images into a group of Sass variables, to be included in a stylesheet or written to a .scss file to be imported. (alias: –scss) |
-f | Force output and ignore warnings. |
-