Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit f8c03db

Browse files
committed
feat: enhance snippet store modal with styling and layout adjustments
1 parent 15513d7 commit f8c03db

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,13 @@ class CssSnippetStoreModal extends Modal {
166166

167167
onOpen() {
168168
const { contentEl } = this;
169+
contentEl.addClass('snippet-store-modal');
170+
171+
this.modalEl.style.width = '90vw';
172+
this.modalEl.style.maxWidth = '1098px';
173+
169174
contentEl.createEl('h1', { text: 'CSS Snippet Store' });
170-
const grid = contentEl.createEl('div', { cls: 'snippet-store-grid'});
175+
const grid = contentEl.createEl('div', { cls: 'community-items-container' });
171176

172177
this.snippets.forEach(snippet => {
173178
const card = grid.createDiv({ cls: 'community-item' });

styles.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.mod-snippet-store .community-items-container {
2+
display: grid;
3+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
4+
gap: var(--size-4-4);
5+
margin-top: var(--size-4-4);
6+
max-height: 70vh;
7+
overflow-y: auto;
8+
padding-right: 4px;
9+
}
10+
11+
.mod-snippet-store .community-item {
12+
border: 1px solid var(--background-modifier-border);
13+
border-radius: var(--radius-m);
14+
padding: var(--size-4-4);
15+
background-color: var(--background-secondary);
16+
box-shadow: var(--shadow-s);
17+
}
18+
19+
.mod-snippet-store .snippet-store-button-wrapper {
20+
margin-top: var(--size-4-2);
21+
display: flex;
22+
justify-content: flex-end;
23+
}

0 commit comments

Comments
 (0)