A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Subcategories

  • Share your custom style sheets with the community!

    24 Topics
    302 Posts
    @jerryy622 Hey Jerry, This sounds fantastic! Please share your scripts or a link as to where to find the info! I would love to have this kind of thing running on my TV so i can view it when i switch to the HDMI channel that my Pi would be hooked to! I would love to see some screen shots of what you created also! Joe
  • You have questions regarding CSS?

    114 Topics
    680 Posts
    @kool said Bumping this back up. Pleeeease help Dear @kool , if you are using url as suggested by Sam ( @sdetweil ), you are nearly done. As far as I can see from my rookie perspective you do have some redundancies in your config.js (e.g. the unit section: units, tempUnits, windUnits) ) but this shouldn’t disturb. As far as I understood you can delete these icontables because you do not use the icon-font but try to use some images from sigle file-URLs instead - so you can delete the whole section iconTable {} with all entries. In addition you have to adapt (see above, Sam’s tip) the URL of all you images in your custom.css file. (pls. double check, if the files are really in these locations) You wrote in your current css .weatherforecast .wi-day-sunny { content: url("/home/kool/MagicMirror/css/icons/6fas/day.svg") !important; } IF your weather-icon files are really in this directory (/home/kool/MagicMirror/css/icons/6fas/) than your css should be as follows: .weatherforecast .wi-day-sunny { content: url("/css/icons/6fas/day.svg"); You do not need the !important flag (in my case) second wrong thing besides the URL is your qualifier. you are using .weatherforecast .wi-something .... This cannot be recognized because .weatherforecast is not defined. At first you have to decide if you want to have different icons for the current weather and for the weather forecast. (In my case this is true). IF you would like to have this you have to differentiate the two instances of the weather-module by a “classes” definition. For example your first instance of the weather module (current weather) than should be module: "weather", position: "top_right", // Adjust position as needed classes: "weather_current", config: { weatherProvider: "openmeteo", // Specify the Open-Meteo provider apiBase: "https://api.open-meteo.com/v1", // REQUIRED: Base URL for Open-Meteo lat: xxxx, // REQUIRED: Latitude of the location lon: xxxx, // REQUIRED: Longitude of the location maxNumberOfDays: 8, // OPTIONAL: Number of forecast days (default is 5) pastDays: 0, // OPTIONAL: Number of past days of data to include (default is 0) units: "imperial", // Set this to 'imperial' for Fahrenheit and miles per hour tempUnits: "imperial", // Make sure to match with 'imperial' windUnits: "imperial", type: "current", // OPTIONAL: Change to "current" if only current weather data is desired } }, (pay attention for the third line: classes: “weather_current”, ) THIS is your qualifier if you are about to diffrentiate between current weather and weather forecast image-wise. (“weather_current” is just an example! you can name it like you want every name is suitable and OK, only pay attention that all of these namings are strictly case sensitive, so Weather is NOT the same as weather" Your correct line for custom.css than is: .weather_current .wi-day-sunny { content: url("/css/icons/6fas/day.svg"); and the same dance than for your second instance with DIFFERENT classes-clause in config.js (e.g. a " classes: “weather_forecast”, " in the definition of the second weather instance ) results in a custom.css entry like this: .weather_forecast .wi-day-sunny { content: url("/css/icons/some_other_directory_with_smaller_icons/day.svg"); Because the “forecast instance” of the weather module is (in my case) organized as table I found it really useful to differentite these logos - big ones for current, smaller ones for the forecast: [image: 1744630855324-screenfloat-bildschirmfoto-von-sublime-text-am-14_04_2025-13_38_51-14_04_2025-13-38-51.jpg] If You do NOT like to differentiate the current and forecast instance you do NOT need the classes-phrase in config.js and your correct qualifier is the name of the module (so “weather” ) and your custom.css entry is like this: .weather .wi-day-sunny { content: url("/css/icons/6fas/day.svg"); And this than is valid for both instances. Keep in mind that there are a LOT more weather conditions than the two times 5 conditions you have defined in your current custom.css! my own definition for the current weather for your reference: .weather_current .wi-fog { content: url("/css/icons/current/wsymbol_0007_fog.png"); } .weather_current .wi-cloudy { content: url("/css/icons/current/wsymbol_0002_sunny_intervals.png"); } .weather_current .wi-cloudy-windy { content: url("/css/icons/current/wsymbol_0004_black_low_cloud.png"); } .weather_current .wi-rain { content: url("/css/icons/current/wsymbol_0018_cloudy_with_heavy_rain.png"); } .weather_current .wi-showers { content: url("/css/icons/current/wsymbol_0017_cloudy_with_light_rain.png"); } .weather_current .wi-thunderstorm { content: url("/css/icons/current/wsymbol_0024_thunderstorms.png"); } .weather_current .wi-snow { content: url("/css/icons/current/wsymbol_0019_cloudy_with_light_snow.png"); } .weather_current .wi-snowflake-cold { content: url("/css/icons/current/wsymbol_0020_cloudy_with_heavy_snow.png"); } .weather_current .wi-na { content: url("/css/icons/current/wsymbol_0999_unknown.png"); } .weather_current .wi-day-sunny { content: url("/css/icons/current/wsymbol_0001_sunny.png"); } .weather_current .wi-day-cloudy { content: url("/css/icons/current/wsymbol_0043_mostly_cloudy.png"); } .weather_current .wi-day-cloudy-gusts { content: url("/css/icons/current/wsymbol_0004_black_low_cloud.png"); } .weather_current .wi-day-cloudy-windy { content: url("/css/icons/current/wsymbol_0004_black_low_cloud.png"); } .weather_current .wi-cloudy-windy { content: url("/css/icons/current/wsymbol_0004_black_low_cloud.png"); } .weather_current .wi-day-fog { content: url("/css/icons/current/wsymbol_0007_fog.png"); } .weather_current .wi-day-hail { content: url("/css/icons/current/wsymbol_0015_heavy_hail_showers.png"); } .weather_current .wi-day-haze { content: url("/css/icons/current/wsymbol_0005_hazy_sun.png"); } .weather_current .wi-day-lightning { content: url("/css/icons/current/wsymbol_0016_thundery_showers.png"); } .weather_current .wi-day-rain { content: url("/css/icons/current/wsymbol_0085_extreme_rain_showers.png"); } .weather_current .wi-day-rain-mix { content: url("/css/icons/current/wsymbol_0009_light_rain_showers.png"); } .weather_current .wi-day-rain-wind { content: url("/css/icons/current/wsymbol_0010_heavy_rain_showers.png"); } .weather_current .wi-day-showers { content: url("/css/icons/current/wsymbol_0018_cloudy_with_heavy_rain.png"); } .weather_current .wi-day-sleet { content: url("/css/icons/current/wsymbol_0087_heavy_sleet_showers.png"); } .weather_current .wi-day-sleet-storm { content: url("/css/icons/current/wsymbol_0089_heavy_sleet.png"); } .weather_current .wi-day-snow { content: url("/css/icons/current/wsymbol_0011_light_snow_showers.png"); } .weather_current .wi-day-snow-thunderstorm { content: url("/css/icons/current/wsymbol_0057_thundery_snow_showers.png"); } .weather_current .wi-day-snow-wind { content: url("/css/icons/current/wsymbol_0053_blowing_snow.png"); } .weather_current .wi-day-sprinkle { content: url("/css/icons/current/wsymbol_0009_light_rain_showers.png"); } .weather_current .wi-day-storm-showers { content: url("/css/icons/current/wsymbol_0018_cloudy_with_heavy_rain.png"); } .weather_current .wi-day-sunny-overcast { content: url("/css/icons/current/wsymbol_0002_sunny_intervals.png"); } .weather_current .wi-day-thunderstorm { content: url("/css/icons/current/wsymbol_0024_thunderstorms.png"); } .weather_current .wi-day-windy { content: url("/css/icons/current/wsymbol_0060_windy.png"); } .weather_current .wi-solar-eclipse { content: url("/css/icons/current/wsymbol_0005_hazy_sun.png"); } .weather_current .wi-hot { content: url("/css/icons/current/wsymbol_0045_hot.png"); } .weather_current .wi-day-cloudy-high { content: url("/css/icons/current/wsymbol_0006_mist.png"); } .weather_current .wi-day-light-wind { content: url("/css/icons/current/wsymbol_0060_windy.png"); } .weather_current .wi-night-clear { content: url("/css/icons/current/wsymbol_0008_clear_sky_night.png"); } .weather_current .wi-night-alt-cloudy { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-alt-partly-cloudy { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-alt-cloudy-gusts { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-alt-cloudy-windy { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-alt-hail { content: url("/css/icons/current/wsymbol_0031_heavy_hail_showers_night.png"); } .weather_current .wi-night-alt-lightning { content: url("/css/icons/current/wsymbol_0032_thundery_showers_night.png"); } .weather_current .wi-night-alt-rain { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-alt-rain-mix { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-alt-rain-wind { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-alt-showers { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-alt-sleet { content: url("/css/icons/current/wsymbol_0029_sleet_showers_night.png"); } .weather_current .wi-night-alt-sleet-storm { content: url("/css/icons/current/wsymbol_0029_sleet_showers_night.png"); } .weather_current .wi-night-alt-snow { content: url("/css/icons/current/wsymbol_0028_heavy_snow_showers_night.png"); } .weather_current .wi-night-alt-snow-thunderstorm { content: url("/css/icons/current/wsymbol_0075_thundery_snow_showers_night.png"); } .weather_current .wi-night-alt-snow-wind { content: url("/css/icons/current/wsymbol_0071_blowing_snow_night.png"); } .weather_current .wi-night-alt-sprinkle { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-alt-storm-showers { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-alt-thunderstorm { content: url("/css/icons/current/wsymbol_0032_thundery_showers_night.png"); } .weather_current .wi-night-cloudy { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-cloudy-gusts { content: url("/css/icons/current/wsymbol_0044_mostly_cloudy_night.png"); } .weather_current .wi-night-cloudy-windy { content: url("/css/icons/current/wsymbol_0044_mostly_cloudy_night.png"); } .weather_current .wi-night-fog { content: url("/css/icons/current/wsymbol_0064_fog_night.png"); } .weather_current .wi-night-hail { content: url("/css/icons/current/wsymbol_0039_cloudy_with_heavy_hail_night.png"); } .weather_current .wi-night-lightning { content: url("/css/icons/current/wsymbol_0032_thundery_showers_night.png"); } .weather_current .wi-night-partly-cloudy { content: url("/css/icons/current/wsymbol_0041_partly_cloudy_night.png"); } .weather_current .wi-night-rain { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-rain-mix { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-rain-wind { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-showers { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-sleet { content: url("/css/icons/current/wsymbol_0029_sleet_showers_night.png"); } .weather_current .wi-night-sleet-storm { content: url("/css/icons/current/wsymbol_0029_sleet_showers_night.png"); } .weather_current .wi-night-snow { content: url("/css/icons/current/wsymbol_0027_light_snow_showers_night.png"); } .weather_current .wi-night-snow-thunderstorm { content: url("/css/icons/current/wsymbol_0075_thundery_snow_showers_night.png"); } .weather_current .wi-night-snow-wind { content: url("/css/icons/current/wsymbol_0028_heavy_snow_showers_night.png"); } .weather_current .wi-night-sprinkle { content: url("/css/icons/current/wsymbol_0025_light_rain_showers_night.png"); } .weather_current .wi-night-storm-showers { content: url("/css/icons/current/wsymbol_0026_heavy_rain_showers_night.png"); } .weather_current .wi-night-thunderstorm { content: url("/css/icons/current/wsymbol_0032_thundery_showers_night.png"); } HTH & good luck! Ralf
  • resizing image module

    Feb 12, 2024, 1:30 PM
    1
    0 Votes
    1 Posts
    241 Views
    hello Sam, I still need your help, I would like to size the display of the module that you recommended to me (MMM-SmartWebDisplay) for displaying the iss planisphere (https://isstracker.spaceflight.esa.int/ ) and I can’t do it when I change the dimensions in config.js it cuts parts of the image, I would like to reduce its dimension without losing parts of the image, I went to the console I’ve tried a lot of things (certainly not the right ones) and I can’t do it…thank you for your help [image: 1707744512702-9acd7874-9754-4112-9ea7-3ad44806468a-image.png]
  • 0 Votes
    3 Posts
    329 Views
    @botswana you might be able to use a customized css to set different font size based on screen resolution. on another system I use :root{ --scale-factor: 1; /* set default scaling in case we have partial window, debug or in vm terminal window */ } @media screen and (width:1920px) and (orientation: landscape) { :root{ --scale-factor: 1920/1920; }; } @media screen and (width:3840px) and (orientation: landscape) { :root{ --scale-factor: 3840/1920; }; } @media screen and (width:1080px) { :root{ --scale-factor: 1920/1920; }; } and then an example use h1 { font-size: calc( 120px * var(--scale-factor)); } the 120px could be a variable too… magicmirror sets these variables. maybe you can scale them by screen resolution and not have to mod everything… BUT many modules don’t use the predefined css styles :root { --color-text: #999; --color-text-dimmed: #666; --color-text-bright: #fff; --color-background: #000; --font-primary: "Roboto Condensed"; --font-secondary: "Roboto"; --font-size: 20px; --font-size-xsmall: 0.75rem; --font-size-small: 1rem; --font-size-medium: 1.5rem; --font-size-large: 3.25rem; --font-size-xlarge: 3.75rem; --gap-body-top: 60px; --gap-body-right: 60px; --gap-body-bottom: 60px; --gap-body-left: 60px; --gap-modules: 30px; } and maybe css transform:scale() https://caniuse.com/css-zoom
  • 0 Votes
    3 Posts
    338 Views
    @sdetweil On MMM-OnThisDayWikiApi I do not see this config option. It’s not MMM-OnThisDay. @angeliKITTYx Try this in your custom.css file: .MMM-OnThisDayWikiApi-single > div { font-size: 40px; }
  • 0 Votes
    4 Posts
    1k Views
    @MMRIZE Thank you, I REALLY appreciate you pointing that out to me. I have gone through and removed and reinstalled all modules manually and moved all of the changes I made to the custom.css and also stopped changing defaults in the .js files and moved those desired changes directly to the config.js file. Saved my bacon from having HUGE headaches in the future with broken configs.
  • 0 Votes
    8 Posts
    1k Views
    @kshamus Use event.class, not event.className. [image: 1704185135055-5ef76f61-d817-4ae0-9cac-83957e50b515-image.png]
  • Alternate Day/Date Format

    Dec 18, 2023, 1:18 AM
    0 Votes
    4 Posts
    514 Views
    @MMRIZE Thank you! That is exactly what I wanted.
  • MMM-Anylist columns

    Dec 7, 2023, 5:07 PM
    0 Votes
    3 Posts
    472 Views
    @sdetweil Thank you for your reply. I will do that Thank you
  • Changing Text Size and Color

    Dec 1, 2023, 3:57 AM
    0 Votes
    11 Posts
    1k Views
    @Grizz952 you should set some styles in the top right empty element window to see the effects
  • 0 Votes
    2 Posts
    351 Views
    @Grizz952 not built in, css can set background-color may take multiple clauses
  • Mmm calendar ext3

    Nov 2, 2023, 8:31 PM
    0 Votes
    11 Posts
    4k Views
    So I think I’m ok with the bottom calendar I just can’t figure out how to make the list to display for a month instead of all the way into January https://share.icloud.com/photos/078is2God3mgkrI_9spjrgJ5g
  • Background Animation

    Oct 21, 2023, 5:11 AM
    0 Votes
    5 Posts
    733 Views
    @sdetweil MMM-DynamicWeather
  • 0 Votes
    3 Posts
    597 Views
    @sdetweil said in Need some CSS help ... looking for the key names: @ruff-hi see this for how to use the developers window to discover this info https://forum.magicmirror.builders/topic/14862/help-with-a-couple-css-issues?_=1696694536512 also when there is no space between selector elements .bright.medium.light it ONLY applies to AN element that MUST contain all three classes at the same time Thanks - just what I was looking for.
  • 0 Votes
    7 Posts
    1k Views
    @jimmy_382837 @MMRIZE said in Adjust individual table column widths?: I haven’t examined the rendered HTML yet, but hardcoded style attributes in HTML code are prior than CSS. In case; You should modify source code of the module to change the result. (Or consider to use monkey-patch) The rendered result is not hard-coded, so you can adjust it with only CSS. This is an example. (Anyway, your config was not exactly matched with your previous screenshot…) .MMM-OpenWeatherMapForecast .module-content { width: inherit; /* I don't know why, but it was defined as 300px, might be an issue when you adjust the dimension. so have to reset */ } .MMM-OpenWeatherMapForecast, .MMM-OpenWeatherMapForecast .wrapper { width: 500px; /* give a custom width to a module */ } .MMM-OpenWeatherMapForecast .forecast-item .time { /* Some customizing for `time` cell for example.*/ width: 200px; background-color: rgb(127 127 127/ 50%); color: white; font-weight: bold; } [image: 1695627179700-702a0fac-1c29-4e4a-87a6-1fbcda563fa4-image-resized.png]
  • MMM-jast

    Jul 31, 2023, 10:53 PM
    0 Votes
    4 Posts
    675 Views
    @ankonaskiff17 I actually do just that, however, many modules, like this one don’t use the standard variables. So, I have to set each one manually, thusly: from my custom.css :root { --gap-body-top: 5px; --gap-body-right: 5px; --gap-body-bottom: 5px; --gap-body-left: 5px; --gap-modules: 15px; --color-text: #ddd; --color-text-dimmed: #666; --color-text-bright: #fff; --color-background: #000; --font-size: 21px; --font-size-xsmall: 0.75rem; --font-size-small: 1rem; --font-size-medium: 1.5rem; --font-size-large: 3.25rem; --font-size-xlarge: 3.75rem; } … Example module change: /* Flipclock - Set size */ .tick-flip, .tick-text-inline { font-size: var(--font-size-xlarge); }
  • 0 Votes
    8 Posts
    531 Views
    @wishmaster270 Great start, now to adjust to fit… 🤣 Edit: here I am adjusting it and trying to figure out why it wouldn’t move up to the bar, then I realized, you had it in Top Center. 😞😞😞😞😖😖😖😖
  • 0 Votes
    3 Posts
    364 Views
    @MMRIZE Thank you so much. I would have never come to that conclusion.
  • Current Weather Not Dimmed

    Jun 28, 2023, 2:52 AM
    0 Votes
    4 Posts
    542 Views
    @Elkanah Glad I could help. You can stack modules one after the other because in some respects something like top_left has no bottom. You can have modules below the bottom of the physical monitor. If you want modules in a particular order, arrange them that way in config.js If you are looking for a particular color or say colors that compliment each other you can do a search on “hex color codes” and you will get the hex nomenclature for every color imaginable. Some colors you can just say “black” or “white” and that will work but I’ve personally stuck with using the hex codes for the most part.
  • 0 Votes
    3 Posts
    535 Views
    @HotMacaroon Did you put both modules in same region, top_right? I have almost identical setup on an MM and if you put both in same region you should not run into that problem because they will position themselves properly as far as what you are trying to do. Is one in top_right and second in a different region? I have like 5 modules, all in top_left in my case. Also note these are in config.js NOT doing anything with CSS With CSS issues like @sdetweil has told me a 100 times, do that with developer tools and my experience is that there is a little trial & error in getting module CSS to look right because of different branded monitor/TV and different screen sizes. Two identical modules should drop with no need to tweak CSS on one and not the other. If you want a particular order, that is dependent on placement of module in the config.js file. Second picture all modules top_left [image: 1687723503367-top_left.jpg] [image: 1687724052342-alltopleft.jpg]
  • 0 Votes
    6 Posts
    2k Views
    @edd189 see https://forum.magicmirror.builders/topic/14862/help-with-a-couple-css-issues?_=1686341739097
  • calendar

    May 5, 2023, 12:24 PM
    0 Votes
    10 Posts
    1k Views
    @sdetweil - Thanks Sam. This will help when I work on cleaning up my display overall, as i do have multiple instances of both calendar and weather running!