0

I would like to test out CSS on a webpage that I don't have direct access to. Does anyone know how to achieve this ?

So I write my CSS, and on save, that code is used on the webpage. Of cause this will only happen on my local machine

3
  • Asking for recommendation of a tool is considered as off-topic mate. Hence, voted to close. Commented Aug 13, 2014 at 11:45
  • so where can I write off topic questions ? Commented Aug 13, 2014 at 12:06
  • 2
    on your desk and give it to your wife or girlfriend, lol... Commented Aug 13, 2014 at 12:25

1 Answer 1

1

You could use a simple Bookmarklet, similar to how various jQuery Injectors work.

http://mcdlr.com/css-inject/ might do the trick. For something a bit more dynamic (which takes a URL to a CSS file), check out this jsfiddle I've whipped up! It shouldn't be too hard to modify to pass in inline styles, etc.. so should be a good starting point.

javascript:var%20csshref=prompt('enter%20css%20url');var%20s=document.createElement('link');s.setAttribute('href',csshref);s.setAttribute('type','text/css');s.setAttribute('rel','stylesheet');document.getElementsByTagName('body')[0].appendChild(s);void(s);

Re your comment...

You can just use F12 Dev Tools. Chrome, Firefox and IE are all quite good now. (My preference is Chrome).

Sign up to request clarification or add additional context in comments.

2 Comments

This is not exactly waht I want. I want that things are used on webpage, everytime I save my CSS. A lot like your link, but on file save, so I don't have to copy paste my CSS all the time
I know F12. I am a frontend developer :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.