Skip to content

Commit

Permalink
Fixed IE8 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgorbatchev committed Jul 2, 2010
1 parent dfd8a3d commit d7ed92e
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 33 deletions.
21 changes: 17 additions & 4 deletions compass/shCore.scss
Expand Up @@ -37,6 +37,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font: {
family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
weight: normal !important;
Expand Down Expand Up @@ -83,11 +84,12 @@
position: relative !important;

textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -134,7 +136,7 @@
a {
padding: 0 !important;
display: none !important;
&.expandSource, &.help { display: inline !important; }
&.expandSource { display: inline !important; }
}
}
}
Expand Down Expand Up @@ -162,6 +164,18 @@
}
}

&.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;

.toolbar {
line-height: 8px !important;
a {
padding-top: 0px !important;
}
}
}

// Print view.
// Colors are based on the default theme without background.
&.printing {
Expand Down Expand Up @@ -199,5 +213,4 @@
.color3, .color3 a { color: red !important; }
.break, .break a { color: black !important; }
}
}

}
5 changes: 4 additions & 1 deletion scripts/shCore.js
Expand Up @@ -1584,7 +1584,10 @@ sh.Highlighter.prototype = {
// finally, process the links
if (this.getParam('auto-links'))
html = processUrls(html);


if (typeof(navigator) != 'undefined' && navigator.userAgent && navigator.userAgent.match(/MSIE/))
classes.push('ie');

html =
'<div id="' + getHighlighterId(this.id) + '" class="' + classes.join(' ') + '">'
+ (this.getParam('toolbar') ? sh.toolbar.getHtml(this) : '')
Expand Down
16 changes: 14 additions & 2 deletions styles/shCore.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down
16 changes: 14 additions & 2 deletions styles/shCoreDefault.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down
16 changes: 14 additions & 2 deletions styles/shCoreDjango.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down
16 changes: 14 additions & 2 deletions styles/shCoreEclipse.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down
16 changes: 14 additions & 2 deletions styles/shCoreEmacs.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down
16 changes: 14 additions & 2 deletions styles/shCoreFadeToGrey.css
Expand Up @@ -27,6 +27,7 @@
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
Expand Down Expand Up @@ -68,11 +69,12 @@
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 120% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -110,7 +112,7 @@
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource, .syntaxhighlighter.collapsed .toolbar span a.help {
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
Expand All @@ -134,6 +136,16 @@
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
Expand Down

0 comments on commit d7ed92e

Please sign in to comment.