Сервис проверки css от w3c

W3C CSS Validator / Validation Service

The CSS Validator is a free software developed by W3C, and a free online service .

Project Logistics

Project Host

W3C is hosting and leading this project, and has been since its origin in 2002.

Online Services

Source Code / Download

Installation Notes / Discussions

(use the source from github to be sure to get the latest version)

Discussion / Development / Feedback Fora

Bug Tracking

User Mailing-list www-validator-css@w3.org

Developer Mailing-list public-qa-dev@w3.org

  • Archive
  • shared with other projects, hackers’ forum
  • ~40 subscribers
  • ~30 messages/month

Development

Languages Used

The code uses a lot of classes, which can be a bit overwhelming for a beginner, but most of the code is fairly simple. Some parts, however, are rather complex and/or would need a rewrite.

Читайте также:  Java hashmap value class

Translations

The CSS validator is translated in more than 10 languages. The translation kit contains instructions for translation, as well as two types of files:

  • static documentation (HTML, encoded as utf-8) pages
  • a properties (text) file listing the terms used in the validator, and their value in english, to be translated

Once a translation is submitted it is:

  • added to GitHub
  • tested: run (on the dev server) java org.w3c.css.index.TranslationTableGenerator.java will generate the translation table

The translation table is also used to track an need for translation updates when the code changes.

Development Speed

The development speed is fairly slow, with bursts of development when w3c staff gets some time or when interns get associated to the project.

The project is localised in many languages (10 at the time of this writing), and relies on community to get new/updated translations, which makes it slow to push any change to production.

As a result, we have managed to have 1 major release per year in the past few years.

Test Suite

cd /usr/local/Jigsaw/Jigsaw/WWW/css-validator/ for i in `ls autotest/testsuite/xml/*.xml | sed 's,autotest/testsuite/xml/,,' | sed 's,.xml,,'`; do ./autotest/autotest.sh autotest/testsuite/xml/$i.xml; mv autotest/results/results.html autotest/results/$i.html; done

Plan and Vision

High-Level Objectives

  • Provide the web with a one-stop service for Web Quality check
  • Help raise quality for (m)any kind(s) of Web content
  • Build a positive culture of Web Quality
  • Future-proof our services (new formats, new usage)
  • Leverage Communities energy
  • Remain the trusted source by professionals
  • Find the right balance between accuracy and user-friendliness

