1

It's there a jquery plugin to validate CSS ?

I mean, i yould like to let the user enter is own CSS in a textbox and validate if is a valid CSS with jquery ?

example :

@font-face {
    font-family: 'NationalRegular';
    src: url('http://localced.com/national-regular-webfont.eot');
    src: local('National'), local('NationalRegular'), url('http://localced.com/national-regular-webfont.woff') format('woff'), url('http://localced.com/national-regular-webfont.ttf') format('truetype'), url('http://localced.com/national-regular-webfont.svg#webfontHGfqMJAZ') format('svg');
    font-weight: normal;
    font-style: normal;
***notgoodCSS***:this is not good;
}

2 Answers 2

1

Use the W3C validator on your own server.

Execute the commandline and return the result to jquery (through an Ajax call).

http://jigsaw.w3.org/css-validator/DOWNLOAD.html

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

Comments

0

I'm not sure about Jquery, but do you know about the W3C CSS Validation Service? You can enter a url to a css file and it will validate it as valid or invalid and tell you how to correct it.

Comments

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.