Deductions & credits

Legal fees that are part of selling your home are an adjustment to the cost basis, and may reduce your capital gains.  They are not a separate itemized deduction, before or after the 2018 tax reform law.  See publication 523.

https://www.irs.gov/forms-pubs/about-publication-523