For a class C of graphs, we define C-edge-brittleness of a graph G as the minimum ℓ such that the vertex set of G can be partitioned into sets inducing a subgraph in C and there are ℓ edges having ends in distinct parts. We characterize classes of graphs having bounded C-edge-brittleness for a class C of forests or a class C of graphs with no K4∖e topological minors in terms of forbidden obstructions. We also define C-vertex-brittleness of a graph G as the minimum ℓ such that the edge set of G can be partitioned into sets inducing a subgraph in C and there are ℓ vertices incident with edges in distinct parts. We characterize classes of graphs having bounded C-vertex-brittleness for a class C of forests or a class C of outerplanar graphs in terms of forbidden obstructions. We also investigate the relations between the new parameters and the edit distance