Skip to content

Using as a polyfill with @supports #24

@notpushkin

Description

@notpushkin

Hey, first of all thanks for your wonderful project!

I think usage example can be updated to something along the lines of:

// npm install --save text-security
@import "text-security/text-security.css";

.my-password-field {
  /* Use -webkit-text-security if the browser supports it */
  -webkit-text-security: disc;
}

@supports not (-webkit-text-security: disc) {
  .my-password-field {
    font-family: text-security-disc;
  }
}

This will allow skipping font download when browser supports -webkit-text-security: disc natively, and only use it for Firefox or older browsers.

Demo: https://jsfiddle.net/5wg3n7hu/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions