ankush981
ankush981

Reputation: 5417

Increase font size of SQL query box

The font-size of the textarea that accepts SQL queries on my phpMyAdmin installation is too small. One workaround I found is to increase the minimum font size in Chrome, but it's breaking the look of other websites.

How can the font size be increased?

Upvotes: 17

Views: 14231

Answers (7)

amirkonjkav
amirkonjkav

Reputation: 21

Click on the Home button under phpmyadmin in left:

Then you can change theme and font size.

Upvotes: 2

EdgarCV
EdgarCV

Reputation: 1

On phpmyadmin 4.9.5 just change the ".Codemirror" in:

\phpMyAdmin\js\vendor\codemirror\lib\codemirror.css

add:

font-size: 1.5em;  /* add this line to what font size you want */

Also change the file: "common.css.php" in:

\phpMyAdmin\themes\your_theme\css\common.css.php

in that file search for and add:

    textarea,
    tt,
    pre,
    code {
    font-family: <?php echo $GLOBALS['cfg']['FontFamilyFixed']; ?>;
    font-size: 1.5em; /* add this line to what font size you want */
    }

And that should do it!

With this you will see a better size font on query textarea when edit and to view the query when you are not editing.

Upvotes: 0

Nawaraj
Nawaraj

Reputation: 425

If you are using "phpmyadmin 4.8.1" then go to xampp\phpMyAdmin\js\vendor\codemirror\lib, open codemirror.css, find font-size: inherit; and replace it with font-size: 2em;

Upvotes: 2

kmchen
kmchen

Reputation: 37

on phpmyadmin 4.6 found the ".Codemirror pre" in :

themes/theThemeUsed/js/codemirror/lib/codemirror.css

Upvotes: 0

john riley
john riley

Reputation: 171

I Had the same problem using phpMyAdmin with xampp.

to fix, go to

xampp > phpMyAdmin > themes > pmahomme > css

open the following file with your text editor

codemirror.css.php

and add the following line to the very bottom of the file

.CodeMirror pre {font-size:1.4em;}

Now save the file and that should do it!

(if phpMyAdmin is using a different theme to pmahomme then just add that line

of code to every codemirror.css.php file you can find!

Upvotes: 17

sam
sam

Reputation: 1401

Go to the css directory of the theme

cd /var/www/html/myadmin11/themes/original/css

Then vi theme_right.css.php

find the "textarea#sqlquery" and change it

 textarea#sqlquery {
 font-size:2em;  /* add this line to what font size you want */
 width: 80%;
 height: 300%;
 }

Upvotes: 3

Nemo Noman
Nemo Noman

Reputation: 202

Find your phpMyAdmin directory.

   cd themes

You may see more than one theme, and you want to make changes in the theme you are using -- phpMyAdmin lets you choose your theme. I use the original theme, so I made changes there.

Go to the css directory of the theme

   cd original/css /* or your preferred theme */

Use a text editor like nano to modify theme_right.css.php

   nano theme_right.css.php

Search for 2 style definitions

   .CodeMirror pre
   .CodeMirror textarea

Both will show "font-size: inherit" or font-size:inherit!important

Change to

    font-size: 16px; /* or whatever you prefer */

Save and reload phpMyAdmin Note that you may need to clear your browser cache for these changes to appear.

Upvotes: 13

Related Questions