Skip to content
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

Cleaner rem-values, fixed input zoom mobile #25

Closed
wants to merge 2 commits into from

Conversation

halfmage
Copy link

Small updates which enhances the CSS quality

  • removed body border-radius
  • changed main body font-size to 1rem
  • increased headline line-height to 1.3
  • fixed some uneven rem-values with 8pt-grid-system in mind
  • added font-size: 1rem; to text input fields to prevent zooming in mobile browsers

@vercel
Copy link

vercel bot commented May 20, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/x-z/new-css/4tedwc9fo
✅ Preview: https://new-css-git-fork-halfmage-master.x-z.now.sh

new.css Outdated Show resolved Hide resolved
new.css Outdated Show resolved Hide resolved
new.css Outdated
overflow-x: hidden;
word-break: break-word;
overflow-wrap: break-word;
background: var(--nc-bg-1);

/* Main body text */
color: var(--nc-tx-2);
font-size: 1.03rem;
font-size: 1rem; /* make fonts more crispy to 16px */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to define it, as it is automatically inherited from the parent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw that you wrote the following:

added font-size: 1rem; to text input fields to prevent zooming in mobile browsers

Maybe update the comment to explain how and why this works? Maybe a link to an article? That way we avoid that people like me will make a PR to remove it again ;)

new.css Outdated Show resolved Hide resolved
new.css Outdated
@@ -106,8 +106,9 @@ h1,
h2,
h3 {
color: var(--nc-tx-1);
padding-bottom: 2px;
margin-bottom: 8px;
padding-bottom: .25rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2px = .125rem

Also, there is a PR open for all of this, c.f. #13

I’d recommend only removing the 1.03rem in this PR and keep working in #13 for all the rest. Let’s try to keep PRs small and specific.

@halfmage WDYT?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caillou So focusing this PR on the zoom fix? Will update it then accordingly

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted and updates most of the stuff. Feel welcome to review my commit eb95f5c

davidmytton added a commit to consoledotdev/home that referenced this pull request Dec 22, 2020
@3x
Copy link
Member

3x commented Oct 13, 2021

All font sizes will be reworked in 2.0.0 update, most likely with a body size of 1rem versus 1.03rem. Still not sure why I used such a strange value...

Using font-size: 0.9em is a great idea for <code>-like elements, though, so I will definitely attempt to use this or something similar.

For iOS input shadows, I will leave #26 open for discussion. For now, I think it would be best to leave the default styling. For future reference, this shadow still exists in Safari on iOS 14.3.
image

@3x 3x closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants