twbs / rfs

✩ Automates responsive resizing ✩
MIT License
3.31k stars 215 forks source link

RFS with WordPress (?) #473

Open begrafx opened 2 months ago

begrafx commented 2 months ago

This is more a question than an "issue". I've been looking at RFS for a while now, and it seems like a great tool. I've got a project I'm working on right now that it would be the perfect solution for. Has anyone gotten RFS to work in a WordPress environment? I've looked, I don't find any PlugIns, and Google searches in this regard seem to come up dry. So I thought I'd go "straight to the source" and see if anyone else has found a solution.

owaisahmed5300 commented 1 month ago

It's primarily a SCSS stylesheet, so as long as you can enqueue a CSS stylesheet into WordPress, you can use it. Essentially, it's a tool for developers to write stylesheets quickly. It can't be a WordPress plugin because it executes at compile time. Therefore, if you're building a theme or custom WordPress plugin, you can use it to generate stylesheets efficiently which you later enqueue to WP.

I don't think any page builder has adopted this approach yet, where the end-user can specify base font size and ratios, and the system automatically scales them according to screen resolution. While such a feature is feasible to develop in WordPress, it requires extensive server-side logic. Implementing it into existing page builder codebases would be time-consuming, and I doubt they would undertake such a project.