You must have used the border-radius property in CSS, but here is complete guide covering some of the hidden concept of it
π§΅ππ»
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
We can shift the position of eight clips and make some amazing random shapes.
The syntax is pretty easy, we can consider it as border-radius accepts 8 value for each clip, four value before slash (/) and four values after slash
Let's decode what each value means.
border-radius: 2px 4px 6px 8px / 10px 12px 20px 16px;
The first 2px simply means the distance of first clip from the top left corner and second value that is 4px means the distance of second clip from top right corner
When we write simple border-radius: 10px, it means all clips and equal distance from their initial points.
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; is same as border-radius: 50%
There is another easy way to remember the numbering of clips.
Top left 1
Top left 2
Top right 1
and so on...
Great! This is pretty much it for this thread. I hope you like it, if so, share this thread with your connections β€οΈ
Peace out π
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
Neumorphism is a trendy UI style nowadays. It is worth noting that neumorphism is not a replacement for flat design style, but an addition to app user interface design
Let's create a neumorphic form using few simple CSS steps
A thread π§΅
Neumorphic design is another UI design that has become popular these days.
Making neumorphic effect is actually pretty easy using only just CSS box-shadow
We'll be creating a neumorphic form in steps π½
STEP 1:
Place a light source(virtually) on screen. In this example I'm considering that my light source is placed top left corner of the screen
Everything on a website is a box. Therefore it is quite important to understand the box model concept in web development but it is confusing. Let's see some hidden facts about it in this thread
𧡠ππ»
When laying out a document, the browser's rendering engine represents each element as a rectangular box. You can visualize it by adding some solid in any element.
You can manipulate this box using the basic standards of CSS like color, border, background etc.
{ 02 / 17 }
Every box comprised of four parts
- content dimensions
- padding
- border
- margin
Although outline is not considered as the part of box model but we can talk little bit about it later on this thread.
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 π
π§΅ππ»
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
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.