Comments (8)
I am experiencing an issue too which I think is related, if not a sign of the cause (which hopefully can help you identify where this is happening). When compiling bootstrap (5) minify <= 1.3.71 produces:
color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1)); // correct
With 1.3.72 the same code produces the following invalid css:
color:rgb(var(--bs-link-color-rgb) var(--bs-link-opacity 1)); // invalid
This may not be limited to just this, but it is definitely something I can pinpoint.
from minify.
Yes, it's definitely a problem with the bootstrap framework and color. I'm experiencing the same issue. Grids and everything else are working fine, but colors don't work.
@matthiasmullie I will send you our CSS minified with version 1.3.71 and 1.3.72 via e-mail, so you can see the difference.
I compared both files and saw following changes (1.3.71 -> 1.3.72)
"transparent" went to "#fff0"
"rgba(0,0,0,.125)" went to "rgb(0 0 0 / .125)"
"RGBA(var(--bs-primary-rgb),var(--bs-bg-opacity,1))" went to "RGB(var(--bs-primary-rgb) var(--bs-bg-opacity 1)"
from minify.
I will check in the afternoon and let you know. ๐
from minify.
@matthiasmullie I can confirm the fix in the master branch resolves color issue for me (color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));
) . But...
"rgba(0,0,0,.125)" went to "rgb(0 0 0 / .125)"
I'm still seeing rgb(0 0 0 / .125)
multiple times in my compressed version, so I do not believe it is entirely fixed (unless that is actually valid?).
Thank you for looking into this so quickly.
from minify.
That last change is actually valid; the rgb(0 0 0 / .125)
is actually the "modern" format, while the comma-separated format is considered legacy (see https://drafts.csswg.org/css-color/#color-syntax-modern)
I just released a new version - should any more issues crop up, don't hesitate to file a bug report! :)
Thanks again to both of you!
from minify.
Hi! Can you describe the problem you're seeing? Or post the CSS that fails to minify properly? Or you can email me at minify
[at]mullie
[dot]eu
if you wish to keep the CSS private.
from minify.
Hi - thanks again for your reports of this bug.
AFAICT, the patch that introduced some color conversions went a little haywire here - it essentially split rgb/hsl
values on comma, but bootstrap makes extensive use of var()
for color values, and var()
itself can also be used with a 2nd argument (for default value), which introduces an unexpected comma.
I submitted a new commit that is supposed to tighten this up and only operate on literal values (not var()
)
Could any of you please test current master branch & report whether the fix is adequate before I publish a new release?
Thanks!
from minify.
Awesome, you're a star! Thank you again.
from minify.
Related Issues (20)
- JS line comment not working - SOLVED.
- text onchange in the script HOT 1
- incorrect behavior when ยซ\\ยป in JS
- Multiline comments not always stripped HOT 2
- Big performance loss in CSS-minify HOT 10
- Invalid max syntax on output
- CSS variables with default values lose their units which makes calculations that they participate in invalid HOT 2
- Class "MatthiasMullie\PathConverter\Converter" not found HOT 2
- Minify is not minifying JS/CSS files
- Waiting for the new version HOT 6
- idea to obfuscate JS on output
- /* cd */ trips up minifier HOT 1
- Minifying backticks
- Issue with the import combination
- openbasedir restrictions throws exception with is_file() HOT 1
- JS whiteSpace removes the whole script
- Incorrect export handling
- Minifying Multiple CSS/JS Files & Creating a Single, Minified File Without Repeated Standard Header Comments
- After generating in some cases it is adding slash "/"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minify.