mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.47k stars 25.71k forks source link

Changes required for new version of Susy #1734

Closed desilinguist closed 6 years ago

desilinguist commented 6 years ago

Description

Understanding how to work with the new version of Susy

Environment


I had figured out how to use Susy for a custom layout -- thanks to your help -- with a previous version of the theme back in early 2017. However, it seems that Susy has changed significantly and my old CSS setup doesn't work. For example, I had the following in _variables.scss under the Grid section:

$susy: (
  columns: 20,
  gutters: 1/4,
  math: fluid,
  output: float,
  gutter-position: after,
  container: $large,
  global-box-sizing: border-box,
);

However, if I change this to the new:

$susy: (
  'columns': susy-repeat(20),
  'gutters': 0.25,
  'spread': 'narrow',
  'container-spread': 'narrow',
);

in the same location, I get the following error:

Error: [su-valid-span] [string] `susy-repeat(20)` is not a valid number, length, or column-list for $span. on line 43

This confuses me as this is the syntax that the Susy3 documentation recommends.

mmistakes commented 6 years ago

Not sure. Have you reached out to the Susy maintainers as they would know better than me.

I haven't worked with Susy much recently. The new version from what I remember is less about mixins and "magic" and more about math.

Looking at the error message it's pretty clear... it's expecting a number and you're giving it a string.

desilinguist commented 6 years ago

But the documentation clearly states that a plain number is not what’s expected there.

I might just hardcode the measurements in the compiled CSS from the old version of the code in this version, if I can’t figure it out. On Thu, Jul 5, 2018 at 4:32 PM Michael Rose notifications@github.com wrote:

Not sure. Have you reached out to the Susy maintainers as they would know better than me.

I haven't worked with Susy much recently. The new version from what I remember is less about mixins and "magic" and more about math.

Looking at the error message it's pretty clear... it's expecting a number and you're giving it a string.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mmistakes/minimal-mistakes/issues/1734#issuecomment-402844071, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ3kK9HkgkhmxUAbP9bMTQ-7lGI76ROks5uDnfFgaJpZM4VEdCT .

mmistakes commented 6 years ago

Again, probably a better idea to file an issue on Susy's repo. The maintainers there would know more than me as they built it.

desilinguist commented 6 years ago

Will try that. Thanks! On Thu, Jul 5, 2018 at 5:32 PM Michael Rose notifications@github.com wrote:

Again, probably a better idea to file an issue on Susy's repo. The maintainers there would know more than me as they built it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mmistakes/minimal-mistakes/issues/1734#issuecomment-402858736, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ3kPJR809ARmsgknYhZij0Pq6M5u9bks5uDoXxgaJpZM4VEdCT .

desilinguist commented 6 years ago

I figured out that I can just use percentage() for my grid layout directly without needing to use Susy at all.