Installation and use of the plug-in for converting px to rem in sublime text 3

WBOY
Release: 2016-09-07 12:58:13
Original
1342 people have browsed it

The unit of rem is relatively powerful for mobile terminals, so here I will introduce to you the installation and use of the plug-in for converting px to rem in sublime text 3. As long as you install this plug-in and enter how much px, sublime will prompt you accordingly. Rem value, you don’t have to calculate it yourself! !

1. First download the plug-in at this address: https://github.com/hyb628/cssrem.git

2. Unzip the downloaded plug-in, open sublime, find:

Sublime Text -> Preferences -> Browse Packages, and put the unzipped folder under the opened file

3. At this time, the plug-in is installed. If we enter a value we want in the css, there will be a corresponding prompt:

Enter and it will be converted automatically:

4. The 40 here is the default baseline value of the plug-in, we can change it according to our own needs:

Set in

Sublime Text -> Preferences -> Package Settings -> cssrem->Settings-user. Enter the following parameter configuration to modify the base number and converted decimal number:

{

"px_to_rem": 60, //The unit ratio of px to rem, the default is 40
"max_rem_fraction_length": 6, //The maximum length of the decimal part of px to rem. The default is 6.
"available_file_types": [".css", ".less", ".sass",".html"]
//Enable the file types of this plug-in. Default is: [".css", ".less", ".sass"]
}

As shown in the picture:


After the modification, the base number has changed:

Installation and use of the plug-in for converting px to rem in sublime text 3

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template