Read the statement by Michael Teeuw here.
Resize custom or main modules
-
I know it!
Tried the same yesterday, and found a “bug” :)
You inserted your code inside the body { } section (like i did), wich is not working…
Just erase the body { } from the custom.css and paste the code in the empty file :)@MichMich, @KirAsh4: Is the body { } section a leftover from an older version maybe?
-
@zombi27 Nope, it’s an example to show where your CSS must go … ;)
I think there is a limit in how far we should spoon feed the users. ;)
-
okay :D The body section confused me too, so maybe it’s better to keep it empty? just a comment “place css code here?”
i could send a pull request? would be my first one :D or how could this be done? totally new to github…
-
ahh… See I was thinking it was a bug as well, I don’t know much about CSS or programming in general, but I’m glad you clarified that part @zombi27 . I had just gone directly to the main.css to modify the values since I couldn’t get the dashboard to reflect the custom.css values :). I’ll give it a try once I get home.
Thanks for the help and direction @KirAsh4 @MichMich @zombi27
Boki
-
Yep, that
body { ... }
rule is just there as an example. A quick search on'css example'
on Google would’ve shown you oodles of examples on syntax, almost to a fault. -
The problem if we change that file now (with an explanation text), it would overwrite files from users who modified it if they update …
-
@MichMich: ah, okay ^^ that wouldn’t be nice :D
-
@KirAsh4 uses cast shadow on bokifide…
… It’s super effective! :sweat:haha :D . I guess it just wasn’t as common sense to me, in my mind I had no reason to doubt whether or not a portion of the sample given to me by the magic mirror gods had to be there. :pensive: But you’re 100% right, I should have googled it, because you never know :) that portion could serve another purpose like @MichMich pointed out.
Lesson learned. Won’t happen again.
Thank you for your time fellows :bow_tone1:
Boki -
@KirAsh4 said in Resize custom or main modules:
Those CSS rules will affect all the modules, as all modules use them. If you only want to affect one single module, then you need to change the rules to point to the specific module. Let’s say you want the text smaller on the newsfeed, then you need to look at the actual HTML being created to get the class named being used:
<div id="module_8_newsfeed" class="module newsfeed newsfeed" style="transition: opacity 1.25s; opacity: 0; position: static;"> <div class="module-content"> <div> <div class="light small dimmed">ESPN - Top News, 4 minutes ago:</div> <div class="bright medium light">Georgia RBs Chubb, Michel still iffy for opener</div> </div> </div> </div>
Now you can see that the rules that affect the text,
'light small dimmed'
and 'bright medium light'
are all contained within the main class'module newsfeed newsfeed'
(on the very first line.)Using a bit of CSS juju, doing this:
.newsfeed .medium { font-size: 18px; }
… will make the text of the article headline smaller than the default
'30px'
. And this will only affect the newsfeed module. All the others also using the'medium'
rule will be unaffected.Where can I find the HTML file that is being created?
The only HTML file I see is at ~/MagicMirror/index.html
This file looks nothing like the example shown here.
-
@daveyg_71 put these in the css directory - custom.css file…
I would never suggest changing ANY core css file because it could have well not good results then you’ll be trying to fix several problems.
That’s what the custom.css file is for ;)
Not sure if you know but modules are numbered like the example above:
module_8_newsfeedThere is another thread here that explains all that :)
Here’s one and it even has an example custom.css file attached:
check here!