Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions css/mistica-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,62 @@ button.mistica-display-card:has(.mistica-card__media):active:after {
height: auto;
}

/* Grid Layout */

.mistica-grid-layout {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 24px;
}

@media (max-width: 1023px) {
.mistica-grid-layout {
grid-template-columns: minmax(0, 1fr);
Comment thread
yceballost marked this conversation as resolved.
}

.mistica-grid-layout [class^="mistica-col-"] {
grid-column: span 1;
}

.mistica-col-1 {
display: none;
}
}

@media (min-width: 1024px) and (max-width: 1367px) {
.mistica-grid-layout {
grid-column-gap: 16px;
}
}

.mistica-col-1 {
grid-column: span 1;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an extra space here. Please check your editor prettier setup


.mistica-col-3 {
grid-column: span 3;
}

.mistica-col-4 {
grid-column: span 4;
}

.mistica-col-5 {
grid-column: span 5;
}

.mistica-col-6 {
grid-column: span 6;
}

.mistica-col-8 {
grid-column: span 8;
}

.mistica-col-9 {
grid-column: span 9;
}

/* Table */
.mistica-table {
border-collapse: separate;
Expand Down
99 changes: 99 additions & 0 deletions examples/css/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,107 @@ <h2 class="mistica-card__title">Title</h2>
</a>
</div>
</div>

<h3 class="mistica-text-title2">Grid Layout</h3>
<h4 class="mistica-text-title1">6 + 6</h4>
<section class="mistica-grid-layout" id="mistica-grid">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the id

<div class="mistica-col-6">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-6">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
</section>
<h4 class="mistica-text-title1">5 + 4</h4>
<section class="mistica-grid-layout" id="mistica-grid">
<div class="mistica-col-1"></div>
<div class="mistica-col-5">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-1"></div>
<div class="mistica-col-4">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-1"></div>
</section>
<h4 class="mistica-text-title1">4 + 6</h4>
<section class="mistica-grid-layout" id="mistica-grid">
<div class="mistica-col-1"></div>
<div class="mistica-col-4">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-6">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-1"></div>
</section>
<h4 class="mistica-text-title1">8 + 4</h4>
<section class="mistica-grid-layout" id="mistica-grid">
<div class="mistica-col-8">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-4">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
</section>
<h4 class="mistica-text-title1">3 + 9</h4>
<section class="mistica-grid-layout" id="mistica-grid">
<div class="mistica-col-3">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
<div class="mistica-col-9">
<div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;">
<svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none">
<use href="#mistica-grid-svg"></use>
</svg>
</div>
</div>
</section>
</div>
</div>
<script type="module" src="/main.js"></script>
</body>

<svg style="display: none;">
<symbol id="mistica-grid-svg">
<line x1="0" y1="0" x2="100" y2="100" style="stroke-width: 2; stroke: rgba(11, 39, 57, 0.1);" />
<line x1="100" y1="0" x2="0" y2="100" style="stroke-width: 2; stroke: rgba(11, 39, 57, 0.1);" />
</symbol>
</svg>
</html>
Loading