Skip to content

Commit

Permalink
Move CSS required for simple-hint.js into simple-hint.css
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Nov 6, 2011
1 parent af01eb4 commit 8cd3465
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
24 changes: 2 additions & 22 deletions demo/complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,12 @@
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
<script src="../lib/util/simple-hint.js"></script>
<link rel="stylesheet" href="../lib/util/simple-hint.css">
<script src="../lib/util/javascript-hint.js"></script>
<link rel="stylesheet" href="../theme/night.css">
<script src="../mode/javascript/javascript.js"></script>
<link rel="stylesheet" href="../css/docs.css">

<style type="text/css">
.completions {
position: absolute;
z-index: 10;
overflow: hidden;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
}
.completions select {
background: #fafafa;
outline: none;
border: none;
padding: 0;
margin: 0;
font-family: monospace;
}
.CodeMirror {
border: 1px solid #eee;
}
</style>
<style type="text/css">.CodeMirror {border: 1px solid #eee;}</style>
</head>
<body>
<h1>CodeMirror 2: Autocomplete demo</h1>
Expand Down
16 changes: 16 additions & 0 deletions lib/util/simple-hint.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.CodeMirror-completions {
position: absolute;
z-index: 10;
overflow: hidden;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
}
.CodeMirror-completions select {
background: #fafafa;
outline: none;
border: none;
padding: 0;
margin: 0;
font-family: monospace;
}
2 changes: 1 addition & 1 deletion lib/util/simple-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

// Build the select widget
var complete = document.createElement("div");
complete.className = "completions";
complete.className = "CodeMirror-completions";
var sel = complete.appendChild(document.createElement("select"));
// Opera doesn't move the selection when pressing up/down in a
// multi-select, but it does properly support the size property on
Expand Down

0 comments on commit 8cd3465

Please sign in to comment.