https://github.com/gemorroj/cssvalidator
port PEAR package Services_W3C_CSSValidator
https://github.com/gemorroj/cssvalidator
cssvalidator pear w3c-validator
Last synced: 2 months ago
JSON representation
port PEAR package Services_W3C_CSSValidator
- Host: GitHub
- URL: https://github.com/gemorroj/cssvalidator
- Owner: Gemorroj
- License: lgpl-3.0
- Created: 2014-04-23T10:16:01.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T18:11:43.000Z (3 months ago)
- Last Synced: 2025-03-24T05:03:46.132Z (3 months ago)
- Topics: cssvalidator, pear, w3c-validator
- Language: PHP
- Size: 59.6 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Port PEAR package [CSSValidator](http://pear.php.net/package/Services_W3C_CSSValidator)
[](https://github.com/Gemorroj/CSSValidator/actions?query=workflow%3A%22Continuous+Integration%22)
### Requirements:
- PHP >= 8.0.2
### Installation:
```bash
composer require gemorroj/cssvalidator
```### Example:
```php
validateFragment('#css-code { background: green; }');
$result = $validator->validateFile('/path/to/file.css');
$result = $validator->validateUri('http://example.com/style.css');
$result = $validator->validateUri('http://example.com'); // extract and validate all CSS files on that pageecho $result->getCssLevel();
var_dump($result->isValid());print_r($result->getErrors());
print_r($result->getWarnings());
```