oddbird / accoutrement-scale

Size and scale helpers for typography and layout
MIT License
9 stars 1 forks source link

Error in calculations #5

Closed mg901 closed 7 years ago

mg901 commented 7 years ago
$ratios: (
  'my-ratio': 1.25,
);

$sizes: (
  'root': 16px ,
  'line-height': 1.6,
  'rhythm': 'root' ('fifth': 1, 'convert-units': 'rem'),

  'h1': 'root' ('my-ratio': 6, 'convert-units': 'rem'),
  'h2': 'root' ('my-ratio': 5, 'convert-units': 'rem'),
  'h3': 'root' ('my-ratio': 4, 'convert-units': 'rem'),
  'h4': 'root' ('my-ratio': 3, 'convert-units': 'rem'),
  'h5': 'root' ('my-ratio': 2, 'convert-units': 'rem'),
  'h6': 'root' ('my-ratio': 1, 'convert-units': 'rem'),

  'page': '8in',
);

.section {
  max-width: size('page');
}

Error: 8in is not a valid length for CSS. on line 45 of node_modules/accoutrement-scale/sass/_size.scss

@error '#{$size} is not a valid length for CSS.';

----^

mirisuzanne commented 7 years ago

You should unquote actual length values. The quotes turn it into a string.

mg901 commented 7 years ago

So this is a bug about the documentation. Style guide section. Thank you very much for your answer.

mirisuzanne commented 7 years ago

oops! Want to submit a PR for that?

mg901 commented 7 years ago

What is PR?)))

mg901 commented 7 years ago

If you offer to help you correct mistakes in the documentation, then I will be only glad.

mirisuzanne commented 7 years ago

A Pull Request? Correct the documentation on your fork, and then submit them for merging into the main branch?