Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS background attribute bug #603

Closed
marmooo opened this issue Sep 4, 2023 · 1 comment
Closed

CSS background attribute bug #603

marmooo opened this issue Sep 4, 2023 · 1 comment

Comments

@marmooo
Copy link

marmooo commented Sep 4, 2023

I found a bug in the background attribute of CSS, so I'm reporting it.
In the following simple case using Bootstrap 5.3.1, a bug with the background attribute occurs.
After running minify test.html, the background attribute becomes var(--bs-btn-close-bg)/1em no-repeat;.
However, this value does not display the button.
I checked the version 2.9.22-1 (apt) and 2.12.9.

test.html

<html>
  <head>
    <style>
      /* Bootstrap 5.3.1 */
      .btn-close {
        --bs-btn-close-color: #000;
        --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
        --bs-btn-close-opacity: 0.5;
        --bs-btn-close-hover-opacity: 0.75;
        --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
        --bs-btn-close-focus-opacity: 1;
        --bs-btn-close-disabled-opacity: 0.25;
        --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
        box-sizing: content-box;
        width: 1em;
        height: 1em;
        padding: 0.25em 0.25em;
        color: var(--bs-btn-close-color);
        background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat;
        border: 0;
        border-radius: 0.375rem;
        opacity: var(--bs-btn-close-opacity);
      }
    </style>
  </head>
  <body>
   <button type="button" class="btn-close"></button>
  </body>
</body>
@tdewolff
Copy link
Owner

tdewolff commented Sep 9, 2023

Should be fixed now, thanks for the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants