I have been searching for a way to comment out a .css file that may have a certain font-family indicated in the @font-face, #id, selector and/or .class. I can do this with sed if everything is on one line with /foobar/ a\(append) and /foobar/ i\(insert) but what is the best method to do this if everything is on multiple lines?
EXAMPLE:
Before
@font-face {
font-family: "foobar";
src: url(fonts/foobar.ttf);
}
h1 {
font-family: "foobar";
}
.foobar {
font-family: "foobar";
}
End result:
/* @font-face {
font-family: "foobar";
src: url(fonts/foobar.ttf);
} */
/* h1 {
font-family: "foobar";
} */
/* .foobar {
font-family: "foobar";
} */