-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Remove $base-font-size
variable
#272
Conversation
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.
👍 to removing $base-font-size
. I always found it awkward and unneeded for a couple reasons:
- The
base-
nomenclature falls down in a larger system. html
is the root document, so why not set a “base” font size there and all other relative units can calculate off of it. This removes the need for a variable.
core/_typography.scss
Outdated
@@ -1,7 +1,7 @@ | |||
body { |
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.
While we are changing core font sizing, I think it’d be great to swap body
here for html
. This would allow any usage of rem
units down the road to pick up on any default font size changes.
core/_typography.scss
Outdated
@@ -1,7 +1,7 @@ | |||
body { | |||
color: $base-font-color; | |||
font-family: $base-font-family; | |||
font-size: $base-font-size; | |||
font-size: modular-scale(0); |
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.
Have we thought about setting this as 100%
? Percentage units here ensure that font sizing is scaled proportionally and evenly when a user adjusts the default text size within browser/OS settings, improving accessibility.
More info here: http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/
core/_forms.scss
Outdated
@@ -22,7 +22,7 @@ select, | |||
textarea { | |||
display: block; | |||
font-family: $base-font-family; | |||
font-size: $base-font-size; | |||
font-size: modular-scale(0); |
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.
This goes against convention, but I’d suggest we set this to 16px
, as it prevents a zooming bug on iOS. When set anything but 16px
, iOS zooms the page when an input is focused.
@whmii Can we move this PR forward? |
@whmii Ping! |
e0a94e4
to
e845781
Compare
@tysongach Updated based on comments |
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.
Looks good. Mind updating the change log?
e845781
to
27a46d2
Compare
@@ -18,7 +18,13 @@ project adheres to [Semantic Versioning](http://semver.org). | |||
- Base typography is now styled off of the `html` element, instead of the `body` | |||
element. ([#279]) | |||
|
|||
### Removed | |||
|
|||
- Removed `$base-font-size` in favor of more specific implimentations specific |
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.
implimentations → implementations
@@ -18,7 +18,13 @@ project adheres to [Semantic Versioning](http://semver.org). | |||
- Base typography is now styled off of the `html` element, instead of the `body` | |||
element. ([#279]) | |||
|
|||
### Removed | |||
|
|||
- Removed `$base-font-size` in favor of more specific implimentations specific |
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.
Cut the second specific
?
$base-font-size
feels a bit legacy to me since we are already usingmodular-scale()
, especially, the defined behavior is to output 1em (aka modular-scale-base).no visual change.