diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:50:21 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:50:21 +0800 |
| commit | 0379526e20e1ff212df23e6326741aa9c06df204 (patch) | |
| tree | 340143b0c4dc4280c88ba1591d137b53477005b3 /node_modules/doiuse/data/features/ttf.js | |
| parent | 7aba14fb7c970c6e6af82c805db2aef6d70bfe2b (diff) | |
added doiuse plugin for postcss
Diffstat (limited to 'node_modules/doiuse/data/features/ttf.js')
| -rw-r--r-- | node_modules/doiuse/data/features/ttf.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/doiuse/data/features/ttf.js b/node_modules/doiuse/data/features/ttf.js new file mode 100644 index 00000000..19f7687e --- /dev/null +++ b/node_modules/doiuse/data/features/ttf.js @@ -0,0 +1,20 @@ +/** + * TTF/OTF - TrueType and OpenType font support + * Support for the TrueType (.ttf) and OpenType (.otf) outline font formats in @font-face. + * @see https://caniuse.com/ttf + */ + +/** + * @type {import('../features').Feature} + */ +export default (rule) => { + const ruleText = rule.toString(); + + if (ruleText.includes('@font-face') && ( + (ruleText.includes('.ttf') || ruleText.includes('.otf')) + )) { + return true; + } + + return false; +}; |
