Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE doesnt accept font as initial using important

In chrome, it is ok to use font: initial !important;. But in IE(9), it's not getting inital value.

How can I solve this?

like image 525
Mehmet Ince Avatar asked Apr 15 '13 15:04

Mehmet Ince


4 Answers

The CSS3 initial keyword isn't supported in any version of IE.

like image 178
Adrift Avatar answered Nov 05 '22 02:11

Adrift


@Adrift is entirely correct that IE does not currently (IE11) support initial. But to answer the question "How can I solve this?"...

font-style: normal;
font-variant: normal;
font-weight: normal;
font-stretch: normal;
font-size: medium;
line-height: normal;
font-family: serif; /* depends on user agent */
like image 38
Luke Avatar answered Nov 05 '22 03:11

Luke


I just came accross this bug for line-height and min-height.

On IE, replace "initial" by "auto" or "inherit". Eg :

/*IE*/
line-height: inherit !important;
/* Rest of the world */
line-height: initial !important;

/*IE*/
min-height: auto !important; 
/* Rest of the world */
min-height: initial !important;
like image 6
Val Entin Avatar answered Nov 05 '22 01:11

Val Entin


Microsoft unfortunately doesn't accept font-size: initial.

The actual "initial" value specified in the docs is font-size: medium.

Microsoft doc: https://msdn.microsoft.com/en-us/library/ms530759(v=vs.85).aspx

Mozilla doc: https://developer.mozilla.org/en-US/docs/Web/CSS/font-size

like image 2
2540625 Avatar answered Nov 05 '22 01:11

2540625