Dictionary lookup wider and taller (pop-up dictionary lookup styling) in OS X
It's possible to change the font and the font-size for 3-finger lookup popup. You just need to edit css file for dictionaries you use, e.g.:
sudo vim /Library/Dictionaries/New\ Oxford\ American\ Dictionary.dictionary/Contents/Resources/DefaultStyle.css
find html.apple_client-panel body {
and edit properties
Now I actually want to go further and make the entire popup area bigger - little wider and little taller. How can I do that?
First of all, find out dictionary path you want to modify. This is dependent on the dictionary you want to modify, but you path should look something like this:
/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/042bf65b3ae80e4564c339fcf00fa9924bd16dd3.asset/AssetData/Apple Dictionary.dictionary/Contents/Resources/English.lproj/AppleDictionary.css
Then open this file in any text/code editor you'd like, it could be even vim
, like in the original question, and open it for modification, search for font-size
parameter for body
element, it could be defined in pt
, px
, em
. If you want to deep into CSS details, you may read up tutorials or manual on the font-size
. It appears to be regular CSS file, for definition of styles, so it's easy to work with it.
You may change the font-size, to make it bigger/smaller, it could achieved by modification of parameters in CSS
:
body {
...
font-size: 15pt; /* <== look for this parameter, and scale it up to your taste */
...
}
Or like this:
html.apple_client-panel body {
...
font-size: 15px;
...
}
You may find some screenshots and additional explanation on apple.disscussions.
One also can play with line-height
, if font-size
haven't brought enough readability. If you want to change the window itself or spacing around text, then you may want to modify margin
(margin-top
, margin-bottom
, etc) or padding
(padding-left
, padding-right
, etc).
Tried to explain this to the guys, who are not web-developers themselves, hope this helps. Ask if you gotten additional questions to me, or search them on StackOverflow (it's for developers questions), but I think it will be straight-forward for you now.