mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
rename collection html classes
This commit is contained in:
@@ -1,27 +1,25 @@
|
||||
div.chill-collection {
|
||||
ul.chill-collection__list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
li.chill-collection__list__entry:nth-child(2n) {
|
||||
background-color: var(--chill-light-gray);
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
// all entries, except the last one
|
||||
li.chill-collection__list__entry:nth-last-child(1n+2) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
button.chill-collection__list__remove-entry {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
button.chill-collection__button--add {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
padding: 1em;
|
||||
|
||||
ul.list-entry {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
li.entry {
|
||||
padding: 1em;
|
||||
border: 1px solid var(--chill-llight-gray);
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: var(--chill-llight-gray);
|
||||
}
|
||||
}
|
||||
|
||||
button.remove-entry {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
button.add-entry {
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ var handleAdd = function(button) {
|
||||
;
|
||||
content = prototype.replace(new RegExp('__name__', 'g'), counter);
|
||||
entry.innerHTML = content;
|
||||
entry.classList.add('chill-collection__list__entry');
|
||||
entry.classList.add('entry');
|
||||
initializeRemove(collection, entry);
|
||||
collection.appendChild(entry);
|
||||
|
||||
@@ -75,7 +75,7 @@ var initializeRemove = function(collection, entry) {
|
||||
return;
|
||||
}
|
||||
|
||||
button.classList.add('sc-button', 'bt-delete', 'chill-collection__list__remove-entry');
|
||||
button.classList.add('btn', 'btn-delete', 'remove-entry');
|
||||
button.textContent = content;
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
@@ -110,6 +110,3 @@ window.addEventListener('load', function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user