Retirement tax questions

...is the s-corp. employer's 401k contribution limit of 25% on gross salary or taxable salary?

 

Example: employee's salary is 60K, with 20K contributions to a 401k, for a taxable salary of 40K. Is the employer limit 60K or 40K?