Today I Learned - Rocky Kev

Tagged “codepen”

  1. TIL Shape-Outside to wrap text

    Shape-outside provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes.

  2. TIL Math.random() for design tricks

    Math.random() is awesome! However, if you dealing with sensitive applications and need a more secure method of randomization, I’d recommend WebCrypto.

  3. TIL How to implement two-way binding without a framework

    One of the reasons we use React or Vue is because of that sweet sweet two-way binding. It's the automatic syncing of data between the model (data) and the view (UI) in both directions. Any changes made to the data will automatically update the view, and any changes made to the view will automatically update the data.

  4. TIL event bubbling

    Event bubbling is when an event is in an element inside another element, and both elements have registered a handle to that event. That cause collisions.

  5. TIL ES6 Proxy

    Using JavaScript proxies you can wrap an existing object and intercept access to its attributes or methods, even if they don’t exist. You can also redefine fundamental operations for that object.

  6. TIL a nice checklist/strikethrough animation

    Animating checkboxes by using the `:checked` pseudo-class. If it's true, then include other things (like a before/after psuedo-class with other effects.)

  7. TIL about the element.closest() method

    Using a single event listener is super efficient, but has edge-cases. So using closest instead of match.

  8. TIL of the selectopt group

    You can create some cool dividers for your field options using the 'optgroup' element.

  9. TIL of this repo who made box shadow images

    That's right! You can make a single-pixel box shadow. You can also create multiple versions on the same line.

  10. TIL of a visual way to see CSS Cascade

    But then questions start arising: is !important higher priority than say, the Shadow DOM generated object?

  11. TIL Spreading a object into another object

    It's copying an object into another object, while also adding a new input.

  12. TIL super keyword in Javascript classes

    the super keyword is mainly used when we want to access a variable, method, or constructor in the base class from the derived class.

  13. TIL Deconstructing Objects

    Rather than create a big list of parameters in your function, pass the whole object and deconstruct it.

  14. TIL column-count

    Using the column-count property you can break an element's content into a specified number of columns.

  15. TIL One-by-one errors

    An off-by-one error is when you expect something to be of value N, but in reality it ends up being `N-1` or `N+1`.

  16. TIL HTML elements like Blockquote, datalist, details, meter, & progress

    HTML Elements I forget exist. Blockquote, datalist, details, meter, progress

  17. TIL column gap for newspaper look

    Use `column-count` and `column-gap` to give it that sweet newspaper look.

  18. TIL Optional Chaining

    The optional chaining `?.` is to see if the value exists

  19. TIL Details element that creates a accordion

    HTML Clickable details element!

  20. TIL gap in CSS

    replacing hacky margin-bottom with gap within CSS

  21. TIL writing-mode

    How to flip text so it's sideways, for international reasons.

  22. TIL Input List with datalist

    datalists and autocomplete features

  23. TIL about adding Styling to scrollbars

    You can decorate your scrollbars with CSS

  24. TIL how to use CSS to count things

    Using CSS Counter, counter-reset, and counter-increment.

  25. TIL Web Speech API

    Have multiple cursors

See all tags.