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

bg-[10px_10%] is missing background-size type checking #9352

Closed
lzt1008 opened this issue Sep 17, 2022 · 1 comment · Fixed by #9448
Closed

bg-[10px_10%] is missing background-size type checking #9352

lzt1008 opened this issue Sep 17, 2022 · 1 comment · Fixed by #9448

Comments

@lzt1008
Copy link
Contributor

lzt1008 commented Sep 17, 2022

What version of Tailwind CSS are you using?

v3.1.8 or Insiders (4fddd2d)

What build tool (or framework if it abstracts the build tool) are you using?

tailwind cli

What version of Node.js are you using?

v16

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/tpx3OYFFsH

Describe your issue

As the Reproduction URL,

<div bg-[10px_10%]></div>
<div bg-[10%_10%]></div>
<div bg-[10px_10px]></div>

can generate

.bg-\[10px_10\%\] {
  background-position: 10px 10%;
}

which does not make sense, because all these values are valid (background-size and background-position) so it's ambiguous.

I've created a PR to solve this problem. #9349

@lzt1008 lzt1008 closed this as completed Sep 17, 2022
@lzt1008 lzt1008 reopened this Sep 17, 2022
@lzt1008 lzt1008 changed the title backgroun bg-[10px_10%] is missing background-size type checking Sep 17, 2022
@536f6e6179
Copy link

If I understand it correctly, you want to use background-size and background-position but as well as you do it, it is only background-position, to use background-size and background-position in one, you have to use bg-[position:XX_XX] and bg-[length:XX_XX].

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