The effects of forest fragmentation on biodiversity can be partitioned into habitat loss and increased isolation of habitat fragments. Habitat quality may however prevail over the effects of fragment area and isolation, especially for mobile animals such as butterflies. To test this hypothesis we surveyed butterfly communities in 36 deciduous forest fragments embedded in a conifer plantation matrix, along two orthogonal gradients of fragment area and isolation. We also sampled eight deciduous riparian forests to compare the complete pool of forest butterflies, expected to be found in riparian forests, to the composition of deciduous fragments. We quantified the effects of deciduous woodland area, isolation and quality on total and forest butterfly richness, community composition and several Community-Weighted Mean traits known to mediate butterfly responses to habitat fragmentation. For the 36 fragments, forest butterfly richness and community composition were not affected by fragment area or isolation but by habitat quality, especially host-plant composition. Riparian forests had higher forest butterfly richness and hosted more habitat specialists, with higher sensitivity to temperature extremes, than deciduous forest remnants. We thus provide new evidence that habitat quality can prevail over fragment area and isolation in shaping the composition of butterfly communities in mosaic landscapes.