Skip to content

Commit e017bcd

Browse files
authored
Merge pull request #125 from kit-data-manager/improved-design
bugfix
2 parents 0d3c9b6 + a53925a commit e017bcd

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ class MappingInputProvider extends HTMLElement {
7777
submit.setAttribute('disabled', 'true');
7878
submit.addEventListener('click', () => void this.handleSubmitClick(), false);
7979
}
80+
81+
console.log('Shadow DOM mode:', this.shadowRoot.mode);
82+
console.log('Shadow DOM host:', this.shadowRoot.host);
8083
}
8184

8285
/**

src/style.css

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:root {
1+
:host {
22
--border-radius: 0.4rem;
33
--padding-around: 1.25rem;
44
--margin-around: 0.75rem;
@@ -14,9 +14,21 @@
1414
--background-secondary: #fdfdfd;
1515
--grid-element-min-width: 15rem;
1616

17+
display: block;
18+
box-sizing: border-box;
19+
width: 100%;
1720
font-family: sans-serif;
1821
font-size: medium;
1922
overflow-x: hidden;
23+
line-height: normal;
24+
color: var(--text-black);
25+
background: transparent;
26+
}
27+
28+
:host *,
29+
:host *::before,
30+
:host *::after {
31+
box-sizing: border-box;
2032
}
2133

2234
#fileUpload {
@@ -86,7 +98,7 @@ button[disabled|='true'] {
8698
background-color: var(--primary-color);
8799
color: var(--text-white);
88100
width: 100%;
89-
height: fit-content;
101+
flex: 1 0 auto;
90102
justify-content: center;
91103
}
92104

@@ -159,7 +171,7 @@ button[disabled|='true'] {
159171
display: inline-block;
160172
text-align: justify;
161173
overflow-x: auto;
162-
height: calc(var(--grid-element-min-width)/3 + 1rem);
174+
height: calc(var(--grid-element-min-width)/2 + 2rem);
163175
margin-bottom: var(--margin-around);
164176
}
165177

@@ -173,20 +185,30 @@ button[disabled|='true'] {
173185
display: flex;
174186
justify-content: center;
175187
width: 100%;
176-
overflow-x: auto;
177-
align-self: center;
188+
min-width: 0;
189+
}
190+
191+
@container (max-width: 500px) {
192+
.options-container {
193+
grid-template-columns: 1fr;
194+
}
195+
196+
.description{
197+
height: calc((var(--grid-element-min-width)*2)/3 + 1rem);
198+
}
178199
}
179200

180201
/* The common styles for options-container */
181202
.options-container {
182203
display: grid;
183204
grid-auto-columns: min-content;
184205
grid-auto-flow: row;
206+
grid-template-columns: repeat(auto-fit, minmax(min(var(--grid-element-min-width), 100%), 1fr));
185207
gap: 1rem;
186-
grid-template-columns: repeat(auto-fit, minmax(var(--grid-element-min-width), 1fr));
187208
width: 100%;
188209
margin: var(--margin-around);
189210
padding-bottom: 0.625rem;
211+
container-type: inline-size;
190212
}
191213

192214
.cards {

0 commit comments

Comments
 (0)