Skip to content

Commit d0426ec

Browse files
fix(css): remove weather-icons font classes from img to fix icon distortion
The `wi` class from MagicMirror's global weather-icons library was applied to the current-weather `<img>`, setting font-related CSS that interfered with the image's intrinsic aspect ratio and caused elongated icons. Remove `wi`/`wi-*` classes (unused on an img element) and add `flex-shrink: 0` to prevent the flex container from compressing the width.
1 parent 6183e7d commit d0426ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

MMM-OneCallWeather.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ Module.register('MMM-OneCallWeather', {
612612
largeWeatherIcon.className = 'large-weather-icon-container light'
613613

614614
const weatherIcon = document.createElement('img')
615-
weatherIcon.className = `wi weathericon wi-${currentWeather.weatherIcon}`
615+
weatherIcon.className = 'weathericon'
616616
weatherIcon.src = `modules/MMM-OneCallWeather/icons/${this.config.iconset}/${currentWeather.weatherIcon}.${this.config.iconsetFormat}`
617617
largeWeatherIcon.appendChild(weatherIcon)
618618

0 commit comments

Comments
 (0)