Skip to content

Commit

Permalink
Fix <legend> elements inside <fieldset>'s that are the themselves in …
Browse files Browse the repository at this point in the history
…the #main to not be treated as regular flex elements in IE10/IE11."
  • Loading branch information
Matriks404 committed Jan 10, 2024
1 parent c1b89e2 commit 623e33b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
12 changes: 10 additions & 2 deletions dist/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ function loadCurrentVersion() {
blocksElement.appendChild(blocksLegendElement);
blocksLegendElement.innerHTML = 'Blocks';

var blocksContentElement = document.createElement('div');
blocksElement.appendChild(blocksContentElement);
blocksContentElement.classList.add('fieldset-content');

var infoUnobtainableElement = document.getElementById('info-unobtainable');
var infoMigratableElement = document.getElementById('info-migratable');
var infoRemovedElement = document.getElementById('info-removed');
Expand All @@ -258,7 +262,7 @@ function loadCurrentVersion() {
checkEntries(blocks, infoMigratableElement, "isObtainableByMigration");
checkEntries(blocks, infoRemovedElement, "isRemoved");

loadEntries(blocks, blocksElement, "blocks");
loadEntries(blocks, blocksContentElement, "blocks");

var items = versions[id].items;

Expand All @@ -271,6 +275,10 @@ function loadCurrentVersion() {
itemsElement.appendChild(itemsLegendElement);
itemsLegendElement.innerHTML = 'Items';

var itemsContentElement = document.createElement('div');
itemsElement.appendChild(itemsContentElement);
itemsContentElement.classList.add('fieldset-content');

if (infoUnobtainableElement.style.display == "none") {
checkEntries(items, infoUnobtainableElement, "isUnobtainable");
}
Expand All @@ -283,7 +291,7 @@ function loadCurrentVersion() {
checkEntries(items, infoRemovedElement, "isRemoved");
}

loadEntries(items, itemsElement, "items");
loadEntries(items, itemsContentElement, "items");
}

var elementsWithTooltips = document.querySelectorAll('.with-tooltip');
Expand Down
20 changes: 11 additions & 9 deletions scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ img {
}

main > fieldset {
display: flex;

width: 320px;

flex-flow: row wrap;
align-content: flex-start;

row-gap: 3px;
column-gap: 4px;
}

main > fieldset:only-of-type {
Expand Down Expand Up @@ -172,7 +164,7 @@ p {
#settings {
margin: 0 auto 24px auto;

max-width: 320px;
width: 320px;
}

#settings > button {
Expand Down Expand Up @@ -217,6 +209,16 @@ p {
gap: 16px;
}

.fieldset-content {
display: flex;

flex-flow: row wrap;
align-content: flex-start;

row-gap: 3px;
column-gap: 4px;
}

.id {
text-align: center;
}
Expand Down

0 comments on commit 623e33b

Please sign in to comment.