Lets you create partial or full-page visuals with elements animating into and within the viewport, also known as scrollytelling, for dynamic visual impact.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3👍2
Recently, CSS has supported "logical" direction based properties for margin, padding, border, etc!
Previous to this, we were able to define properties based on physical directions like left, right, etc. This was a problem when different writing modes come into play, such as Arabic which is written from right to left, or traditional Chinese, Japanese, which are written from top to bottom.
👉 These new properties automatically adjust to the writing mode without the need for media queries.
"block" indicates main axis of writing mode (top to bottom for English)
"inline" indicates the cross axis of the writing mode (left to right for English)
You can combine this to create different properties for margin, padding, border, size and inset
👉 margin-block-end
👉 padding-inline
👉 border-inline-start
👉 inline-size
👉 block-size
✨ This also has the benefit that it provides shorthands like margin-inline which sets both left and right margin
Previous to this, we were able to define properties based on physical directions like left, right, etc. This was a problem when different writing modes come into play, such as Arabic which is written from right to left, or traditional Chinese, Japanese, which are written from top to bottom.
👉 These new properties automatically adjust to the writing mode without the need for media queries.
"block" indicates main axis of writing mode (top to bottom for English)
"inline" indicates the cross axis of the writing mode (left to right for English)
You can combine this to create different properties for margin, padding, border, size and inset
👉 margin-block-end
👉 padding-inline
👉 border-inline-start
👉 inline-size
👉 block-size
✨ This also has the benefit that it provides shorthands like margin-inline which sets both left and right margin
❤1
An idea I stole from MDN website 😛 how to setup a fade out for long text in article cards, etc
✨ The trick is to create a psuedo element that is placed in a manner to cover only the last line, and add a horizontal gradient, from full transparent to background color (white)
💡 You could also use CSS custom properties to avoid referring to 1.5rem multiple times
✨ The trick is to create a psuedo element that is placed in a manner to cover only the last line, and add a horizontal gradient, from full transparent to background color (white)
💡 You could also use CSS custom properties to avoid referring to 1.5rem multiple times
❤1👍1
Here is a simple implementation for a shimmering badge to grab the attention of your audience!
⚠️ Although not mentioned in this post, it is important to respect user's preferences regarding animations and enable this only when they are okay with animations. You can check for this using the prefers reduced motion media queries.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
The popover attribute is a global attribute, meaning it can be applied to any HTML element to convert it into a popover.
Please open Telegram to view this post
VIEW IN TELEGRAM
📖 Create an Face Recognition project from scratch with Python, OpenCV , Machine Learning Algorithms, Flask, Heroku Deploy
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3
Ensures elements like buttons or text containers adapt their width dynamically, maintaining a consistent layout across different devices and languages.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
📖 Understand React Native with Hooks, Context, and React Navigation.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2❤1
Media is too big
VIEW IN TELEGRAM
DOM manipulation is tough. There are lots of methods and techniques you need to master and it is not obvious which methods are best for each scenario. In this video I cover the 14 most important DOM manipulation methods that you need to know.
🧠 Concepts Covered:
- Creating elements
- Adding elements
- Modifying data attributes
- Removing elements
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3
Please open Telegram to view this post
VIEW IN TELEGRAM