62 Matching Annotations
  1. Last 7 days
  2. Oct 2020
    1. This would be like an executable proposal. I understand that it's beyond the original intent of having canonical patterns on the Svelte site, but it would facilitate the community to express their own patterns. Now that we have markdown preprocessors , the documentation itself can be an app.
  3. Sep 2020
    1. Proving to myself that isValid does correctly change to true even when a key in $errors is an array.

    1. Child can't update things by reassignment if you do:

      <Child bind:things={things} />
      

      but can if you do;

      <Child bind:things={$object.things} />
      
    1. Demonstrates that even though object.value kind of works, it will be out of date. You need to subscribe to it to get current value: $object.value

  4. Aug 2020
    1. This illustrates the difference between two types of scrolling:

      • scrolling within the dialog
      • scrolling the document that includes the dialog
  5. May 2020
  6. Dec 2019
  7. Nov 2019
  8. Oct 2019
  9. Sep 2019
  10. Aug 2019
    1. Demonstrates how label text will wrap at a point that appears to narrow when shrunk (the label can't even be as wide as the input it is labeling!), and how to work around this problem by adding styles:

        '& label': {
          whiteSpace: 'nowrap'
        }
      

      Of course, you would only want to do this if you are going to only be showing the label in shrunk state (which I think is safe to say is the case for date picker inputs), since it would look bad to actually have text overflowing outside of the input box. But if it's in "shrink" state, then it's actually above the input, so as long as there isn't another input/label directly to the right, and/or as long as we adjust the width so the right side of the label mostly lines up with the right side of the input, then I think we should be safe.

      Reference

      The input label "shrink" state isn't always correct. The input label is supposed to shrink as soon as the input is displaying something. In some circumstances, we can't determine the "shrink" state (number input, datetime input, Stripe input). You might notice an overlap.

      To workaround the issue, you can force the "shrink" state of the label.

      You need to make sure that the input is larger than the label to display correctly.