CEO @ ESCEMI and CTO @ Your service
- ๐ซ How to reach me https://www.linkedin.com/in/emilienescalle/
CSS Linter for PHP
Home Page: https://neilime.github.io/php-css-lint/
License: MIT License
Most methods/properties are declared as protected
which I don't think should be the case as most of them work on its self and therefore should be declared private
.
I would also suggest to make the Linter
class final and to add the private
visibility to class constants (Available as of PHP 7.1, which this library already targets).
I'm working with files that mostly have tabbed indentation. After digging through the code, I wasn't able to find a way of specifying the type of indentation in a file.
Is there such an option, and if not - will it be much of a hassle to implement?
Hey,
I would like a way to potentially take input from STDIN. As there is some PHP involved in the generation of my styles, I cannot reliably run automated tests on them using your library, however I like the fact that it is in PHP (and thus in composer).
Is there any way support for this option could be added?
I've been trying to find a good PHP linter that checks if a CSS string has valid syntax. So far, this is the only one that has gotten the job almost right. My tests are done on the official stylesheet of WordPress' twentyseven theme - style.css. It returns a lot of errors, which I imagine shouldn't be flagged as such.
Here's the same file tested with the w3c's validator - link.
Tested with latest version from master (before and after indentation update).
Currently the Properties
class is not declared as final
but it's impossible to inject an extended class of it into the Linter.
For this I would propose to add a constructor to Linter
and remove the getCssLintProperties()
method.
Currently if you want to allow tabs on the files, you need to create your own script to run the linter.
It would be nice to have a command line parameter to weak this sor of configurations.
This would make it easier to use this script in a CI environment
Describe the bug
The linter doesn't seem to accept CSS variables.
To Reproduce
Introduce a CSS variable:
:root {
--border-radius: 3px;
}
This throws an error:
Unknown CSS property "--border-radius" (line: 1980, char: 20)
Expected behavior
CSS variables are valid CSS.
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.