Start styling output box. Remove readonly.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>HTML 5 Boilerplate</title>
|
||||
<!-- <link rel="stylesheet" href="style.css"> -->
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>CodeList</h1>
|
||||
@@ -27,10 +27,6 @@
|
||||
Output
|
||||
</h3>
|
||||
<div>
|
||||
<div>
|
||||
<label for="checkbox-read-only">Read-only?</label>
|
||||
<input id="checkbox-read-only" type="checkbox">
|
||||
</div>
|
||||
<div id="output">
|
||||
<div id="gutter"></div>
|
||||
<div contenteditable="true" id="output-area" class="output-area"></div>
|
||||
@@ -39,7 +35,6 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const readOnlyCheckbox = document.getElementById("checkbox-read-only");
|
||||
|
||||
const gutter = document.getElementById("gutter");
|
||||
const outputArea = document.getElementById("output-area");
|
||||
@@ -53,10 +48,6 @@
|
||||
return outputArea.children.length;
|
||||
}
|
||||
|
||||
readOnlyCheckbox.addEventListener("change", (event) => {
|
||||
outputArea.readOnly = readOnlyCheckbox.checked;
|
||||
})
|
||||
|
||||
function updateGutterLineCount() { // TODO: Refactor so its not slow when theres more
|
||||
gutter.innerHTML = ""
|
||||
console.log("update gutter line count")
|
||||
|
||||
16
public/style.css
Normal file
16
public/style.css
Normal file
@@ -0,0 +1,16 @@
|
||||
#output-area {
|
||||
border-right: 2px solid grey;
|
||||
width: 30ch;
|
||||
}
|
||||
|
||||
#output-area:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#gutter {
|
||||
background-color: rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
#output {
|
||||
display: flex;
|
||||
}
|
||||
Reference in New Issue
Block a user