1.CSS Processor
Processors such as Sass, less, and postcss can be processed.
@function Px2rem ($px, $base-font-size:75px) {
@return ($px/$base-font-size) * 1REM;
}
2.CSSREM
This is a plug-in is Flashlizi for sublime text written a plug-in, it is really convenient to use. We can see it on GitHub.
Let me explain how to configure: 2.1 We can download the dependent files on GitHub , 2.2 Open Sublime text, enter the packages directory (Sublime text-Preferences- > Browse Packages); 2.3 Place the Cssrem-master folder in the directory opened in the previous step, restart sublime text to take effect;
We can also modify the default configuration:
Open the Cssrem.sublime-settings file under the Cssrem-master folder to modify
{
"Px_to_rem": the unit ratio of//px to REM, The default is
"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 this plug-in file type. The default is: [". css", ". Less", ". Sass"]
}
Create a new. css file:
11.png
Press the TAB key to get the following result:
Processors such as Sass, less, and postcss can be processed. 1.CSS processor
Processors such as Sass, less, and postcss can be processed. 1.CSS processor
Processors such as Sass, less, and postcss can be processed.