re: Daily Challenge #32 - Hide Phone Numbers VIEW POST

FULL DISCUSSION
 

CSS

.hide-phone-number {
  display: inline-block;
  font-family: monospace, monospace;
  position: relative;
}

.hide-phone-number::after {
  content: "XX-XXXX";
  background: white;
  position: absolute;
  right: 0;
}

Another trickery with CSS: with no prechecks and assuming the phone number is valid, add the class "hide-phone-number" to the element and the last six digit will turn into Xs.

 
 
 

Ah, this is like people making the text background black on PDF documents and being surprised when people can still just copy & paste the original contents out of the "redacted" document.

 
code of conduct - report abuse