CHICAGO - The Chicago White Sox offence is coming around.

So is pitcher John Danks.

Melky Cabrera and Alexei Ramirez homered and Danks struck out eight as the Chicago White Sox beat the New York Yankees 8-2 on Saturday night.

Danks (6-8) held the Yankees to a run and three hits in 5 2/3 innings. He walked four but his eight strikeouts matched a season high and he has not lost in six consecutive starts.

"Tonight's the best stuff I've had in two years," said Danks, who is 2-0 with a 2.78 ERA in the second half of the season after he went 4-8 with a 5.30 ERA in the first half. "I would say since the break my stuff's gradually gotten better. It's nice to be able to reach back and throw a respectable fastball."

And it helps that the Sox have averaged seven runs per game and hit 15 home runs over their last 10 games.

Danks has been trying to bounce back after undergoing shoulder surgery nearly three years ago.

"The first time I looked up and saw 93 (mph for fastball velocity), I wanted to throw confetti out there," Danks said. "It's definitely gotten better. I wish it hadn't taken this long and hopefully it'll continue, but I feel good about things right now."

Brian McCann hit his 17th homer for the AL East-leading Yankees, who could muster only five hits.

Tyler Saladino hit an RBI single in the bottom of the fifth to give the White Sox a two-run lead and knock Bryan Mitchell (0-1) out of the game. Diego Moreno replaced Mitchell and hit Jose Abreu with a pitch before he allowed Cabrera's three-run homer.

Cabrera is hitting .478 with 16 RBIs in his last 11 games.

"He's been hot," White Sox manager Robin Ventura said. "He's been in the middle of a lot of it."

Abreu extended his hitting streak to 12 games with an RBI double in the first that put the White Sox ahead.

Ramirez homered in the second for his sixth of the season and fourth in 14 games for the White Sox, who have won eight of 10. He added an RBI double in the seventh.

The White Sox averaged 4.3 runs per game to go 16-10 in July for their best monthly mark this season. They averaged just 3.1 runs in June.

"When you score runs, period, it's better," Ventura said. "It's been a nice change that we're scoring some runs."

Avisail Garcia robbed Didi Gregorius of a three-run home run with a leaping grab at the right-field wall in the third. John Ryan Murphy scored on a sacrifice fly to cut the White Sox lead to one.

Danks was called for a balk on a pickoff move after he walked Jacoby Ellsbury in the fifth. Danks then struck out Brett Gardner for his eighth K. He had been 2-3 with a 5.64 ERA in nine career starts against New York.

Mitchell allowed four runs and seven hits in four innings in his second career start and first of the season for New York.

"I fell behind a lot," Mitchell said. "It's tough to pitch like that. You're going to run into more trouble than not."

HERE TO STAY

Starter Jeff Samardzija was the subject of trade rumours but remained with the White Sox as the non-waiver trade deadline passed Friday. He seemed content staying put. "We've always thought of ourselves as contenders," he said. "I love this team, and we have a great group of guys and we just need to keep playing like we've been playing."

TRAINER'S ROOM

Yankees: RHP Nick Rumbelow was recalled from Triple-A Scranton/Wilkes-Barre and RHP Nick Goody was optioned to Triple-A before the game.

White Sox: OF J.B. Shuck (hamstring) went on the 15-day disabled list and RHP Scott Carroll was recalled from Triple-A Charlotte. ...With Shuck sidelined, manager Robin Ventura acknowledged the team will likely need to add a position player. OF Trayce Thompson might be a possibility. His brother, Golden State Warriors guard Klay Thompson, tweeted that Trayce reached the majors. Klay later deleted the tweet. ...OF Dayan Viciedo was signed to a minor-league contract and assigned to Triple A.

UP NEXT

Yankees RHP Ivan Nova (3-3, 3.38 ERA) is scheduled to start Sunday in the series finale against RHP Jeff Samardzija (8-5, 3.82).