Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DRY: move examples' css to a separate file
The css was virtually identical for all example files.
Some of them also had a transition rule,
and two had a label class definition.
These extra styles were also added to the base style,
using classes to allow them to apply only when appropriate.
  • Loading branch information
waldyrious committed Sep 3, 2013
commit a63c354040c4cc9d19b59f24cec09a5fbbd09557
72 changes: 2 additions & 70 deletions examples/3D.html
Original file line number Diff line number Diff line change
Expand Up @@ -762,78 +762,10 @@

</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

.mathbox-label {
font-family: 'klavika-web', sans-serif;
font-weight: normal;
font-style: normal;
text-shadow:
3px 0px 1px rgb(255, 255, 255),
-3px 0px 1px rgb(255, 255, 255),
0px -3px 1px rgb(255, 255, 255),
0px 3px 1px rgb(255, 255, 255),
2px 2px 1px rgb(255, 255, 255),
-2px 2px 1px rgb(255, 255, 255),
2px -2px 1px rgb(255, 255, 255),
-2px -2px 1px rgb(255, 255, 255),
3px 2px 1px rgb(255, 255, 255),
-3px 2px 1px rgb(255, 255, 255),
3px -2px 1px rgb(255, 255, 255),
-3px -2px 1px rgb(255, 255, 255),
1px 3px 1px rgb(255, 255, 255),
-1px 3px 1px rgb(255, 255, 255),
1px -3px 1px rgb(255, 255, 255),
-1px -3px 1px rgb(255, 255, 255),
-1px -1px 1px rgb(255, 255, 255),
-1px 1px 1px rgb(255, 255, 255),
1px -1px 1px rgb(255, 255, 255),
1px 1px 1px rgb(255, 255, 255);
}

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;

-webkit-transition: opacity 300ms ease-in-out;
-moz-transition: opacity 300ms ease-in-out;
transition: opacity 300ms ease-in-out;
}

#info kbd {
background: #aaa;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>
<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
<div id="info">Press the <kbd>→</kbd> key to step through.</div>
<div id="info" class="transition">Press the <kbd>→</kbd> key to step through.</div>
</body>
</html>
40 changes: 1 addition & 39 deletions examples/Axis.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,45 +167,7 @@
});
</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;
}

#info kbd {
background: #aaa;

box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>
<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
Expand Down
45 changes: 2 additions & 43 deletions examples/BezierSurface.html
Original file line number Diff line number Diff line change
Expand Up @@ -525,51 +525,10 @@

</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;

-webkit-transition: opacity 300ms ease-in-out;
-moz-transition: opacity 300ms ease-in-out;
transition: opacity 300ms ease-in-out;
}

#info kbd {
background: #aaa;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>
<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
<div id="info">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
<div id="info" class="transition">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
</body>
</html>
45 changes: 2 additions & 43 deletions examples/ComplexCircle.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,51 +368,10 @@

</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;

-webkit-transition: opacity 300ms ease-in-out;
-moz-transition: opacity 300ms ease-in-out;
transition: opacity 300ms ease-in-out;
}

#info kbd {
background: #aaa;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>
<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
<div id="info">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
<div id="info" class="transition">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
</body>
</html>
45 changes: 2 additions & 43 deletions examples/ComplexCircleAlt.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,51 +384,10 @@

</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;

-webkit-transition: opacity 300ms ease-in-out;
-moz-transition: opacity 300ms ease-in-out;
transition: opacity 300ms ease-in-out;
}

#info kbd {
background: #aaa;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>
<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
<div id="info">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
<div id="info" class="transition">Use the <kbd>←</kbd><kbd>→</kbd> keys to step through.</div>
</body>
</html>
40 changes: 1 addition & 39 deletions examples/ComplexExponentiation.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,45 +93,7 @@

</script>

<style type="text/css" media="screen">
html, body { height: 100%; }
body { margin: 0; padding: 0 }
canvas { display: block }

#info {
position: absolute;
left: 50%;
bottom: 50px;
z-index: 20;

width: 300px;
margin-left: -150px;

padding: 25px;
background: rgba(0, 0, 0, .5);
color: #fff;

font-family: "Lucida Grande", sans-serif;
font-size: 16px;
text-align: center;

border-radius: 3px;
text-shadow: 0px 1px 0px rgba(0, 0, 0, .4);

opacity: 0;
}

#info kbd {
background: #aaa;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .3);
border-radius: 3px;
padding: 3px;
margin: 3px;

font-family: inherit;
}
</style>

<link href="base.css" rel="stylesheet" type="text/css" media="screen">

</head>
<body>
Expand Down
Loading