<!DOCTYPE html> <style> p { color: transparent; } @media (resolution: 1dppx) { p { font-size: 1px; } } @media (resolution: 2dppx) { p { font-size: 2px; } } @media (resolution: 3dppx) { p { font-size: 3px; } } </style> <p>Test</p>