0

I know this question has been asked on this site a lot, but I haven't been finding the answers that apply to my needs.

I have a stylesheet that I want to use for this. I want the user to be able to click on the element s/he wishes to change, apply the change, and view the change immediately. The CSS should be updated, but not the web page. When the user is satisfied, the updated CSS file can be downloaded.

This is intended to be used in the browser without the use of an extension or plug-in. The answers I've been finding for this question relate to saving changes to CSS in a text editor and the browser window reflecting changes immediately without a page refresh.

Is what I'm asking possible to do with PHP, AJAX, and jQuery?

Thank you!

Monica
  • 1,585
  • 3
  • 23
  • 34
  • You could always detect the change, store the `CSS` selector and the `CSS` style values and then call `$(selector).css(style values)` to style. Also [see here](http://stackoverflow.com/questions/2024486/is-there-an-easy-way-to-reload-css-without-reloading-the-page) for reloading a full css file. – noahnu Jul 28 '14 at 02:26
  • 1
    ajax can do that. or something like this http://ape-project.org/ – jmercier Jul 28 '14 at 02:28
  • I know I'd need AJAX so that the CSS file change would persist. – Monica Jul 28 '14 at 02:30
  • http://vswebessentials.com/features/browserlink#auto-sync – SLaks Jul 28 '14 at 02:30
  • don't really need ajax for persist, just save current DOM – jmercier Jul 28 '14 at 02:31
  • You can edit style shests live in firefox and view the changes as you type in just inspect an oage and go to style editor. – Shub Jul 28 '14 at 02:48
  • I need to build this from the ground up. I know there are utilities that already do this, but I am required to make my own. I need something kind of like this: http://cssmate.com/csseditor.html except I need the changes to be applied to the whole page, not just one element. – Monica Jul 28 '14 at 04:40
  • You can do this with Chrome now, can't you? https://www.youtube.com/watch?v=Qy5obNItQiQ – ralph.m Jul 28 '14 at 04:45
  • Yes. But I need to do it in the browser window, without extensions. I can only use PHP, jQuery, and AJAX. I need to manipulate the external CSS file that the page is actively using. Say I had a div and I wanted it to be blue. I'd click on a blue swatch on some color picker, and then the div would be blue. This alteration would also be reflected in the CSS file. – Monica Jul 28 '14 at 04:47

0 Answers0