css - outline: none VS outline: 0 -
i reading this question on disabling dashed borders around <a> links. some answers used outline: none, while some used outline: 0
is there difference between using outline: none , outline: 0?
according mdn:
the css
outlineproperty shorthand property setting 1 or more of individual outline propertiesoutline-style,outline-width,outline-colorin single declaration
so when set outline none or 0, telling browser set 3 properties (outline-style, outline-width , outline-color)
i used firefox developer tools find out difference:
as can see, both use default text color outline-color, , both have outline-style set none. difference outline-width:
- when
outline0,outline-width0px - when
outlinenone,outline-widthmedium
that difference between two. can use either one, both display same way (since outline-style none, not matter how wide outline is).


Comments
Post a Comment