Skip to content

添加注释,保留原来px值 #9

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CSSREM

##### 安装

* 下载本项目,比如:git clone https://github.com/flashlizi/cssrem
* 下载本项目,比如:git clone https://github.com/riskers/cssrem
* 进入packages目录:Sublime Text -> Preferences -> Browse Packages...
* 复制下载的cssrem目录到刚才的packges目录里。
* 重启Sublime Text。
Expand All @@ -20,4 +20,4 @@ CSSREM

* `px_to_rem` - px转rem的单位比例,默认为40。
* `max_rem_fraction_length` - px转rem的小数部分的最大长度。默认为6。
* `available_file_types` - 启用此插件的文件类型。默认为:[".css", ".less", ".sass"]。
* `available_file_types` - 启用此插件的文件类型。默认为:[".css", ".less", ".sass"]。
2 changes: 1 addition & 1 deletion cssrem.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def on_query_completions(self, view, prefix, locations):
lastCompletion["region"] = sublime.Region(start, location)

# set completion snippet
snippets += [(value + 'px ->rem(' + str(get_setting(view, 'px_to_rem')) + ')', str(remValue) + 'rem')]
snippets += [(value + 'px ->rem(' + str(get_setting(view, 'px_to_rem')) + ')', str(remValue) + 'rem'+'; /*' + value + 'px*/')]

# print("cssrem: {0}".format(snippets))
return snippets
Expand Down