Skip to content

Commit ad0433e

Browse files
committed
Changed css Ids to Kebab-case
1 parent 5e79378 commit ad0433e

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

homework/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
}
5151

5252
const htmlString = divElement.join('');
53-
document.getElementById('contributorinfomation').innerHTML = htmlString;
53+
document.getElementById('contributor-information').innerHTML = htmlString;
5454
}
5555

5656
// Load the Repository information into section1 div element.
@@ -95,15 +95,15 @@
9595
}
9696
}
9797
const htmlString = templateElement.join('');
98-
document.getElementById('repodetails').innerHTML = htmlString;
98+
document.getElementById('repo-details').innerHTML = htmlString;
9999
}
100100

101101
// Create options under 'SELECT' element which should have HYF Repositories.
102102

103103
function loadSelectionValues(userRepo) {
104104
const sortRepoName = [];
105105

106-
const selectRepo = document.getElementById('selectrepo');
106+
const selectRepo = document.getElementById('select-repo');
107107

108108
// push all the HYP repo names to sort array.
109109

@@ -127,7 +127,7 @@
127127
selectRepo.appendChild(option);
128128
}
129129

130-
const selectBox = document.getElementById('selectrepo');
130+
const selectBox = document.getElementById('select-repo');
131131
const selectedValue = selectBox.options[selectBox.selectedIndex].value;
132132

133133
// Load Repository information for the choose repository name in the select box.
@@ -147,25 +147,25 @@
147147
} else {
148148
// Create div element 'select' in document body to hold the label element and list box.
149149

150-
createAndAppend('div', BodyEl, { id: 'seletcontainer' });
151-
const select = document.getElementById('seletcontainer');
150+
createAndAppend('div', BodyEl, { id: 'select-container' });
151+
const select = document.getElementById('select-container');
152152
createAndAppend('LABEL', select, {
153153
text: 'HYF Repositories: ',
154154
id: 'label',
155155
for: 'repo',
156156
});
157-
createAndAppend('select', select, { id: 'selectrepo' });
157+
createAndAppend('select', select, { id: 'select-repo' });
158158

159159
// Create two div elements section1 and section2 under 'Root' div to have
160160
// section1 - Repository Information.
161161
// section2 - Contributions.
162162

163-
createAndAppend('div', root, { id: 'repodetails' });
164-
createAndAppend('div', root, { id: 'contributorinfomation' });
163+
createAndAppend('div', root, { id: 'repo-details' });
164+
createAndAppend('div', root, { id: 'contributor-information' });
165165

166166
// Insert section1 before section2 div element under 'root' div.
167-
const newNode = document.getElementById('contributorinfomation');
168-
const referenceNode = document.querySelector('repodetails');
167+
const newNode = document.getElementById('contributor-information');
168+
const referenceNode = document.querySelector('repo-details');
169169
root.insertBefore(newNode, referenceNode);
170170

171171
// Insert Select div first in the body before root div.

homework/style.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@
1313
margin: 10px;
1414
padding: 20px;
1515
}
16-
#seletcontainer {
16+
#select-container {
1717
background-color: blue;
1818
margin-bottom: 10px;
1919
text-align: justify;
2020
width: 100%;
2121
font-size: 10px;
2222
}
23-
#selectrepo {
23+
#select-repo {
2424
margin-bottom: 10px;
2525
margin-top: 10px;
2626
font-size: 10px;
2727
}
28-
#root #repodetails {
28+
#root #repo-details {
2929
background-color: grey;
3030
margin-bottom: 10px;
3131
width: 85%;
3232
height: 50%;
3333
}
34-
#root #contributorinfomation {
34+
#root #contributor-information {
3535
background-color: grey;
3636
width: 80%;
3737
}
@@ -56,15 +56,15 @@ ul li:last-child {
5656
#root {
5757
flex-direction: row;
5858
}
59-
#selectrepo {
59+
#select-repo {
6060
font-size: 15px;
6161
}
62-
#seletcontainer {
62+
#select-container {
6363
font-size: 15px;
6464
}
65-
#root #contributorinfomation {
65+
#root #contributor-information {
6666
width: 100%;
6767
}
68-
#root #repodetails {
68+
#root #repo-details {
6969
width: 100%;
7070
}

0 commit comments

Comments
 (0)