Outline property
⢠used to draw a line around the elements or outside of the borders of elements
⢠outline is not a part of elements dimensions
⢠there are four different categories for outline properties :
ā outline-style
ā” outline-width
⢠outline-color
⣠outline-offset
Let's discuss each one by one š
ā outline-style
⢠outline-style property declared the style of the outline
⢠outline-style values :
auto, none, dotted, dashed, solid, double, groove, hidden, inset, ridge etc.
Example š
ā” outline-width
⢠outline-width property declared the thickness of the outline
⢠outline-width values :
thin, medium, thick and a specific size etc.
Example š
⢠outline-color
⢠outline-color property declared the color of the outline
⢠outline-color values :
name, hex, rgba, hsl etc.
Example š
⣠outline-offset
⢠used to adds space between border or edge and outline of an elements
⢠space between an element and its outline is transparent
⢠negative value places the outline inside the element
Example š
Outline shorthand
⢠you can set only style(required), width and color
⢠unable to set outline-offset value
⢠syntax :
outline : width style color;
Example š
Difference between outline and border property š
⢠Outline elements are not part of dimensions. However, they are part of the border element.
⢠Outline has no effect on element Size. However, border affects the element Size.
⢠Outline cannot be rounded.
End thread š§µ
If this thread helpful for you then
1. Do Retweet the FIRST TWEET.
2. Follow me and turn on the notifications: @personalvipin
Thank you ā£ļø