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!

    23 Topics
    296 Posts
    K

    @sdetweil Thank you! I will start playing with and learning CSS. Thank you for the quick demo!

  • You have questions regarding CSS?

    111 Topics
    653 Posts
    K

    Hi everyone, i have no clue what im doing…i dont know how to code or really how the rpi/magicmirror works but here i am. So basically im using the default weather module (as it works) and i just wanna replace those icons with custom icons. I also wanna note that im using openmeteo and not the default openweathermap or wtv its called because it didn’t work.

    here is my config.js file (the weather part):

    module: "weather", position: "top_right", // Adjust position as needed locationName: "xxxx", displayLocation: "xxxx", header: "xxxx", config: { locationName: "xxxx", displayLocation: "xxxx", header: "xxxx", 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 iconTable: { '0': 'wi-day-sunny', // Clear sky '1': 'wi-day-cloudy', // Mainly clear '2': 'wi-cloudy', // Partly cloudy '3': 'wi-cloudy', // Overcast '45': 'wi-fog', // Fog '48': 'wi-fog', // Depositing rime fog '51': 'wi-showers', // Drizzle: Light intensity '53': 'wi-showers', // Drizzle: Moderate intensity '55': 'wi-showers', // Drizzle: Dense intensity '56': 'wi-sleet', // Freezing drizzle: Light intensity '57': 'wi-sleet', // Freezing drizzle: Dense intensity '61': 'wi-rain', // Rain: Slight '63': 'wi-rain', // Rain: Moderate '65': 'wi-rain', // Rain: Heavy intensity '66': 'wi-sleet', // Freezing rain: Light intensity '67': 'wi-sleet', // Freezing rain: Heavy intensity '71': 'wi-snow', // Snow fall: Slight '73': 'wi-snow', // Snow fall: Moderate '75': 'wi-snow', // Snow fall: Heavy intensity '77': 'wi-snow', // Snow grains '80': 'wi-showers', // Rain showers: Slight '81': 'wi-rain', // Rain showers: Moderate '82': 'wi-rain', // Rain showers: Violent '85': 'wi-snow', // Snow showers: Slight '86': 'wi-snow', // Snow showers: Heavy '95': 'wi-thunderstorm', // Thunderstorm: Slight or moderate '96': 'wi-thunderstorm', // Thunderstorm with slight hail '99': 'wi-thunderstorm' // Thunderstorm with heavy hail } } }, { module: "weather", position: "top_right", // Adjust position as needed locationName: "xxxx", displayLocation: "xxxx", header: "xxxx", config: { locationName: "xxxx", displayLocation: "xxxx", header: "xxxx", 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: "forecast", // OPTIONAL: Change to "current" if only current weather data is desired iconTable: { '0': 'wi-day-sunny', // Clear sky '1': 'wi-day-cloudy', // Mainly clear '2': 'wi-cloudy', // Partly cloudy '3': 'wi-cloudy', // Overcast '45': 'wi-fog', // Fog '48': 'wi-fog', // Depositing rime fog '51': 'wi-showers', // Drizzle: Light intensity '53': 'wi-showers', // Drizzle: Moderate intensity '55': 'wi-showers', // Drizzle: Dense intensity '56': 'wi-sleet', // Freezing drizzle: Light intensity '57': 'wi-sleet', // Freezing drizzle: Dense intensity '61': 'wi-rain', // Rain: Slight '63': 'wi-rain', // Rain: Moderate '65': 'wi-rain', // Rain: Heavy intensity '66': 'wi-sleet', // Freezing rain: Light intensity '67': 'wi-sleet', // Freezing rain: Heavy intensity '71': 'wi-snow', // Snow fall: Slight '73': 'wi-snow', // Snow fall: Moderate '75': 'wi-snow', // Snow fall: Heavy intensity '77': 'wi-snow', // Snow grains '80': 'wi-showers', // Rain showers: Slight '81': 'wi-rain', // Rain showers: Moderate '82': 'wi-rain', // Rain showers: Violent '85': 'wi-snow', // Snow showers: Slight '86': 'wi-snow', // Snow showers: Heavy '95': 'wi-thunderstorm', // Thunderstorm: Slight or moderate '96': 'wi-thunderstorm', // Thunderstorm with slight hail '99': 'wi-thunderstorm' // Thunderstorm with heavy hail } } },

    sorry if that looks bad…also note that i got that table from this reddit post (the second image in the post): https://www.reddit.com/r/filemaker/comments/14yrpb9/openmeteo_weather_api_integration_free_icons_free/

    here is my custom.css file:

    /*! * Weather Icons 2.0.8 * Updated September 19, 2015 * Weather themed icons for Bootstrap * Author - Erik Flowers - erik@helloerik.com * Email: erik@helloerik.com * Twitter: http://twitter.com/Erik_UX * ------------------------------------------------------------------------------ * Maintained at http://erikflowers.github.io/weather-icons * * License * ------------------------------------------------------------------------------ * - Font licensed under SIL OFL 1.1 - * http://scripts.sil.org/OFL * - CSS, SCSS and LESS are licensed under MIT License - * http://opensource.org/licenses/mit-license.html * - Documentation licensed under CC BY 3.0 - * http://creativecommons.org/licenses/by/3.0/ * - Inspired by and works great as a companion with Font Awesome * "Font Awesome by Dave Gandy - http://fontawesome.io" */ @font-face { font-family: 'weathericons'; src: url('../font/weathericons-regular-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } .wi { display: inline-block; font-family: 'weathericons'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wi-fw { text-align: center; width: 1.4em; } .wi-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .wi-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .wi-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .wi-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .wi-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } /* Current Weather Icons */ .currentweather .wi-day-sunny { content: url("/home/kool/MagicMirror/css/icons/6fa/day.svg") !important; } .currentweather .wi-night-clear { content: url("/home/kool/MagicMirror/css/icons/6fa/night.svg") !important; } .currentweather .wi-cloudy { content: url("/home/kool/MagicMirror/css/icons/6fa/cloudy.svg") !important; } .currentweather .wi-fog { content: url("/home/kool/MagicMirror/css/icons/6fa/fog.svg") !important; } .currentweather .wi-rain { content: url("/home/kool/MagicMirror/css/icons/6fa/rain.svg") !important; } /* Add more current weather icons as needed */ /* Weather Forecast Icons */ } .weatherforecast .wi-day-sunny { content: url("/home/kool/MagicMirror/css/icons/6fas/day.svg") !important; } .weatherforecast .wi-night-clear { content: url("/home/kool/MagicMirror/css/icons/6fa/night.svg") !important; } .weatherforecast .wi-cloudy { content: url("/home/kool/MagicMirror/css/icons/6fa/cloudy.svg") !important; } .weatherforecast .wi-fog { content: url("/home/kool/MagicMirror/css/icons/6fa/fog.svg") !important; } .weatherforecast .wi-rain { content: url("/home/kool/MagicMirror/css/icons/6fa/rain.svg") !important; } /* Hide Humidity */ .humidity { display: none !important; }

    I got the icons from this other weather module (but that module didn’t work as openweathermap is like glitchy or something)… weather module link: https://github.com/MarcLandis/MMM-OpenWeatherMapForecast
    when i try to load the magic mirror, i see the numbers - like whats the weather and stuff, but i keep getting the default weather icons.
    basically my idea was to override the default weather icons with some custom weather icons that i found but its not exactly working
    any help would be greatly appreciated plz help me :(

  • CSS 101 - Getting started with CSS and understanding how CSS works

    Pinned
    15
    11 Votes
    15 Posts
    27k Views
    C

    Great infos and good tips. Thank you 🙏

  • 0 Votes
    10 Posts
    115 Views
    S

    @Socrates sometimes the blur is top and bottom
    Screenshot at 2024-12-18 18-47-45.jpg

  • MMM-CalendarExt3 How can I increase my cell height?

    3
    0 Votes
    3 Posts
    272 Views
    R

    @sdetweil said in MMM-CalendarExt3 How can I increase my cell height?:

    @Ragged4310 you didn’t change event-height or total height

    You could use the css media screen value to get the screen size to adjust

    Thanks for the advice. I solved my problem when I tweaked my display by adding more event lines and a legend so I didn’t end up needing to mess with the CSS.

  • Large Numbers

    11
    0 Votes
    11 Posts
    526 Views
    W

    @NotMyCircus
    Made some changes to custom.css file working towards that style…

    .CX3 .cw { display: none !important; } .CX3.bodice { background-image: linear-gradient(to top right, #22c1c3, #176561, #131813); } .CX3 .cell { background: transparent; border: transparent; display: flex; /* Use flexbox for layout */ flex-direction: column; /* Stacks elements vertically */ align-items: center; /* Centers items horizontally */ justify-content: flex-start; /* Ensures content starts at the top */ padding: 0.5em; /* Adds space inside the cell */ text-align: center; /* Centers text content */ overflow: hidden; /* Ensures no content overlaps outside the cell */ } .CX3 .cell.today { border: transparent; } .CX3 .cell.today .cellDate { font-size: 4em; /* Adjust the size of the date text */ line-height: 1; /* Avoids extra spacing */ text-align: center; /* Centers the text within the circle */ width: 1.5em; /* Set equal width and height */ height: 1.5em; /* Matches width to create a circle */ display: flex; /* Use flexbox to align text */ justify-content: center; /* Centers text horizontally */ align-items: center; /* Centers text vertically */ background-color: red; /* Background color for the circle */ color: #ffffff; /* Text color */ border: 2px solid #e76f51; /* Optional border for the circle */ border-radius: 50%; /* Makes the box a circle */ margin: auto; /* Ensures proper alignment within the cell */ } .CX3 .cellDate { font-size: 4em; /* Adjust font size for the date */ line-height: 1; /* Avoids extra spacing */ text-align: center; margin-bottom: 1em; /* Adds space below the date */ width: auto; /* Removes fixed width */ height: auto; /* Removes fixed height */ } .CX3 .cellHeader { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; } .CX3 .cellHeader .cellDate span.dateParts.month.seq_0 { display: none; } /* Ensures the eventContainer is placed below the date numbers */ .CX3 .eventContainer { margin-top: 1em; /* Adds space above the eventContainer */ top: 74px; width: 100%; /* Ensures it spans the cell width */ text-align: left; /* Aligns event text to the left, adjust if needed */ word-wrap: break-word; /* Prevents event text from overflowing */ //display: block; /* Ensures it behaves as a block element */ position: relative; /* Ensures it respects the flow of the document */ }

    b345ed7c-bd38-42b4-b0a8-cf1070477bee-image.png

  • custom.css ......body???

    42
    0 Votes
    42 Posts
    910 Views
    R

    @piki

    .clock .time {
    font-size: 150px;
    color: yellow;
    }
    .clock .date {
    font-size: 40px;
    color: red;

  • custom

    2
    0 Votes
    2 Posts
    51 Views
    S

    @piki what??? was this a continued post?

    show your custom.css entry

  • Changing table cell in calendar module using custom.css

    11
    0 Votes
    11 Posts
    234 Views
    S

    @evroom you cannot add or change a classname string

    class=“foo”
    to add “bar” class too
    class =“foo bar”

    but you CAN change the behavior of the other classes to match what adding another class could do

    OR , you could add the styles to the ELEMENTS you WOULD have added the bar class to…

    just_have_to_select_them {
    styles
    }

    as an example of a complex selector in my MMM-Config, I want to hide an element on a library generated element

    .possibly-hidden-tab div:nth-child(2) > div > div >div >ul >li:only-child >a[rel*="Item%201"] { display: none; }

    this is
    elements with the possibly-hidden-tab class
    its second child div
    its immed child div
    its immed child div
    its immed child div
    its immed child ul
    its immed only child li
    with an a element containing a rel attribute value of “Item 1”
    (spaces have to be encoded, but for clarity I left it out here)

  • MMM-CalendarExt3 increase .header height

    Solved
    2
    0 Votes
    2 Posts
    99 Views
    S

    @shicks I found it! Thanks to other posts on here.

    The css for the height of the header fixes it:
    .CX3 {
    –cellheaderheight: 50px;
    }

    I still have to tighten things up a bit but at least I go this one that was elusive to me.

    7652c89b-812d-4b71-8bd9-ab682f23509e-image.png

  • CSS text-overflow and hover

    2
    0 Votes
    2 Posts
    109 Views
    S

    @bluepgt possibly… MagicMirror UI is all browser… we don’t control any of it.

    that said, we don’t generally have mouse active (on wall output view)
    but you could extend and try

    use the developers window elements tab
    see the second link in my signature below

  • How can elements in the default weather module be moved

    12
    0 Votes
    12 Posts
    358 Views
    S

    @DDE12 make the icon 1.5em
    then you need to size the div the spans are in

  • MMM-CoupleDays

    3
    +0
    0 Votes
    3 Posts
    167 Views
    plainbrokeP

    @sdetweil
    Wow, Thanks, I finally figured out what you have been trying to tell me.
    Found the wording to make it big enough to read now…
    \Thanks for you help Sam…

  • MMM-CalendarExt3 CSS configuration for Month Size

    4
    0 Votes
    4 Posts
    223 Views
    S

    @sharkbait awesome. You can use it on every module

  • Delete Fade In/Fade Out animation in the NewsFeed Module

    11
    0 Votes
    11 Posts
    218 Views
    V

    @sdetweil

    Ok
    Now I understand.
    The 2 variables must be set in the configuration of each news.
    Now it is corrected and works.
    Thank you very much.

  • Calendar

    5
    0 Votes
    5 Posts
    347 Views
    plainbrokeP

    @sdetweil

    Thank you for the help Sam.
    You are the man…

  • Help restyling MMM-ValuesByNotification

    18
    0 Votes
    18 Posts
    572 Views
    S

    @BKeyport awesome

  • Dynamic Font Colors

    8
    0 Votes
    8 Posts
    264 Views
    I

    @MMRIZE @sdetweil thanks for the help. I havent had a chance to play around with it on my set up but looks to be going in the right direction!

  • Custom CSS for weather when I have 2

    2
    0 Votes
    2 Posts
    181 Views
    S

    @pritikin71 classes goes after module:

    right?

    { module : " calendar", classes:"foo", config: { . . . } }

    css

    .foo ..... { (NOT .weather) ... }

    you can ALSO use the ID value assigned to the module
    the selector for id is

    #id ... { ... }

    I use this cheatsheet to help me remember
    https://www.w3schools.com/cssref/css_selectors.php

    everthing before the {
    is called the selector clause… because is ‘selects’ the elements of the page doc, that the stuff INSIDE the {} will be applied to

    . = class # = id : is the prefix for special elements [ x ] means element with an attribute of x <div x="foo"/> nothing = tag name (table, ul, li, p, ....div)
  • change size font any module

    3
    0 Votes
    3 Posts
    255 Views
    bugsounetB

    Hi, maybe the best way is using zoom functionality because,any logos will not follow the font size

    in custom css try this:

    #CARBURANTS { zoom: 120%; }
  • Reducing font size causes letters to overlap.

    5
    0 Votes
    5 Posts
    246 Views
    S

    @atltiger81 no, don’t change the code

    just add a classes property to the compliments module config

    { module:"compliments", position:"....", config: { compliments: { ... ... }, classes:".......... whatever" } }

    from the doc
    1000026352.jpg

  • ,Change Fonts

    10
    0 Votes
    10 Posts
    7k Views
    D

    @TazDev Thanks! This is exactly what I needed to change my MagicMirror so it displays Aurabesh for some of the data.