Created
May 9, 2012 09:07
-
-
Save PrideChung/2643180 to your computer and use it in GitHub Desktop.
Revisions
-
PrideChung revised this gist
May 10, 2012 . 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 @@ -1,7 +1,7 @@ <style> selector{ max-width:100px; } </style> <!--[if IE 6]> <style> selector{ _width:expression(this.width>100?(function(dom){dom.style.width='100px';})(this):'auto');} </style> <![endif]--> <!-- NOTICE: target element must NOT set width or height attribute, or this doesn't work --> @@ -12,7 +12,7 @@ <content><![CDATA[ <style> ${1:selector}{ max-width:${2:maxwidth}px; } </style> <!--[if IE 6]> <style> ${1}{ _width:expression(this.width>${2}?(function(dom){dom.style.width='${2}px';})(this):'auto'); } </style> <![endif]--> ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> -
PrideChung revised this gist
May 10, 2012 . 1 changed file with 16 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 @@ -4,4 +4,19 @@ selector{ _width:expression(this.width>100?(function(dom){dom.style.width='100px';})(this):'auto'); max-width: 100px; } </style> <![endif]--> <!-- NOTICE: target element must NOT set width or height attribute, or this doesn't work --> <!-- I made a Sublime Text snippet, maybe can also use in TextMate --> <snippet> <content><![CDATA[ <style> ${1:selector}{ max-width:${2:maxwidth}px; } </style> <!--[if IE 6]> <style> ${1}{ _width:expression(this.width>${2}?(function(dom){dom.style.width='${2}px';})(this):'auto'); max-width: ${2}px; } </style> <![endif]--> ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <tabTrigger>maxwidth</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> </snippet> -
PrideChung revised this gist
May 9, 2012 . No changes.There are no files selected for viewing
-
PrideChung revised this gist
May 9, 2012 . 2 changed files 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 @@ -0,0 +1,7 @@ <style> selector{ max-width:100px; } </style> <!--[if IE 6]> <style> selector{ _width:expression(this.width>100?(function(dom){dom.style.width='100px';})(this):'auto'); max-width: 100px; } </style> <![endif]--> <!-- NOTICE: target element must NOT set width or height attribute, or this doesn't work --> 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,4 +0,0 @@ -
PrideChung created this gist
May 9, 2012 .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,4 @@ <style> selector{ max-width:maxwidthpx; } </style> <!--[if IE]> <style> selector{ _width:expression(this.width>maxwidth?(function(dom){dom.style.width='maxwidthpx';})(this):'auto'); max-width: maxwidthpx; } </style> <![endif]-->