Remove total color from``

Asked

Viewed 34 times

0

I put this code in my projects to eliminate the color when something is selected, however the times "blank spaces" that stay are colored with colors that should not, have to avoid or put transparent too?

::selection {
    background-color: transparent;
}

::-moz-selection {
    background-color: transparent;
}

::-webkit-selection {
    background-color: transparent;
}

Example: inserir a descrição da imagem aqui

1 answer

1


Can disable the user-select, experiment:

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
<p class="noselect">
  Texto        com     espaços.          inclusive aqui >          
</p>

  • It really works but then I completely lose the functionality of that FOKUS script.. There is no alternative ?

  • @user3163662 is using that browser? and can post the code that is showing the selected space?

  • 1

    I could not reproduce the error, unfortunately. I will accept your reply, thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.