Pratham Profile picture
12 May, 11 tweets, 4 min read
Do you have images on your webpage / website? You probably have.

Here are 5 cool things related to images on webpage, that I think you are not familiar with

πŸ§΅πŸ‘‡πŸ»
1️⃣ Set image scaling algorithm of user agent

The `image-rendering` CSS property sets an image scaling algorithm
When you specifies dimensions of image other than its natural size then the image will be up/downscaled by user agent using the algorithm specified by image-rendering
For example: "crisp-edges"

The image must be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process.

Check the output image carefully
You can pass five other values in "image-rendering" property, there are

- auto
- smooth
- high-quality
- crisp-edges
- pixelated

πŸ”—developer.mozilla.org/en-US/docs/Web…
2️⃣ Tell how the browser should load the image

The "loading" attribute. Although its still in experiment but its a good thing to know.

It accepts two values, `eager` and `lazy`..... ⏬
eager: Loads the image immediately, regardless of whether or not the image is currently within the visible viewport.

lazy: Defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser.
3️⃣ Shadow in non background images

The box-shadow property creates a rectangular shadow behind an element's entire box, while the drop-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself.
4️⃣ Edit images using filter functions

The filter CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders.
Using filter funtions you can apply blur, adjust brightness, change contrast, hue roatate and other amazing stuff. Definitely try it out

πŸ”— codepen.io/prathkum/pen/G…
5️⃣ Blend mode

The mix-blend-mode CSS property sets how an element's content should blend with the content of the element's parent and the element's background.
You can use mix-blend-mode with your images as well. It accepts following values

- normal
- multiply
- screen
- overlay
- darrken
- lighten
- color-dodge
- color-burn
- hard-light
- soft-light
- difference
- exclusion
- hue
- saturation
- color
- luminosity

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Pratham

Pratham Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Prathkum

13 May
Creating CSS arts is a good way to master CSS. Here are some resources and tips that will take your CSS skills to the next level πŸš€

πŸ§΅πŸ‘‡πŸ» Image
Trust me, CSS art looks hard but they are not so tough they seem.

First things first, good color contrast is the number characterstic of a good website. Similarly color combinations makes your art good.
People with visual impairment preceive colors in different way. For example, here is how the dark red color is seen by people with monochromacy, dichromacy, and trichromacy

Hence picking up right color combinations is the most important part Image
Read 12 tweets
13 May
You must have used the border-radius property in CSS, but here is complete guide covering some of the hidden concept of it

πŸ§΅πŸ‘‡πŸ» Image
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a border-radius in order to make round edges of sharp cornered box
Well we know that every element is a box in webpage. Consider that box clipped using 8 clips πŸ‘‡πŸ»

We can adjust that clips in order to make distorted shapes Image
Read 8 tweets
12 May
5 amazing GitHub repositories for every self taught developer

A Thread 🧡
1️⃣ Computer Science

πŸŽ“ Path to a free self-taught education in Computer Science!

πŸ”— github.com/ossu/computer-… Image
2️⃣ Free Certifications

Curated list of free courses & certifications

πŸ”— github.com/cloudcommunity… Image
Read 6 tweets
11 May
Step by step guide to create this drop using CSS πŸ’§ 🧡
This drop looks tough to create but trust me its super easy and fun.

The heart of this art is border-radius and box-shadow properties. If sounds good, continue reading.... πŸ‘‡πŸ»
First thing first, we need to create a distorted shape so that it will looks like a drop.
We can create this shape using border-radius property only.

Here's a tool if you find some difficulty making this drop shape

πŸ”— 9elements.github.io/fancy-border-r…
Read 12 tweets
11 May
5 Beginner Friendly GitHub Repositories for Every Web Development Beginner

πŸ§΅πŸ‘‡πŸ»
1️⃣ HTML reference

- A free guide to all HTML5 elements and attributes.

πŸ”— github.com/jgthms/html-re…
🌐 htmlreference.io
2️⃣ HTML and CSS Code Guide

- Standards for developing consistent, flexible, and sustainable HTML and CSS.

πŸ”— github.com/mdo/code-guide
🌐 codeguide.co
Read 6 tweets
10 May
Algorithms and data structures are always the most complicated and confusing parts of programming

But DS and Algo are important and can reduce your efforts and help you solve the problem in a quick and efficient manner

Some great visualizers will solve all your doubts πŸ§΅πŸ‘‡πŸ»
1️⃣ cs.usfca.edu/~galles/visual…

- Learn DSA and visualize some complex programs. Definitely check it out.
2️⃣ clementmihailescu.github.io/Pathfinding-Vi…

- Dedicated to graph DS
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(