Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit f200fbf

Browse files
committed
that time I pushed an unnecessary change as a full version. anyway this patches 2.0. will retag and keep version number, since the beforeenhance edit is notable enough anyway
1 parent 82c7570 commit f200fbf

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

dist/xrayhtml.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* https://github.com/filamentgroup/x-rayhtml
33
* Copyright (c) 2015 ; Licensed MIT */
44

5+
/*! X-rayHTML - v1.0.3 - 2015-09-08
6+
* https://github.com/filamentgroup/x-rayhtml
7+
* Copyright (c) 2015 ; Licensed MIT */
8+
59
.xrayhtml {
610
border: 1px solid rgba(0,0,0,.1);
711
border-radius: .3em;
@@ -77,8 +81,12 @@
7781
-moz-perspective: 2500px;
7882
perspective: 2500px;
7983
}
80-
.method-flip > *:first-child {
84+
.method-flip .snippet {
85+
padding: 0;
86+
margin: 0;
8187
position: relative;
88+
top: 0;
89+
left: 0;
8290
z-index: 2;
8391
min-height: 100%;
8492
}
@@ -91,7 +99,7 @@
9199
overflow-x: scroll;
92100
}
93101

94-
.method-flip > *:first-child {
102+
.method-flip .snippet {
95103
-webkit-transform: rotateY(0deg);
96104
-webkit-transform-style: preserve-3d;
97105
-webkit-backface-visibility: hidden;
@@ -103,7 +111,7 @@
103111
-webkit-transition: -webkit-transform .4s ease-in-out;
104112
-moz-transition: -moz-transform .4s ease-in-out;
105113
}
106-
.method-flip.view-source > *:first-child {
114+
.method-flip.view-source .snippet {
107115
z-index: 1;
108116
-webkit-transform: rotateY(180deg);
109117
-moz-transform: rotateY(180deg);

dist/xrayhtml.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ window.jQuery = window.jQuery || window.shoestring;
7070
var el = this,
7171
preel = document.createElement( "pre" ),
7272
codeel = document.createElement( "code" ),
73+
wrap = document.createElement( "div" ),
7374
sourcepanel = document.createElement( "div" ),
7475
// remove empty value attributes
7576
code = el.innerHTML.replace( /\=\"\"/g, '' ),
7677
source = document.createTextNode( code );
7778

78-
$( el ).addClass( "snippet" );
79+
wrap.setAttribute( "class", "snippet" );
80+
81+
$( el ).wrapInner( wrap );
7982

8083
codeel.appendChild( source );
8184
preel.appendChild( codeel );

src/X-rayHTML.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*! X-rayHTML - v1.0.3 - 2015-09-08
2+
* https://github.com/filamentgroup/x-rayhtml
3+
* Copyright (c) 2015 ; Licensed MIT */
4+
15
.xrayhtml {
26
border: 1px solid rgba(0,0,0,.1);
37
border-radius: .3em;
@@ -73,8 +77,12 @@
7377
-moz-perspective: 2500px;
7478
perspective: 2500px;
7579
}
76-
.method-flip > *:first-child {
80+
.method-flip .snippet {
81+
padding: 0;
82+
margin: 0;
7783
position: relative;
84+
top: 0;
85+
left: 0;
7886
z-index: 2;
7987
min-height: 100%;
8088
}
@@ -87,7 +95,7 @@
8795
overflow-x: scroll;
8896
}
8997

90-
.method-flip > *:first-child {
98+
.method-flip .snippet {
9199
-webkit-transform: rotateY(0deg);
92100
-webkit-transform-style: preserve-3d;
93101
-webkit-backface-visibility: hidden;
@@ -99,7 +107,7 @@
99107
-webkit-transition: -webkit-transform .4s ease-in-out;
100108
-moz-transition: -moz-transform .4s ease-in-out;
101109
}
102-
.method-flip.view-source > *:first-child {
110+
.method-flip.view-source .snippet {
103111
z-index: 1;
104112
-webkit-transform: rotateY(180deg);
105113
-moz-transform: rotateY(180deg);

src/X-rayHTML.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ window.jQuery = window.jQuery || window.shoestring;
7575
var el = this,
7676
preel = document.createElement( "pre" ),
7777
codeel = document.createElement( "code" ),
78+
wrap = document.createElement( "div" ),
7879
sourcepanel = document.createElement( "div" ),
7980
// remove empty value attributes
8081
code = el.innerHTML.replace( /\=\"\"/g, '' ),
8182
source = document.createTextNode( code );
8283

83-
$( el ).addClass( "snippet" );
84+
wrap.setAttribute( "class", "snippet" );
85+
86+
$( el ).wrapInner( wrap );
8487

8588
codeel.appendChild( source );
8689
preel.appendChild( codeel );

0 commit comments

Comments
 (0)