Forked from ricardozea/ie67891011-css-hacks.txt
Created
March 8, 2017 15:21
Revisions
-
ricardozea revised this gist
Mar 28, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Place this script in the <head>: </script> <!--<![endif]--> Note: Seems the Conditional Comment is not necessary, but I like to include it for good measure. Usage: .ie10 .selector {...} -
ricardozea revised this gist
Jun 30, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,11 +51,15 @@ http://www.impressivewebs.com/ie10-css-hacks/ Conditional compilation: https://msdn.microsoft.com/en-us/library/8ka90k2e(v=vs.94).aspx Place this script in the <head>: <!--[if !IE]><!--> <script> if (/*@cc_on!@*/false && document.documentMode === 10) { document.documentElement.className+=' ie10'; } </script> <!--<![endif]--> Note: Seems the Conditional Comment is not necessary, but I like to include it for godo measure. Usage: .ie10 .selector {...} -
ricardozea revised this gist
Jun 29, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,6 +60,8 @@ Place this script in the <head>: Usage: .ie10 .selector {...} == More info here: https://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/ IE10 and IE11 ================== @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,15 +37,18 @@ IE10 Only Method 1: UA Sniffing, which isn't the most loved method to target browsers, but here it is anyway. http://css-tricks.com/ie-10-specific-styles/ Place this script in the <head>: <script> var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent); </script> Usage: html[data-useragent*='MSIE 10.0'] .selector {...} Method 2: It used 'Conditional compilation' which is not UA sniffing. Also, it excludes IE11 as well. http://www.impressivewebs.com/ie10-css-hacks/ Conditional compilation: https://msdn.microsoft.com/en-us/library/8ka90k2e(v=vs.94).aspx Place this script in the <head>: <script> -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx IE10 Only ================== Method 1: UA Sniffing, which isn't the most loved method to target browsers, but here it is anyway. http://css-tricks.com/ie-10-specific-styles/ Use this JavaScript: -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,7 @@ html[data-useragent*='MSIE 10.0'] .selector {...} Method 2: http://www.impressivewebs.com/ie10-css-hacks/ Place this script in the <head>: <script> if (/*@cc_on!@*/false && document.documentMode === 10) { document.documentElement.className+=' ie10'; -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,10 +41,8 @@ Use this JavaScript: var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent); Usage: html[data-useragent*='MSIE 10.0'] .selector {...} Method 2: http://www.impressivewebs.com/ie10-css-hacks/ -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,6 +34,7 @@ http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx IE10 Only ================== Method 1: http://css-tricks.com/ie-10-specific-styles/ Use this JavaScript: @@ -45,7 +46,7 @@ html[data-useragent*='MSIE 10.0'] h1 { color: blue; } -- Method 2: http://www.impressivewebs.com/ie10-css-hacks/ Other option: place this script in the <head>: -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,8 +33,9 @@ IE9 Only http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx IE10 Only ================== http://css-tricks.com/ie-10-specific-styles/ Use this JavaScript: var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent); -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,15 @@ html[data-useragent*='MSIE 10.0'] h1 { color: blue; } Nice article with other IE10 CSS hacks: http://www.impressivewebs.com/ie10-css-hacks/ Other option: place this script in the <head>: <script> if (/*@cc_on!@*/false && document.documentMode === 10) { document.documentElement.className+=' ie10'; } </script> Usage: .ie10 .selector {...} IE10 and IE11 ================== -
ricardozea revised this gist
Jun 28, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,9 +42,13 @@ doc.setAttribute('data-useragent', navigator.userAgent); Then use this CSS: html[data-useragent*='MSIE 10.0'] h1 { color: blue; } -- Nice article with other IE10 CSS hacks: http://www.impressivewebs.com/ie10-css-hacks/ Other option IE10 and IE11 ================== @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { -
ricardozea revised this gist
Mar 25, 2015 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,6 @@ html[data-useragent*='MSIE 10.0'] h1 { color: blue; } Nice article with other IE10 CSS hacks: http://www.impressivewebs.com/ie10-css-hacks/ IE10 and IE11 ================== @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { -
ricardozea revised this gist
Mar 25, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,6 +42,10 @@ doc.setAttribute('data-useragent', navigator.userAgent); Then use this CSS: html[data-useragent*='MSIE 10.0'] h1 { color: blue; } Nice article with other IE10 CSS hacks: http://www.impressivewebs.com/ie10-css-hacks/ IE10 and IE11 ================== @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { -
ricardozea revised this gist
Mar 25, 2015 . No changes.There are no files selected for viewing
-
ricardozea revised this gist
Mar 27, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,14 @@ IE6 Only ================== _selector {...} IE6 & IE7 ================== *html or { _property: } IE7 Only ================== *+html or { *property: } - Keep in mind that you have to put the IE7 property first within the same selector. IE8 ================== -
ricardozea revised this gist
Jan 3, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ IE7 Only IE8 ================== .selector/*\**/ { color:#f00; } **NOTE**: LESS v1.5.0 shoots out an error when compiling the CSS if you use this hack :/ IE8 and IE9 (TOTALLY NOT NEEDED - I LEFT HERE FOR REFERENCE ONLY) @@ -25,6 +25,7 @@ Also, using "\9" is picked up by IE10 and IE11 so you need to redeclare the CSS IE9 Only ================== :root .class/#id { property:value \0/IE9; } **NOTE**: Prepos v4.0.1 shoots out an error when compiling the CSS if you use this hack :/ http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx IE10 Only -
rzea revised this gist
Nov 19, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ IE7 Only IE8 ================== .selector/*\**/ { color:#f00; } NOTE: LESS v1.5.0 shoots out an error when compiling the CSS if you use this hack :/ IE8 and IE9 (TOTALLY NOT NEEDED - I LEFT HERE FOR REFERENCE ONLY) -
rzea revised this gist
Nov 19, 2013 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,12 @@ IE7 Only ================== *+html or { *property:... } - Keep in mind that you have to put the IE7 property first within the same selector. IE8 ================== .selector/*\**/ { color:#f00; } IE8 and IE9 (TOTALLY NOT NEEDED - I LEFT HERE FOR REFERENCE ONLY) ================== .selector { color:#f00\9; } - http://stackoverflow.com/questions/660652/ie8-css-selector -
rzea renamed this gist
Nov 19, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rzea revised this gist
Nov 18, 2013 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,10 +8,14 @@ IE7 Only IE8 and IE9 (There doesn't seem to be an 'IE8 Only' hack) ================== .selector { color:#f00\9; } - http://stackoverflow.com/questions/660652/ie8-css-selector The above solution doesn't work with font-family, so instead you need to use "\0/ !important" Example: { font-family:Arial \0/ !important; } http://dimox.net/personal-css-hacks-for-ie6-ie7-ie8/ Also, using "\9" is picked up by IE10 and IE11 so you need to redeclare the CSS rules with "-ms-high-contrast:". See info below. IE9 Only ================== :root .class/#id { property:value \0/IE9; } -
rzea revised this gist
Nov 18, 2013 . 1 changed file with 34 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,34 @@ IE6 Only ================== *html or { _property:... } IE7 Only ================== *+html or { *property:... } - Keep in mind that you have to put the IE7 property first within the same selector. IE8 and IE9 (There doesn't seem to be an 'IE8 Only' hack) ================== Use \9 = p { color:#f00\9; } - http://stackoverflow.com/questions/660652/ie8-css-selector The above solution doesn't work with font-family, so instead you need to use "\0/ !important" >> { font-family:Arial \0/ !important; } http://dimox.net/personal-css-hacks-for-ie6-ie7-ie8/ IE9 Only ================== :root .class/#id { property:value \0/IE9; } http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx IE10 Only http://css-tricks.com/ie-10-specific-styles/ ================== Use this JavaScript: var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent); Then use this CSS: html[data-useragent*='MSIE 10.0'] h1 { color: blue; } IE10 and IE11 ================== @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .selector { property:value; } } -
Ricardo Zea revised this gist
Jun 13, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ *html or { _property:... } - To target only IE7, use: *+html or { *property:... } - Keep in mind that you have to put the IE7 property first within the same selector. - To target IE8-9, use: \9 >> p { color:#f00\9; } - http://stackoverflow.com/questions/660652/ie8-css-selector The above solution doesn't work with font-family, so instead you need to use "\0/ !important" >> { font-family:Arial \0/ !important; } http://dimox.net/personal-css-hacks-for-ie6-ie7-ie8/ - To target IE9+ only, use: :root .class/#id { property:value \0/IE9; } http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx -
Ricardo Zea created this gist
May 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ - To target only IE6, use: *html or { _property:... } - To target only IE7, use: *+html or { *property:... } - Keep in mind that you have to put the IE7 property first within the same selector. - To target IE8-9, use: \9 >> p { color:#f00\9; } - http://stackoverflow.com/questions/660652/ie8-css-selector The above solution doesn't work with font-family, so instead you need to use "\0/ !important" >> { font-family:Arial \0/ !important; } http://dimox.net/personal-css-hacks-for-ie6-ie7-ie8/ - To target IE9+ only, use: :root .class/#id { property:value \0/IE9; } http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx