Giter Club home page Giter Club logo

php-autoprefixer's People

Contributors

michael-sumner avatar mitelg avatar padaliyajay avatar ruud68 avatar shyim avatar tobiasberge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-autoprefixer's Issues

Missing Vendor dir?

Hi
I was trying out your prefixer at last, and added it to my composer.json and as both dev-master and 1.0 versions the Vendor dir is missing... so i get
Fatal error: Uncaught Error: Class 'Padaliyajay\PHPAutoprefixer\Vendor\IE' not found...
Did i miss something?

Will try a manual install in the meantime,

TIA

Some more optimization

I see that you remove zero (0) when it's in expression 0.5px or calc(-0.5em + 10%) etc. which is great and I really love it as it makes final CSS smaller.

What about another optimization? Remove unnecessary quotes?
Currently I use this to remove them:

$prefixed_css = str_replace(
	array(
		'[role="button"]',
		'[type="button"]',
		'[type="reset"]',
		'[type="submit"]',
		'[type="search"]',
		'[type="file"]',
		'[type="checkbox"]',
		'[type="radio"]',
		'="top"',
		'="right"',
		'="bottom"',
		'="left"',
	),
	array(
		'[role=button]',
		'[type=button]',
		'[type=reset]',
		'[type=submit]',
		'[type=search]',
		'[type=file]',
		'[type=checkbox]',
		'[type=radio]',
		'=top',
		'=right',
		'=bottom',
		'=left',
	),
	$prefixed_css
);

Comment lines in CSS file was removed

Sir, I found that my comment lines in CSS file were removed completely after passing to Autoprefixer()
May be because of the PHP CSS Parser.
Could you please help me fix it ?
Sorry my English is bad.

Doesn't properly handle @if statements

With css code of:
@if ($menu_align_center = 1) {
@media (min-width: 769px) {
#topnavbar.navbar .navbar-nav {
display: inline-block;
float: none;
}
#topnavbar.navbar .navbar-collapse {
text-align: center;
}
}
}
@media print {
a[href]:after {
content: none !important;
}
}

The output is mangled and looks like:
@if ($menu_align_center = 1) {
display: inline-block;
float: none;
} #topnavbar.navbar .navbar-collapse {
text-align: center;
}
}

@media print {
content:none
!important;
}

:-moz-placeholder-shown

:placeholder-shown
should be prefixed to
:-moz-placeholder-shown
and when I put this rule to
Mozilla.php
it works, but there are some non-prefixed rules, like
.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label, .form-floating > .form-select ~ label
it should be prefixed to
.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label, .form-floating > .form-select ~ label
but it's not... :/

deleted colors

when there are expressions like
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
or
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;
then it will complete delete them

Only seems to remove comments?

Hi, is there something else I should install with Composer to make this work? I'm using the default installation, and the generated CSS is just the original CSS without comments. No -webkit nor any other prefixes seem to be added at all. Thanks for your support.

Compiling newest Bootstrap problems

While using your autoprefixer with new Bootstrap 5.1.1 correctly compiled by scssphp-1.7.0 I can see that values like these are removed (completely erased from output)

background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;

Compilation time is to much

Hi Jay.
I was exited about this project, so i have try to implement on my project.
I'm working with compiling and cacheing on the fly, currently working with prefixfree.css

I test it and I advice have a big compile time (10-20+ secs).
Without phpautoprefix (but processing sass, minify, jspack, etc), compile time is 2-3secs.
In other hand, prefixfree.css has a clientside compile time of 50ms...

So, what can you say about it.
I love this feature/package, but on current compile times i have to avoid it.

Thanks for share your work.

New version

The last Version (1.3) was released in 2019 and doesnt contain the new features.
We would like to use the features and therefore want to update to a new version but using the master branch as version is no ideal.
Are you planning to release a new version of this plugin?

Scssphp compatibility

Hi, I found your project after looking for a PHP autoprefixer that works with scssphp. I just wanted to check with you if this library is still being maintained and if you know if it works with scssphp compiler?

Thanks

Comments removed?

Hi,
noticed that when parsing css with php-autoprefixer, the comments are removed in the resulting css file.
Is there a way to preserve them in the resulting css file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.