Roadmap

  • New engine: The CSS validator is currently suffering from its usage of a relatively complex java engine for parsing and validation. With help, the engine could be rewritten using either java or a different technology (e.g javascript), while using the existing test suite and localization resources to keep the tool reliable and multilingual.
    • discussion on W3C QandA weblog
    • thread on www-style

    Misc.

    Resources

    • source code in GitHub
    • Feedback page
    • Win32 build script
    • WebService::Validator::CSS::W3C Perl module
    • thoughts on a new logo
    • CSS Validator FAQ
    • How to add CSS properties in the validator?, then send a Pull Request
    • LogValidator has CssValidator Support through WebService::Validator::CSS::W3C
    • .

    Testing

    It might be worthwhile to use Value definition parser @@ to generate test data for legal style sheets, ala

    to get an idea of the implementation status for CSS3 features and to ensure that legal style sheets are not invalidated. Woult not be perfect as the lexical space might be infinite

    but it is unlikely that there are bugs in this direction, except maybe

    but these might be special cases. Indeed, the CssValidator does not handle this properly, it validates d but pretty prints

    which is not allowed. but that would be out of scope here, as only the pretty printer is affected.

    Источник

    CSS Validation Service

    The W3C CSS Validation Service is a free software created by the W3C to help Web designers and Web developers check Cascading Style Sheets (CSS). It can be used on this free service on the web, or downloaded and used either as a java program, or as a java servlet on a Web server.

    Do you need it? If you are a Web developer or a Web designer, this tool will be an invaluable ally. Not only will it compare your style sheets to the CSS specifications, helping you find errors, typos, or incorrect uses of CSS, it will also tell you when your CSS poses some risks in terms of usability.

    The explanation above is incomprehensible! Help!

    Most documents on the Web are written in a computer language called HTML. This language can be used to create pages with structured information, links, and multimedia objects. For color, text, and layout, HTML uses a styling language called CSS, short for «Cascading Style Sheets». What this tool does is help people authoring CSS check, and fix if necessary, their CSS Style Sheets.

    So, this is the authority on what is correct CSS and what isn’t?

    No. It is a helpful and reliable tool, but a software tool, and like every software, it has some bugs and issues. The actual reference on Cascading Style Sheets are the CSS Specifications.

    What does “Valid CSS” mean? Which version of CSS does this validator use?

    According to the CSS 2.1 Specification: The validity of a style sheet depends on the level of CSS used for the style sheet. […] valid CSS 2.1 style sheet must be written according to the grammar of CSS 2.1. Furthermore, it must contain only at-rules, property names, and property values defined in this specification.

    By default, this validator checks style sheets against the grammar, properties and values defined in the CSS 2.1 specification, but other CSS profiles can be checked against by using the options.

    CSS is an evolving language, and it is considered by many that “CSS” is a single grammar (the one defined in the latest specification) with a number of properties and acceptable values defined in various profiles.In a future version of this validator, the default behavior may be to check style sheets against that latest “CSS grammar” and the cloud of all standardized CSS properties and values.

    How much does it cost?

    Nothing. The service is free. The source is open and you are free to download it, use it, modify it, distribute it, and more. If you really like it, you are welcome to join the project or donate to W3C via the W3C supporters program, but nobody forces you to.

    Who wrote this tool? Who maintains it?

    W3C maintains and hosts the tool, thanks to the work and contributions by W3C staff, volunteer developers and translators. See the credits and acknowledgments page for details. You too can help.

    Can I help?

    Of course. If you are a java programmer, you can help the CSS Validator project by checking out the code, adopting and fixing bugs, or helping build new features.

    But you do not need to be a coder to help build and maintain this tool: you can also help improve the documentation, participate in translating the validator in your language, or subscribe to the mailing-list and discuss about the tool or help other users.

    Any other question?

    If you have any question regarding CSS or the CSS validator, check out the available mailing-lists and forums. But before that, make sure that your question or comment is not covered already by the CSS Validator FAQ document.

    Developers’ corner

    What is the CSS Validator written in? Is the source available somewhere?

    The W3C CSS validator is written using the java language, and yes, its source is available, using CVS: you can browse the code online or follow the instructions there to download the whole source tree. For a quick overview of the classes used in the CSS Validator code, check out the README file.

    Can I install and run the CSS Validator myself?

    It is possible to download and install the CSS validator, and to run it either from the command line, or as a servlet in a Web server. Read the instructions for installation and use.

    Can I build an application upon this validator? Is there an API?

    Yes, and yes. The CSS Validator has a (RESTful) SOAP interface which should make it reasonably easy to build applications (Web or otherwise) upon it. Good manners and respectful usage of shared resources are of course customary: make sure your applications sleep() between calls to the validator, or install and run your own instance of the validator.

    QACSS

    Copyright © 1994-2009 W3C ® ( MIT , ERCIM , Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.

    Источник

    CSS Validator

    CSS Validator is easy to use tool to validate CSS code. Copy, Paste, and Validate CSS.

    A CSS validator is a tool used to check the syntax and structure of Cascading Style Sheets (CSS) code to ensure that it is free of errors and follows the standard/specification rules of CSS. The primary benefit of a CSS linter is to help web developers ensure that their code is correct and compatible across different browsers and devices.

    What is the use of W3C CSS Validator?

    • Improved code quality : By identifying and fixing errors in CSS code, a validator can help improve the quality and readability of the code, making it easier to maintain and update.
    • Consistency : By enforcing a consistent structure and syntax, a CSS validator can help ensure that all code on a website or application follows the same conventions, making it easier to collaborate with other developers.
    • Compatibility : A validator can help ensure that a website or application is compatible with many browsers and devices by identifying potential issues with CSS code.
    • Accessibility : By identifying and flagging accessibility issues with CSS code, a validator can help ensure that a website or application is accessible to all users, including those with disabilities.

    What can you do with CSS Validator?

    • This tool helps to validate CSS based on W3 CSS rules, show errors, and suggestion to write the correct CSS.
    • It also works as CSS Checker or CSS syntax checker.
    • This tool allows loading the CSS URL to validate. Use your CSS HTTP / HTTPS URL to validate. Click on the Load URL button, Enter URL and Submit.
    • Users can also validate CSS File by uploading the file.
    • It helps to save your validated CSS and Share it on social sites or emails.
    • CSS Validator works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.
    • This CSS Linter helps a developer who works with CSS code to test and verify.

    Example of CSS File

    var carInsuranceCompany = < name: "Geico", market_capital: "$34.9 billion", >; var carInsuranceCompanyObj = JSON.stringify(obj); document.getElementById("insurance").innerHTML = carInsuranceCompanyObj;

    Источник

Оцените статью