Reputation: 81
I am a junior-mid level developer.
I recently started a new job and I am tasked to essentially scrape an entire CRM project that has a huge majority of its styling done inline.
Objective: Clean out the inline styling to a shared folder that contains the .css file.
Problem: 50-100 of files that contain components with inline styles.
Goal: Adopt a systematic method to efficiently abstract the inline styles. While bringing some structure to this project.
Thoughts on any good methods of doing this?
Upvotes: 1
Views: 50
Reputation: 4322
I would approach something like this using an HTML parser, like simplehtmldom.
Your algorithm might resemble something like this:
<link>
element in the HTML pointing to your new external stylesheetUpvotes: 1