Skip to content

Commit

Permalink
Updated styles for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Erallie committed Dec 5, 2024
1 parent 2aef16d commit 696755c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
18 changes: 15 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,16 @@ class TimestampModal extends Modal {
inputDiv.createEl('br');

//#region timezone
inputDiv.createEl('label', { text: 'Choose a timezone', cls: 'timestamp-label' });
let timezone = inputDiv.createEl('select', {
const timezoneDiv = contentEl.createDiv()
timezoneDiv.addClass('timestamp-input-div')

timezoneDiv.createEl('label', {
text: 'Choose a timezone', cls: 'timestamp-label',
attr: {
id: 'timezone-label'
}
});
let timezone = timezoneDiv.createEl('select', {
cls: 'timezone-options',
attr: {
id: 'timezone',
Expand Down Expand Up @@ -340,7 +348,11 @@ class TimestampModal extends Modal {
contentEl.createEl('h3', { text: 'Or', cls: 'timestamp-button-heading' })
const historyDiv = contentEl.createDiv();
historyDiv.addClass('timestamp-input-div')
historyDiv.createEl('label', { text: 'Choose from history', cls: 'timestamp-label' })
historyDiv.createEl('label', {
text: 'Choose from history', cls: 'timestamp-label', attr: {
id: 'timestamp-history-label'
}
})
let history = historyDiv.createEl('select', {
attr: {
id: 'history',
Expand Down
7 changes: 6 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ If your plugin does not need CSS, delete this file.
text-align: center;
}

.timezone-options {
body.is-mobile div.timestamp-input-div:has(>#timezone-label) {
margin-top: var(--size-4-2);
}

.timezone-options,
body.is-mobile #history {
margin-top: var(--size-4-2);
}

Expand Down

0 comments on commit 696755c

Please sign in to comment.