make cards look better on smaller screens

This commit is contained in:
Cyberes 2024-08-19 18:29:53 -06:00
parent cfc3641a76
commit 799953c0a2
2 changed files with 3 additions and 3 deletions

View File

@ -74,6 +74,7 @@ class SpaceWeather24hrMaxCard extends HTMLElement {
padding: 16px; padding: 16px;
margin-bottom: 16px; margin-bottom: 16px;
text-align: center; text-align: center;
line-height: initial;
} }
.scale-item { .scale-item {

View File

@ -31,13 +31,13 @@ class SpaceWeatherPredictionCard extends HTMLElement {
.prediction-item { .prediction-item {
text-align: center; text-align: center;
/*margin-bottom: 16px;*/
cursor: pointer; cursor: pointer;
} }
.prediction-label { .prediction-label {
font-weight: bold; font-weight: bold;
margin-bottom: 8px; margin-bottom: 8px;
min-height: 40px;
} }
.prediction-value { .prediction-value {
@ -202,8 +202,7 @@ class SpaceWeatherPredictionCard extends HTMLElement {
const dayButtons = this.shadowRoot.querySelectorAll('.day-button'); const dayButtons = this.shadowRoot.querySelectorAll('.day-button');
dayButtons.forEach(button => { dayButtons.forEach(button => {
button.addEventListener('click', () => { button.addEventListener('click', () => {
const day = button.dataset.day; this._selectedDay = button.dataset.day;
this._selectedDay = day;
this.render(); this.render();
}); });
}); });