Skip to content

Commit

Permalink
Fixed missing commas in "font-family" property
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsManta committed Apr 20, 2017
1 parent 3b4daef commit 28b2e9e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion edge/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ function format(content, options) {
// Insert the property value(s) without the last portion of comments
// For example,
// margin: 8px 0; /* right-comment */
outputBuffer.append(propertyValues.join(' '))
if (propertyName === 'font-family') {
outputBuffer.append(propertyValues.join(comma))
} else {
outputBuffer.append(propertyValues.join(' '))
}

// Put the last portion of comments aside
if (commentsOnTheRight.length > 0) {
Expand Down
5 changes: 4 additions & 1 deletion spec/font-face/input.styl
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
@font-face
font-family Gensans
font-family Gensans

body
font-family 'graphik', Arial, Helvetica, sans-serif
4 changes: 4 additions & 0 deletions spec/font-face/output.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@font-face {
font-family: Gensans;
}

body {
font-family: 'graphik', Arial, Helvetica, sans-serif;
}

0 comments on commit 28b2e9e

Please sign in to comment.