It's not unlimited. Once your capital gains and dividends are high enough to push your total income up past the top of the 15% bracket, any further capital gains/dividends are taxed at the 15% rate that applies to income in the 25-35% brackets.
Example:
Married filing jointly
$50k ordinary income +
$50k long-term gains =
$100k AGI
Standard deduction + two personal exemptions = $20,700
Taxable income = $100k - $20,700 = $79,300
The first $29,300 of this is taxed in regular income tax brackets:
First $18,550 at 10%, next $10,750 at 15%.
Now you have $46,000 of the 15% bracket left for your capital gains. This bit is taxed at 0%.
The $4,000 that goes over the top of the 15% bracket will be taxed at 15% (which is the capital gains rate for the 25-35% brackets).