REM This unit for mobile is relatively strong, so here to introduce sublime text 3 to the PX conversion to REM plug-in installation and use, as long as the plug-in installed, input how many px,sublime will prompt the corresponding REM value, you do not have to calculate the!!
1. First at this address:https://github.com/hyb628/cssrem.git Download Plugin
2. Unzip the downloaded plugin and open Sublime, find:Sublime Text, Preferences, Browse Packages, put the extracted folder into the open file
3. This time the plug-in is installed, and then enter a CSS in the value we want, there will be a corresponding hint:
Automatic conversion after Enter:
4. Here the 40 is the default reference value of the plugin, we can change according to our own needs:
set in Cssrem->settings-user, Package Settings, Sublime Text, Preferences, enter the following parameter configuration, You can modify the number of base numbers and converted decimals:
{
"Px_to_rem": the unit ratio of//PX to REM, default to 40
"Max_rem_fraction_length": 6,//px to the maximum length of the number of parts of REM. The default is 6.
"Available_file_types": [". css", ". Less", ". Sass", ". html"]
Enable the file type for this plug-in. The default is: [". css", ". Less", ". Sass"]
}
The base number is changed after the modification:
Note: The parameter profile is not written by default, it is the default setting! Edit the corresponding content input can!!
Sublime text 3 Installing and using PX conversion to REM plug-in