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

set --vru on the .font-size-mod() element itself #12

Open
chharvey opened this issue Jul 27, 2017 · 1 comment
Open

set --vru on the .font-size-mod() element itself #12

chharvey opened this issue Jul 27, 2017 · 1 comment

Comments

@chharvey
Copy link
Owner

chharvey commented Jul 27, 2017

The mixin .font-size-mod() sets the --vru custom property on all its children, but not itself. It inherits the VRU from its parent, which means its margin-bottom (and any other property using var(--vru) such as grid-row-gap) will be in terms of its parent VRU.

Change the mixin so that it sets --vru on itself:

.font-size-mod(@ratio) {
  ...
  --vru: calc(@ratio ~' * var(--line-height) * 1rem'); // @ratio * parent vru
}
@chharvey
Copy link
Owner Author

now reconsidering: this will affect the module's VRU itself such as its own margin-bottom

@chharvey chharvey removed this from the v6.1.0 milestone Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant