By clicking & dragging the sidebar I can resize viewport width. However, through clicking & dragging the side-bar it's too difficult/impossible to get a particular px-size I want. What can I do?
By clicking & dragging the sidebar I can resize viewport width. However, through clicking & dragging the side-bar it's too difficult/impossible to get a particular px-size I want. What can I do?
You can set the values manually via the command line. First you can query the current values of the three non-iDevice presets with the following command:
defaults read ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist ResponsiveDesignCustomPresetConfigurations
which in my case returned the following:
(
{
rotated = 0;
screenHeight = 1200;
screenWidth = 1600;
},
{
rotated = 0;
screenHeight = 1536;
screenWidth = 2732;
},
{
rotated = 0;
screenHeight = 2160;
screenWidth = 3840;
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15";
}
)
To change the values, you need to overwrite them. To do so, copy the result of the previous query, adjust it to your liking and write the values back to the plist by using the following command:
defaults write ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist ResponsiveDesignCustomPresetConfigurations '<paste your modified settings here>'
e.g.
defaults write ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist ResponsiveDesignCustomPresetConfigurations '(
{
rotated = 0;
screenHeight = 1180;
screenWidth = 1532;
},
{
rotated = 0;
screenHeight = 1536;
screenWidth = 2732;
},
{
rotated = 0;
screenHeight = 2160;
screenWidth = 3840;
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15";
}
)'
Note: