-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CSS Properties #2515
Add CSS Properties #2515
Conversation
I see your branches are not 100% aligned to the originals.... I would recommend creating a new branch (not fork) from MichMich originals develop branch and then: either cherrypick your commits from the contribute branch OR rebase the contribute branch unto the newly crated branch. |
How do you do this? I cloned the repository and created a new branch called |
Are you using a graphical GIT client like Sourctree or Gitkraken? |
I'm using VSCode. Would you recommend one of the others? |
Thanks! I'm not sure if I'm a fan of the new way of dimming. This means if someone does a background image, it will be see trough. It's also a bit heavier for electron to render, so it might slow things down. For me, it seems it's easier to explain what a text color is, in stead of explaining why opacity changes the brightness. I also think we shouldn't over-simplify things. Changing the colors of text is a great way to get comfortable with hex colors. |
css/main.css
Outdated
:root { | ||
--color-text: #fff; | ||
--color-background: black; | ||
--base: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base for what? should be font-size-nromal or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put “base” because it sets the “font-size” property on the html. So that means anything that uses the “rem” unit changes based on what “base” is.
So if one wanted to set the margins in a way that scales, they could set it to “2rem”, and it would increase if “base” were to increase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep it simple on the first PR and just make it font-size-normal and only use it for that. All other stuff we can add later :-)
I agree, configuration should kept simple. |
Okay, good points on the opacity stuff. I’ll try out git kraken sometime this week |
How are things looking now? I tried out GitKraken (which helped a ton, thanks @rejas ), but I might have messed some stuff up while I was doing some cleaning up of the branches. Lmk |
Branch looks cleaner. The README.md is still changed as well as the lock files. Could you revert those? |
As well as the changes to package.json. |
I was looking at this PR, and although it looks super nice, I think it might be a good idea to change the custom.css.sample to use the defaults. This way if someone chooses to use the sample, they don't have to jump trough hoops to get it to match their initial install. |
I could move that PR forward if @earlman doesnt have the time for it |
@rejas Yes, please. I’d appreciate it |
On the other hand, it could also be a good idea to show people what’s possible with the css. Since they’re already sort of jumping through hoops by trying out the custom.css.sample. If I was to through the effort of trying out a new style sheet (as a newbie), I’d like the positive feedback of having some interesting visual changes |
There might be better places for that to show, maybe the wiki or the official MM documentation site. And in the custom css there is only a link to that documentation then. |
Done, thx for your PR. Lets hope mine doesnt introduce any new bugs :-D |
README.md
,package-lock.json
,yarn-lock.json
,.gitignore
, andmain-grid.css
. Those are unrelated to the changes I'd like to make in this pull request. I tried to create another fork to put only the relevant changes, but Github said I already had a fork. Let me know if there's a better way to do this..Summary
Renaming
custom.css.config
tocustom.css
makes the MagicMirror look like:Added CSS Properties
color-text
color-background
base
font-primary
font-secondary
Additional Info
.dimmed
,.normal
, and.bright
are the same color, now based onopacity
rem
instead ofpx
var(--base)
--base
.xsmall
to.xlarge
scales up in increments of 1.5, with.small
being the equivalent to--base