( metadata: Metadata, unicode: UnicodeRange, isVariable: boolean, )
| 45 | }; |
| 46 | |
| 47 | export const sassMetadata = ( |
| 48 | metadata: Metadata, |
| 49 | unicode: UnicodeRange, |
| 50 | isVariable: boolean, |
| 51 | ) => { |
| 52 | return `$id: '${metadata.id}'; |
| 53 | $family: '${metadata.family}'; |
| 54 | $category: ${metadata.category}; |
| 55 | $subsets: (${metadata.subsets.join(', ')}); |
| 56 | $weights: (${metadata.weights.join(', ')}); |
| 57 | $styles: (${metadata.styles.join(', ')}); |
| 58 | $axes: ${isVariable ? axesValue(metadata) : 'null'}; |
| 59 | $defaults: ( |
| 60 | subset: ${metadata.defSubset}, |
| 61 | weight: ${findClosest(metadata.weights, 400)}, |
| 62 | style: normal, |
| 63 | axis: ${isVariable ? defaultAxis(metadata) : 'null'}, |
| 64 | ); |
| 65 | $unicode: ${unicodeValue(unicode)}; |
| 66 | |
| 67 | $metadata: ( |
| 68 | id: $id, |
| 69 | family: $family, |
| 70 | category: $category, |
| 71 | subsets: $subsets, |
| 72 | weights: $weights, |
| 73 | styles: $styles, |
| 74 | axes: $axes, |
| 75 | defaults: $defaults, |
| 76 | unicode: $unicode, |
| 77 | ) !default;`; |
| 78 | }; |
no test coverage detected