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 outline property shorthand property setting 1 or more of individual outline properties outline-style, outline-width , outline-color in 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:

<code>outline: 0</code> <code>outline: none</code>

as can see, both use default text color outline-color, , both have outline-style set none. difference outline-width:

  • when outline 0, outline-width 0px
  • when outline none, outline-width medium

that difference between two. can use either one, both display same way (since outline-style none, not matter how wide outline is).


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -