typed.css icon indicating copy to clipboard operation
typed.css copied to clipboard

Fixed issue #6

Open konung opened this issue 2 years ago • 1 comments

See issue #6

Thank you for the awesome library/mixin!

konung avatar Oct 22 '22 00:10 konung

@konung Thanks for opening this PR. To fix that calc() bug we discussed, below is a workaround that @nex3 came up with.

(Thanks again for the help with this, Natalie! 🙏🏼)

Nick, could you please add this to the top of the file, leaving a space between this block and the current first line for cleanliness? (exclude the /* current code */ comment from the below block in your impl)

$__supports-first-class-calc: calc(1) == 1;

@function __div($number1, $number2) {
  @if $__supports-first-class-calc {
    @return calc($number1 / $number2);
  } @else {
    @return $number1 / $number2;
  }
}

/* current code */

Then, in the change you made, swap calc(1 / $parameter) for __div(1, $parameter).

Once that's done, I'll go ahead and merge. I've already tested the merge locally, and that works for existing versions. Please confirm that works for you as well. 👏🏼

brandonmcconnell avatar Oct 24 '22 04:10 brandonmcconnell

@konung Just wanted to follow up here. If you can make that change I mentioned, I'll go ahead and merge this into my repo.

brandonmcconnell avatar Dec 10 '22 18:12 brandonmcconnell

Duplicates #9

brandonmcconnell avatar Dec 12 '22 21:12 brandonmcconnell