Skip to content

Commit

Permalink
fix: make font-name filter checks case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Ohlsson Aden committed Oct 1, 2020
1 parent 5c32c16 commit f95de9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/postformatting/unused-fontface-remover.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getAllFontNameValues (ast) {
const familyName = decodeFontName({
type: 'Value',
children: entry.nodes
})
}).toLowerCase()
if (!fontNameValues.has(familyName)) {
debuglog('found used font-family: ' + familyName)
fontNameValues.add(familyName)
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function unusedFontfaceRemover (ast) {
const name = csstree.property(declaration.property).name

if (name === 'font-family') {
const familyName = decodeFontName(declaration.value)
const familyName = decodeFontName(declaration.value).toLowerCase()

// was this @font-face used?
if (!fontNameValues.has(familyName)) {
Expand Down

0 comments on commit f95de9f

Please sign in to comment.